commit
56c2530deb
1693 changed files with 595454 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||||
|
/AMESCoreStudio.WebApi/bin |
||||
|
/AMESCoreStudio.WebApi/obj |
||||
|
/AMESCoreStudio.Web/bin |
||||
|
/AMESCoreStudio.Web/obj |
||||
|
/AMESCoreStudio.CommonTools/bin |
||||
|
/AMESCoreStudio.CommonTools/obj |
@ -0,0 +1,7 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>netcoreapp3.1</TargetFramework> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
</Project> |
@ -0,0 +1,22 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.ComponentModel; |
||||
|
|
||||
|
namespace AMESCoreStudio.CommonTools.Result |
||||
|
{ |
||||
|
public class Errors |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 错误字段
|
||||
|
/// </summary>
|
||||
|
[Description("错误字段")] |
||||
|
public string Id { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 错误信息
|
||||
|
/// </summary>
|
||||
|
[Description("错误信息")] |
||||
|
public string Msg { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
using System.ComponentModel; |
||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace AMESCoreStudio.CommonTools.Result |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 返回结果模型接口
|
||||
|
/// </summary>
|
||||
|
public interface IResultModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 是否成功
|
||||
|
/// </summary>
|
||||
|
//[JsonIgnore]
|
||||
|
[Description("是否成功")] |
||||
|
bool Success { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 错误信息
|
||||
|
/// </summary>
|
||||
|
[Description("错误信息")] |
||||
|
string Msg { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态码
|
||||
|
/// </summary>
|
||||
|
[Description("状态码")] |
||||
|
int Status { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 資料筆數
|
||||
|
/// </summary>
|
||||
|
[Description("資料筆數")] |
||||
|
int DataTotal { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 模型验证失败
|
||||
|
/// </summary>
|
||||
|
[Description("模型验证失败")] |
||||
|
List<Errors> Errors { get; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 返回结果模型泛型接口
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
public interface IResultModel<T> : IResultModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 返回数据
|
||||
|
/// </summary>
|
||||
|
[Description("返回数据")] |
||||
|
IEnumerable<T> Data { get; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,153 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace AMESCoreStudio.CommonTools.Result |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 返回成功模型
|
||||
|
/// </summary>
|
||||
|
public class ResultModel<T> : IResultModel<T> |
||||
|
{ |
||||
|
public bool Success { get; set; } |
||||
|
|
||||
|
public string Msg { get; set; } |
||||
|
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 資料筆數
|
||||
|
/// </summary>
|
||||
|
public int DataTotal { get; set; } = 0; |
||||
|
|
||||
|
public IEnumerable<T> Data { get; set; } |
||||
|
|
||||
|
public List<Errors> Errors { get; set; } |
||||
|
|
||||
|
public ResultModel<T> ToSuccess(IEnumerable<T> data = default, string msg = "success" ,int total = 0) |
||||
|
{ |
||||
|
Success = true; |
||||
|
Msg = msg; |
||||
|
Status = 200; |
||||
|
Data = data; |
||||
|
DataTotal = total; |
||||
|
return this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 返回失败模型
|
||||
|
/// </summary>
|
||||
|
public class FailedResult : IResultModel |
||||
|
{ |
||||
|
public bool Success { get; set; } |
||||
|
|
||||
|
public string Msg { get; set; } |
||||
|
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 資料筆數
|
||||
|
/// </summary>
|
||||
|
public int DataTotal { get; set; } = 0; |
||||
|
|
||||
|
public List<Errors> Errors { get; set; } |
||||
|
|
||||
|
public FailedResult ToFailed(string msg = "failed", int code = 200, List<Errors> errors = default) |
||||
|
{ |
||||
|
Success = false; |
||||
|
Msg = msg; |
||||
|
Status = code; |
||||
|
Errors = errors ?? new List<Errors>(); |
||||
|
return this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 返回结果
|
||||
|
/// </summary>
|
||||
|
public class ResultModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 成功
|
||||
|
/// </summary>
|
||||
|
/// <param name="data">返回数据</param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Success<T>(IEnumerable<T> data = default(IEnumerable<T>)) |
||||
|
{ |
||||
|
return new ResultModel<T>().ToSuccess(data); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成功
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Success() |
||||
|
{ |
||||
|
return Success<string>(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 失败,返回模型字段错误信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="errors">模型验证失败</param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Failed(List<Errors> errors) |
||||
|
{ |
||||
|
return new FailedResult().ToFailed("failed", 400, errors); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 失败,返回模型字段错误信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="error">错误信息</param>
|
||||
|
/// <param name="failedid">错误字段</param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Failed(string error, string failedid) |
||||
|
{ |
||||
|
var errors = new List<Errors>(); |
||||
|
errors.Add(new Errors() { Id = failedid, Msg = error }); |
||||
|
return Failed(errors); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 失败
|
||||
|
/// </summary>
|
||||
|
/// <param name="error">错误信息</param>
|
||||
|
/// <param name="code">状态码</param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Failed(string error, int code) |
||||
|
{ |
||||
|
return new FailedResult().ToFailed(error, code); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 失败,状态码200
|
||||
|
/// </summary>
|
||||
|
/// <param name="error">错误信息</param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Failed(string error) |
||||
|
{ |
||||
|
return Failed(error, 200); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据布尔值返回结果
|
||||
|
/// </summary>
|
||||
|
/// <param name="success"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel Result(bool success) |
||||
|
{ |
||||
|
return success ? Success() : Failed("failed"); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 数据已存在
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public static IResultModel HasExists => Failed("数据已存在"); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 数据不存在
|
||||
|
/// </summary>
|
||||
|
public static IResultModel NotExists => Failed("数据不存在"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
{ |
||||
|
"version": 1, |
||||
|
"isRoot": true, |
||||
|
"tools": { |
||||
|
"dotnet-ef": { |
||||
|
"version": "7.0.0", |
||||
|
"commands": [ |
||||
|
"dotnet-ef" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk.Web"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>netcoreapp3.1</TargetFramework> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<Compile Remove="Views\MES\**" /> |
||||
|
<Content Remove="Views\MES\**" /> |
||||
|
<EmbeddedResource Remove="Views\MES\**" /> |
||||
|
<None Remove="Views\MES\**" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<Compile Remove="Code\Errors.cs" /> |
||||
|
<Compile Remove="Code\IResultModel.cs" /> |
||||
|
<Compile Remove="Code\ResultModel.cs" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<Content Remove="Code\Properties\launchSettings.json" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<None Include="Code\Properties\launchSettings.json"> |
||||
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory> |
||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile> |
||||
|
<CopyToPublishDirectory>Never</CopyToPublishDirectory> |
||||
|
</None> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="AspNetCore.Reporting" Version="2.1.0" /> |
||||
|
<PackageReference Include="ClosedXML" Version="0.95.4" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.20" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.3" /> |
||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.8" /> |
||||
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.5" /> |
||||
|
<PackageReference Include="System.CodeDom" Version="6.0.0" /> |
||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" /> |
||||
|
<PackageReference Include="System.IO.Packaging" Version="5.0.0" /> |
||||
|
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" /> |
||||
|
<PackageReference Include="WebApiClient.JIT" Version="1.1.4" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\AMESCoreStudio.WebApi\AMESCoreStudio.WebApi.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<Folder Include="Properties\PublishProfiles\" /> |
||||
|
<Folder Include="wwwroot\PCSFile\" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
@ -0,0 +1,29 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public class AppSetting |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// MVC网站访问IP端口
|
||||
|
/// </summary>
|
||||
|
public string Urls { get; set; } |
||||
|
/// <summary>
|
||||
|
/// WebApi访问地址
|
||||
|
/// </summary>
|
||||
|
public string ApiUrl { get; set; } |
||||
|
|
||||
|
//Yiru Add -------------------------------------------------------------------
|
||||
|
public string Location { get; set; } |
||||
|
|
||||
|
//2023-02-12 add
|
||||
|
public string PTD101Key { get; set; } |
||||
|
|
||||
|
//Yiru End -------------------------------------------------------------------
|
||||
|
|
||||
|
public static AppSetting Setting { get; set; } = new AppSetting(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Code |
||||
|
{ |
||||
|
|
||||
|
public class Entire |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 10進位與16進位互轉 Types = DecToHex/HexToDec
|
||||
|
/// </summary>
|
||||
|
/// <param name="InputTXT"></param>
|
||||
|
/// <param name="Types">10-16:DecToHex 16-10:HexToDec</param>
|
||||
|
/// <returns></returns>
|
||||
|
public string DecHex(string InputTXT, string Types) |
||||
|
{ |
||||
|
// 10 to 16
|
||||
|
if (Types == "DecToHex") |
||||
|
{ |
||||
|
|
||||
|
// To hold our converted unsigned integer32 value
|
||||
|
uint uiDecimal = 0; |
||||
|
try |
||||
|
{ |
||||
|
// Convert text string to unsigned integer
|
||||
|
uiDecimal = checked((uint)System.Convert.ToUInt32(InputTXT)); |
||||
|
} |
||||
|
|
||||
|
catch (System.OverflowException exception) |
||||
|
{ |
||||
|
// Show overflow message and return
|
||||
|
return "Overflow" + exception.ToString(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// Format unsigned integer value to hex and show in another textbox
|
||||
|
return String.Format("{0:x2}", uiDecimal); |
||||
|
} |
||||
|
|
||||
|
// 16 to 10
|
||||
|
else if (Types == "HexToDec") |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
// To hold our converted unsigned integer32 value
|
||||
|
uint uiHex = 0; |
||||
|
|
||||
|
try |
||||
|
{ |
||||
|
// Convert hex string to unsigned integer
|
||||
|
uiHex = System.Convert.ToUInt32(InputTXT, 16); |
||||
|
} |
||||
|
|
||||
|
catch (System.OverflowException exception) |
||||
|
{ |
||||
|
// Show overflow message and return
|
||||
|
return "Overflow " + exception.ToString(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// Format it and show as a string
|
||||
|
return uiHex.ToString(); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return "input Type ERROR"; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
{ |
||||
|
"iisSettings": { |
||||
|
"windowsAuthentication": false, |
||||
|
"anonymousAuthentication": true, |
||||
|
"iisExpress": { |
||||
|
"applicationUrl": "http://localhost:5000", |
||||
|
"sslPort": 0 |
||||
|
} |
||||
|
}, |
||||
|
"$schema": "http://json.schemastore.org/launchsettings.json", |
||||
|
"profiles": { |
||||
|
"IIS Express": { |
||||
|
"commandName": "Project", |
||||
|
"launchBrowser": true, |
||||
|
"launchUrl": "amesapi/index.html", |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"applicationUrl": "http://localhost:5000" |
||||
|
}, |
||||
|
"AMESCoreStudio.WebApi": { |
||||
|
"commandName": "Project", |
||||
|
"launchBrowser": true, |
||||
|
"launchUrl": "api/bulletins", |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"applicationUrl": "https://localhost:5001;http://localhost:5000" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Code |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 虛擬路徑
|
||||
|
/// </summary>
|
||||
|
public class VirtualPathConfig |
||||
|
{ |
||||
|
public List<PathContent> VirtualPath { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class PathContent |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 真實路徑
|
||||
|
/// </summary>
|
||||
|
public string RealPath { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 目錄名稱
|
||||
|
/// </summary>
|
||||
|
public string RequestPath { get; set; } |
||||
|
|
||||
|
//public string Alias { get; set; }
|
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,249 @@ |
|||||
|
using AMESCoreStudio.Web.Models; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Diagnostics; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.Extensions.Localization; |
||||
|
using Newtonsoft.Json; |
||||
|
using Newtonsoft.Json.Linq; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Controllers |
||||
|
{ |
||||
|
public class HomeController : Controller |
||||
|
{ |
||||
|
private readonly ILogger<HomeController> _logger; |
||||
|
public readonly IAuth _authApi; |
||||
|
public readonly ISYS _sysApi; |
||||
|
private readonly IStringLocalizer<HomeController> _localizer; |
||||
|
private readonly IConfiguration _config; |
||||
|
|
||||
|
public HomeController(ILogger<HomeController> logger, IAuth authApi, ISYS sysApi, IStringLocalizer<HomeController> localizer) |
||||
|
{ |
||||
|
_logger = logger; |
||||
|
_authApi = authApi; |
||||
|
_sysApi = sysApi; |
||||
|
_localizer = localizer; |
||||
|
_config = new ConfigurationBuilder().SetBasePath(Environment.CurrentDirectory).AddJsonFile("appsettings.json").Build(); |
||||
|
} |
||||
|
|
||||
|
public IActionResult Index() |
||||
|
{ |
||||
|
ViewBag.VersionCode = _config["VersionCode"]; |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
public IActionResult Test() |
||||
|
{ |
||||
|
//return Content(_localizer["Test"]);
|
||||
|
//return Content("Test");
|
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public async Task<IActionResult> Framework() |
||||
|
{ |
||||
|
ViewBag.VersionCode = _config["VersionCode"]; |
||||
|
|
||||
|
var info = await _authApi.AuthInfo(); |
||||
|
|
||||
|
if (Request.Cookies["_AMESCookie"] != null) |
||||
|
{ |
||||
|
var userID = ""; |
||||
|
HttpContext.Request.Cookies.TryGetValue("UserID", out userID); |
||||
|
if (userID != null) |
||||
|
{ |
||||
|
if (int.Parse(userID.ToString()) >= 0) |
||||
|
{ |
||||
|
int user_id = int.Parse(userID.ToString()); |
||||
|
var userRole = await _sysApi.GetUserRolesByUser(user_id); |
||||
|
|
||||
|
int role_id = userRole.Data.ToList()[0].RoleID; |
||||
|
|
||||
|
//var userModule = await _sysApi.GetRoleModulesByRole(role_id, 0, 10);
|
||||
|
//var userProgram = await _sysApi.GetRoleProgramsByRole(role_id, 0, 10);
|
||||
|
|
||||
|
var userModule = await _sysApi.GetRoleModulesByUser(user_id, 0, 10); |
||||
|
var userProgram = await _sysApi.GetRoleProgramsByUser(user_id, 0, 10); |
||||
|
|
||||
|
string menuData = "<ul id = 'nav' class='layui-tab-item layui-show'>"; |
||||
|
|
||||
|
int i = 0; |
||||
|
foreach (var user_module in userModule.Data) |
||||
|
{ |
||||
|
JObject jo1 = JObject.Parse(user_module.ToString()); |
||||
|
int module_id = int.Parse(jo1["moduleID"].ToString()); |
||||
|
i = i + 1; |
||||
|
if (i == 0) |
||||
|
{ |
||||
|
menuData = menuData + "<li class='open'>"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
menuData = menuData + "<li>"; |
||||
|
} |
||||
|
|
||||
|
if (user_module != null) |
||||
|
{ |
||||
|
menuData = menuData + "<a class=''>"; |
||||
|
menuData = menuData + "<i class='fa fa-star fa-fw' style='color:#77B272;'></i><cite style='color:#77B272;'> " + jo1["moduleName"].ToString() + " </cite><i class='fa fa-angle-down fa-fw nav_right'></i>"; |
||||
|
menuData = menuData + "</a>"; |
||||
|
menuData = menuData + "<ul class='sub-menu' style='display: none;'>"; |
||||
|
} |
||||
|
|
||||
|
foreach (var user_program in userProgram.Data) |
||||
|
{ |
||||
|
if (user_program != null) |
||||
|
{ |
||||
|
JObject jo2 = JObject.Parse(user_program.ToString()); |
||||
|
|
||||
|
if (jo2["moduleID"].ToString() == module_id.ToString()) |
||||
|
{ |
||||
|
menuData = menuData + "<li class='sub-tab' hg-title='" + jo2["programName"].ToString() + "' hg-nav='" + jo2["programPath"].ToString() + "'>"; |
||||
|
menuData = menuData + "<a><i class='fa fa-key fa-fw'></i><cite>" + jo2["programName"].ToString() + "</cite></a>"; |
||||
|
menuData = menuData + "</li>"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
menuData = menuData + "</ul>"; |
||||
|
menuData = menuData + "</li>"; |
||||
|
} |
||||
|
menuData = menuData + "</ul>"; |
||||
|
|
||||
|
ViewData["MenuList"] = menuData; |
||||
|
|
||||
|
return View(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return RedirectToAction("Index", "Login"); |
||||
|
} |
||||
|
} |
||||
|
return View(); |
||||
|
//return RedirectToAction("Index", "Login");
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public async Task<IActionResult> Framework1() |
||||
|
{ |
||||
|
var info = await _authApi.AuthInfo(); |
||||
|
|
||||
|
if (Request.Cookies["_AMESCookie"] != null) |
||||
|
{ |
||||
|
var userID = ""; |
||||
|
HttpContext.Request.Cookies.TryGetValue("UserID", out userID); |
||||
|
if (userID != null) |
||||
|
{ |
||||
|
if (int.Parse(userID.ToString()) >= 0) |
||||
|
{ |
||||
|
int user_id = int.Parse(userID.ToString()); |
||||
|
var userRole = await _sysApi.GetUserRolesByUser(user_id); |
||||
|
|
||||
|
int role_id = userRole.Data.ToList()[0].RoleID; |
||||
|
|
||||
|
var userModule = await _sysApi.GetRoleModulesByRole(role_id, 0, 10); |
||||
|
var userProgram = await _sysApi.GetRoleProgramsByRole(role_id, 0, 10); |
||||
|
|
||||
|
string menuData = "<ul id = 'nav' class='layui-tab-item layui-show'>"; |
||||
|
|
||||
|
int i = 0; |
||||
|
foreach (var user_module in userModule.Data) |
||||
|
{ |
||||
|
int module_id = user_module.ModuleID; |
||||
|
i = i + 1; |
||||
|
if (i == 0) |
||||
|
{ |
||||
|
menuData = menuData + "<li class='open'>"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
menuData = menuData + "<li>"; |
||||
|
} |
||||
|
|
||||
|
if (user_module.Module != null) |
||||
|
{ |
||||
|
menuData = menuData + "<a class=''>"; |
||||
|
menuData = menuData + "<i class='fa fa-star fa-fw' style='color:#77B272;'></i><cite style='color:#77B272;'> " + user_module.Module.ModuleName + " </cite><i class='fa fa-angle-down fa-fw nav_right'></i>"; |
||||
|
menuData = menuData + "</a>"; |
||||
|
menuData = menuData + "<ul class='sub-menu' style='display: none;'>"; |
||||
|
} |
||||
|
|
||||
|
foreach (var user_program in userProgram.Data) |
||||
|
{ |
||||
|
if (user_program.Program != null) |
||||
|
{ |
||||
|
if (user_program.Program.ModuleID == module_id) |
||||
|
{ |
||||
|
menuData = menuData + "<li class='sub-tab' hg-title='" + user_program.Program.ProgramName + "' hg-nav='" + user_program.Program.ProgramPath + "'>"; |
||||
|
menuData = menuData + "<a><i class='fa fa-key fa-fw'></i><cite>" + user_program.Program.ProgramName + "</cite></a>"; |
||||
|
menuData = menuData + "</li>"; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
menuData = menuData + "</ul>"; |
||||
|
menuData = menuData + "</li>"; |
||||
|
} |
||||
|
menuData = menuData + "</ul>"; |
||||
|
|
||||
|
ViewData["MenuList"] = menuData; |
||||
|
|
||||
|
return View(); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return RedirectToAction("Index", "Login"); |
||||
|
} |
||||
|
} |
||||
|
return View(); |
||||
|
//return RedirectToAction("Index", "Login");
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 弹窗子窗口,儲存后刷新父级页面数据表格
|
||||
|
/// </summary>
|
||||
|
/// <param name="msg">弹窗提示信息</param>
|
||||
|
/// <param name="json">不为空时,只刷新本地数据</param>
|
||||
|
/// <returns></returns>
|
||||
|
public IActionResult Refresh(string msg = "儲存成功!", string json = "") |
||||
|
{ |
||||
|
ViewBag.Msg = msg; |
||||
|
ViewBag.Data = json; |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 彈子視窗關閉後,刷新母視窗整個頁面
|
||||
|
/// </summary>
|
||||
|
/// <param name="msg">Msg提示訊息</param>
|
||||
|
/// <returns></returns>
|
||||
|
public IActionResult WindowReload(string msg = "儲存成功!") |
||||
|
{ |
||||
|
ViewBag.Msg = msg; |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
public IActionResult Privacy() |
||||
|
{ |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] |
||||
|
public IActionResult Error() |
||||
|
{ |
||||
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,139 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using AMESCoreStudio.Web.Models; |
||||
|
using System.Security.Claims; |
||||
|
using Microsoft.AspNetCore.Authentication; |
||||
|
using Microsoft.AspNetCore.Authentication.Cookies; |
||||
|
using Newtonsoft.Json; |
||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Controllers |
||||
|
{ |
||||
|
public class LoginController : Controller |
||||
|
{ |
||||
|
private readonly ILogger<LoginController> _logger; |
||||
|
public readonly IAuth _authApi; |
||||
|
private readonly IConfiguration _config; |
||||
|
|
||||
|
public LoginController(ILogger<LoginController> logger, IAuth authApi) |
||||
|
{ |
||||
|
_logger = logger; |
||||
|
_authApi = authApi; |
||||
|
_config = new ConfigurationBuilder().SetBasePath(Environment.CurrentDirectory).AddJsonFile("appsettings.json").Build(); |
||||
|
} |
||||
|
|
||||
|
private void GetLanguageList() |
||||
|
{ |
||||
|
var LanguageList = new List<SelectListItem>(); |
||||
|
LanguageList.Add(new SelectListItem("繁體中文", "zh-tw")); |
||||
|
LanguageList.Add(new SelectListItem("英文", "en-us")); |
||||
|
ViewBag.LanguageList = LanguageList; |
||||
|
} |
||||
|
|
||||
|
public IActionResult Index() |
||||
|
{ |
||||
|
ViewBag.VersionCode = _config["VersionCode"]; |
||||
|
|
||||
|
GetLanguageList(); |
||||
|
|
||||
|
var loginNo = TempData["loginNo"]; |
||||
|
if (loginNo != null) |
||||
|
return View(new LoginViewModel() { LoginNo = loginNo.ToString() }); |
||||
|
return View(new LoginViewModel()); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="vModel"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
[ValidateAntiForgeryToken] |
||||
|
public async Task<IActionResult> Index(LoginViewModel vModel) |
||||
|
{ |
||||
|
if (ModelState.IsValid) |
||||
|
{ |
||||
|
var model = new LoginDTO(); |
||||
|
model.LoginNo = vModel.LoginNo; |
||||
|
model.LoginPassword = vModel.LoginPassword; |
||||
|
model.Platform = EnumPlatform.Web; |
||||
|
var result = await _authApi.Login(JsonConvert.SerializeObject(model)); |
||||
|
if (result.UserID >= 0) |
||||
|
{ |
||||
|
SaveUserCookie(result); //登录成功
|
||||
|
switch (vModel.Language) |
||||
|
{ |
||||
|
case "zh-tw": |
||||
|
HttpContext.Response.Cookies.Append(".AspNetCore.Culture", "c=zh-TW|uic=zh-TW"); |
||||
|
break; |
||||
|
case "zh-cn": |
||||
|
HttpContext.Response.Cookies.Append(".AspNetCore.Culture", "c=zh-CN|uic=zh-CN"); |
||||
|
break; |
||||
|
case "en-us": |
||||
|
HttpContext.Response.Cookies.Append(".AspNetCore.Culture", "c=en-US|uic=en-US"); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ModelState.AddModelError("error", result.Msg); |
||||
|
} |
||||
|
} |
||||
|
return View(vModel); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public async Task<IActionResult> LoginOut() |
||||
|
{ |
||||
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); |
||||
|
return RedirectToAction("Index", "Login"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ASP.NET CORE Cookie 儲存身份信息
|
||||
|
/// </summary>
|
||||
|
private void SaveUserCookie(LoginDTO login) |
||||
|
{ |
||||
|
//创建 Claim 对象将用户信息存储在 Claim 类型的字符串键值对中,
|
||||
|
//将 Claim 对象传入 ClaimsIdentity 中,用来构造一个 ClaimsIdentity 对象
|
||||
|
var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme); |
||||
|
|
||||
|
identity.AddClaim(new Claim("UserID", login.UserID.ToString(), ClaimValueTypes.Integer32)); |
||||
|
identity.AddClaim(new Claim("LoginNo", login.LoginNo, ClaimValueTypes.String)); |
||||
|
|
||||
|
if (Request.Cookies["_AMESCookie"] != null) |
||||
|
{ |
||||
|
HttpContext.Response.Cookies.Append("UserID", login.UserID.ToString()); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
HttpContext.Response.Cookies.Append("UserID", login.UserID.ToString()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//调用 HttpContext.SignInAsync 方法,传入上面创建的 ClaimsPrincipal 对象,完成用户登录
|
||||
|
|
||||
|
HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, new ClaimsPrincipal(identity), new AuthenticationProperties |
||||
|
{ |
||||
|
//获取或设置身份验证会话是否跨多个持久化要求
|
||||
|
IsPersistent = false, |
||||
|
ExpiresUtc = null, |
||||
|
//AllowRefresh = true,
|
||||
|
RedirectUri = "/Home/Framework" |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//如果当前 Http 请求本来登录了用户 A,现在调用 HttpContext.SignInAsync 方法登录用户 B,那么相当于注销用户 A,登录用户 B
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,330 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using AMESCoreStudio.Web.Models; |
||||
|
using Newtonsoft.Json; |
||||
|
using Newtonsoft.Json.Linq; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using System.Collections.Generic; |
||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.Web.ViewModels; |
||||
|
using AMESCoreStudio.Web.ViewModels.PCS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
using System.Linq; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using System; |
||||
|
using System.IO; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.AspNetCore.Hosting; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using AspNetCore.Reporting; |
||||
|
using System.Text.Encodings; |
||||
|
using AMESCoreStudio.WebApi.Enum; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Controllers |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// PCB管理模組
|
||||
|
/// </summary>
|
||||
|
public class PCBController : Controller |
||||
|
{ |
||||
|
private readonly ILogger<PCBController> _logger; |
||||
|
public readonly IPCB _pcbApi; |
||||
|
private readonly IWebHostEnvironment _env; |
||||
|
public readonly IPCS _pcsApi; |
||||
|
public readonly IBLL _bllApi; |
||||
|
public PCBController(ILogger<PCBController> logger, IPCB pcbApi, IWebHostEnvironment env, IPCS pcsApi, IBLL bllApi) |
||||
|
{ |
||||
|
_logger = logger; |
||||
|
_pcbApi = pcbApi; |
||||
|
_env = env; |
||||
|
_pcsApi = pcsApi; |
||||
|
_bllApi = bllApi; |
||||
|
} |
||||
|
|
||||
|
//#region 下拉選單
|
||||
|
/// <summary>
|
||||
|
/// SOP_Type
|
||||
|
/// </summary>
|
||||
|
/// <param name="SelectedValue"></param>
|
||||
|
private void GetSteelPlateStatusSelect(string SelectedValue = null) |
||||
|
{ |
||||
|
List<string> values = new List<string>(); |
||||
|
if (SelectedValue != null) |
||||
|
{ |
||||
|
values = SelectedValue.Split(',').ToList(); |
||||
|
} |
||||
|
var q = Enum.GetValues(typeof(EnumPCB.EnumSteelPlateStatus)).Cast<EnumPCB.EnumSteelPlateStatus>() |
||||
|
.Select(s => new SelectListItem |
||||
|
{ |
||||
|
Text = EnumPCB.GetDisplayName(s).ToString(), |
||||
|
Value = s.ToString() |
||||
|
}).ToList(); |
||||
|
|
||||
|
ViewBag.GetSteelPlateStatusSelect = q; |
||||
|
} |
||||
|
//#endregion
|
||||
|
|
||||
|
#region PCB013 鋼板量測紀錄
|
||||
|
public ActionResult PCB013() |
||||
|
{ |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
public async Task<IActionResult> PCB013QueryAsync(string steelPlateNo, string pcbPartNo |
||||
|
, string side, string status, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
IResultModel<SteelPlateInfoDto> result = await _pcbApi.GetSteelPlateInfoQuery(steelPlateNo: steelPlateNo, pcbPartNo: pcbPartNo |
||||
|
, side: side, status: status, page: page, limit: 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 }); |
||||
|
} |
||||
|
|
||||
|
//新增頁面
|
||||
|
public IActionResult PCB013C() |
||||
|
{ |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
//修改页面
|
||||
|
[HttpGet] |
||||
|
public async Task<IActionResult> PCB013U(int id) |
||||
|
{ |
||||
|
var result = await _pcbApi.GetSteelPlateInfo(id); |
||||
|
return View(result); |
||||
|
} |
||||
|
|
||||
|
//頁面提交,id=0 添加,id>0 修改
|
||||
|
[HttpPost] |
||||
|
public async Task<IActionResult> PCB013Async(SteelPlateInfo model) |
||||
|
{ |
||||
|
if (ModelState.IsValid) |
||||
|
{ |
||||
|
IResultModel result; |
||||
|
if (model.SteelPlateID == 0) |
||||
|
{ |
||||
|
model.CreateUserID = GetLogInUserID(); |
||||
|
model.CreateDate = DateTime.Now; |
||||
|
model.UpdateUserID = GetLogInUserID(); |
||||
|
model.UpdateDate = DateTime.Now; |
||||
|
result = await _pcbApi.PostSteelPlateInfo(JsonConvert.SerializeObject(model)); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
model.UpdateUserID = GetLogInUserID(); |
||||
|
model.UpdateDate = DateTime.Now; |
||||
|
result = await _pcbApi.PutSteelPlateInfo(JsonConvert.SerializeObject(model)); |
||||
|
} |
||||
|
|
||||
|
if (result.Success) |
||||
|
{ |
||||
|
var _msg = model.SteelPlateID == 0 ? "新增成功!" : "修改成功!"; |
||||
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
|
||||
|
ModelState.AddModelError("error", result.Msg); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (model.SteelPlateID == 0) |
||||
|
{ |
||||
|
return View("PCB013C", model); |
||||
|
} |
||||
|
return View("PCB013U", model); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public IActionResult PCB013A(int steelPlateID, string steelPlateNo) |
||||
|
{ |
||||
|
GetSteelPlateStatusSelect(); |
||||
|
ViewBag.steelPlateID = steelPlateID; |
||||
|
ViewBag.steelPlateNo = steelPlateNo; |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鋼板量測記錄
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
public async Task<IActionResult> PCB013ASave(SteelPlateMeasure model) |
||||
|
{ |
||||
|
|
||||
|
IResultModel result; |
||||
|
// 量測基準 35 小於通知寄信
|
||||
|
if (double.Parse(model.Tension1) < 35 || double.Parse(model.Tension2) < 35 || double.Parse(model.Tension3) < 35 || |
||||
|
double.Parse(model.Tension4) < 35 || double.Parse(model.Tension5) < 35) |
||||
|
{ |
||||
|
model.MeasureResult = "F"; |
||||
|
//string Subject = $"FQC自動派送發信 FQC單號:{inhouseNo} 料號:{Material}";
|
||||
|
//string Body = $@"FQC單號:{inhouseNo} 料號:{Material} <br/>
|
||||
|
// 檢驗結果為:{Result}";
|
||||
|
|
||||
|
//await _bllApi.PostToMail(Subject, Body, string.Join(',', MailGroup), "", false, path);
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
model.MeasureResult = "P"; |
||||
|
} |
||||
|
model.CreateUserID = GetLogInUserID(); |
||||
|
model.CreateDate = DateTime.Now; |
||||
|
model.UpdateUserID = GetLogInUserID(); |
||||
|
model.UpdateDate = DateTime.Now; |
||||
|
result = await _pcbApi.PostSteelPlateMeasure(JsonConvert.SerializeObject(model)); |
||||
|
|
||||
|
|
||||
|
if (result.Success) |
||||
|
{ |
||||
|
var _msg = "新增量測記錄成功!"; |
||||
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
|
||||
|
ModelState.AddModelError("error", result.Msg); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (model.SteelPlateID == 0) |
||||
|
{ |
||||
|
return View("PCB013A", model); |
||||
|
} |
||||
|
return View("PCB013A", model); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鋼板量測紀錄 View
|
||||
|
/// </summary>
|
||||
|
/// <param name="steelPlateID"></param>
|
||||
|
/// <param name="steelPlateNo"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public IActionResult PCB013V(int steelPlateID, string steelPlateNo) |
||||
|
{ |
||||
|
ViewBag.steelPlateID = steelPlateID; |
||||
|
ViewBag.steelPlateNo = steelPlateNo; |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
[HttpGet] |
||||
|
public async Task<IActionResult> PCB013VQuery(int steelPlateID, string steelPlateNo, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
var result = await _pcbApi.GetSteelPlateMeasureBySteelPlateID(steelPlateID, page, limit); |
||||
|
|
||||
|
if (result.DataTotal > 0) |
||||
|
{ |
||||
|
return Json(new Table() { code = 0, msg = "", data = result.Data, count = result.DataTotal }); |
||||
|
} |
||||
|
|
||||
|
return Json(new Table() { count = 0, data = null }); |
||||
|
} |
||||
|
#endregion
|
||||
|
|
||||
|
#region PCB014 錫膏使用管控
|
||||
|
public ActionResult PCB014() |
||||
|
{ |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
public async Task<IActionResult> PCB014QueryAsync(string solderPasteNo, string status, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
IResultModel<SolderPasteInfoDto> result = await _pcbApi.GetSolderPasteInfoQuery(solderPasteNo: solderPasteNo, status: status, page: page, limit: 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 }); |
||||
|
} |
||||
|
|
||||
|
//新增頁面
|
||||
|
public IActionResult PCB014C() |
||||
|
{ |
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
//修改页面
|
||||
|
[HttpGet] |
||||
|
public async Task<IActionResult> PCB014U(int id) |
||||
|
{ |
||||
|
var result = await _pcbApi.GetSolderPasteInfo(id); |
||||
|
return View(result); |
||||
|
} |
||||
|
|
||||
|
//頁面提交,id=0 添加,id>0 修改
|
||||
|
[HttpPost] |
||||
|
public async Task<IActionResult> PCB014Async(SolderPasteInfo model) |
||||
|
{ |
||||
|
// 日期判斷
|
||||
|
if (model.EffectiveDate < model.ManufactoringDate) |
||||
|
{ |
||||
|
ModelState.AddModelError("error", "有效日期不能小於製造日期"); |
||||
|
} |
||||
|
else if (ModelState.IsValid) |
||||
|
{ |
||||
|
IResultModel result; |
||||
|
|
||||
|
if (model.SolderPasteID == 0) |
||||
|
{ |
||||
|
model.CreateUserID = GetLogInUserID(); |
||||
|
model.CreateDate = DateTime.Now; |
||||
|
model.UpdateUserID = GetLogInUserID(); |
||||
|
model.UpdateDate = DateTime.Now; |
||||
|
result = await _pcbApi.PostSolderPasteInfo(JsonConvert.SerializeObject(model)); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
model.UpdateUserID = GetLogInUserID(); |
||||
|
model.UpdateDate = DateTime.Now; |
||||
|
result = await _pcbApi.PutSolderPasteInfo(JsonConvert.SerializeObject(model)); |
||||
|
} |
||||
|
|
||||
|
if (result.Success) |
||||
|
{ |
||||
|
var _msg = model.SolderPasteID == 0 ? "新增成功!" : "修改成功!"; |
||||
|
return RedirectToAction("Refresh", "Home", new { msg = _msg }); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ModelState.AddModelError("error", result.Msg); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (model.SolderPasteID == 0) |
||||
|
{ |
||||
|
return View("PCB014C", model); |
||||
|
} |
||||
|
return View("PCB014U", model); |
||||
|
} |
||||
|
#endregion
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 登入UserID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
public int GetLogInUserID() |
||||
|
{ |
||||
|
int user_id = -1; |
||||
|
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; |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,443 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.AspNetCore.Hosting; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Collections.Generic; |
||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using System.IO; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using Newtonsoft.Json; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
using AMESCoreStudio.Web.Models; |
||||
|
using Newtonsoft.Json.Linq; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Controllers |
||||
|
{ |
||||
|
public class PDSController : Controller |
||||
|
{ |
||||
|
private readonly ILogger<PDSController> _logger; |
||||
|
public readonly IBAS _basApi; |
||||
|
public readonly IPCS _pcsApi; |
||||
|
public readonly IPDS _pdsApi; |
||||
|
|
||||
|
public PDSController(ILogger<PDSController> logger, IPCS pcsApi, IBAS basApi,IPDS pdsApi) |
||||
|
{ |
||||
|
_logger = logger; |
||||
|
_pcsApi = pcsApi; |
||||
|
_basApi = basApi; |
||||
|
_pdsApi = pdsApi; |
||||
|
} |
||||
|
|
||||
|
private async Task GetUnitList() |
||||
|
{ |
||||
|
var result = await _basApi.GetFactoryUnits(); |
||||
|
|
||||
|
var UnitItems = new List<SelectListItem>(); |
||||
|
for (int i = 0; i < result.Count; i++) |
||||
|
{ |
||||
|
UnitItems.Add(new SelectListItem(result[i].UnitName, result[i].UnitNo.ToString())); |
||||
|
} |
||||
|
ViewBag.UnitList = UnitItems; |
||||
|
} |
||||
|
|
||||
|
private async Task GetLineInfoList() |
||||
|
{ |
||||
|
var result = await _basApi.GetLineInfoes(); |
||||
|
|
||||
|
var LineItems = new List<SelectListItem>(); |
||||
|
for (int i = 0; i < result.Count; i++) |
||||
|
{ |
||||
|
LineItems.Add(new SelectListItem(result[i].LineDesc, result[i].LineID.ToString())); |
||||
|
} |
||||
|
ViewBag.LineList = LineItems; |
||||
|
} |
||||
|
|
||||
|
private async Task GetFlowRuleList() |
||||
|
{ |
||||
|
var result = await _basApi.GetFlowRules(); |
||||
|
|
||||
|
var FlowRuleItems = new List<SelectListItem>(); |
||||
|
for (int i = 0; i < result.Count; i++) |
||||
|
{ |
||||
|
FlowRuleItems.Add(new SelectListItem(result[i].UnitNo + result[i].FlowRuleName, result[i].FlowRuleID.ToString())); |
||||
|
} |
||||
|
ViewBag.FlowRuleList = FlowRuleItems; |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public async Task<JsonResult> GetUnitLineJson(string unit_no) |
||||
|
{ |
||||
|
var result = await _basApi.GetLineInfoByUnit(unit_no); |
||||
|
|
||||
|
var item = new List<SelectListItem>(); |
||||
|
|
||||
|
for (int i = 0; i < result.Count; i++) |
||||
|
{ |
||||
|
item.Add(new SelectListItem(result[i].LineDesc, result[i].LineID.ToString())); |
||||
|
} |
||||
|
|
||||
|
if (item.Count == 0) |
||||
|
{ |
||||
|
item.Add(new SelectListItem("全部", "0")); |
||||
|
} |
||||
|
|
||||
|
//将数据Json化并传到前台视图
|
||||
|
return Json(new { data = item }); |
||||
|
} |
||||
|
|
||||
|
public async Task<IActionResult> PDS003() |
||||
|
{ |
||||
|
await GetUnitList(); |
||||
|
await GetLineInfoList(); |
||||
|
await GetFlowRuleList(); |
||||
|
|
||||
|
return View(); |
||||
|
} |
||||
|
|
||||
|
[HttpPost] |
||||
|
public async Task<IActionResult> PDS003SaveAsync(string unitNo,int lineId,int flowId,IFormFile formFile) |
||||
|
{ |
||||
|
IResultModel result1; |
||||
|
IResultModel<dynamic> result2; |
||||
|
|
||||
|
var userID = ""; |
||||
|
HttpContext.Request.Cookies.TryGetValue("UserID", out userID); |
||||
|
int user_id = 0; |
||||
|
if (userID != null) |
||||
|
{ |
||||
|
if (int.Parse(userID.ToString()) >= 0) |
||||
|
{ |
||||
|
user_id = int.Parse(userID.ToString()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
await GetUnitList(); |
||||
|
await GetLineInfoList(); |
||||
|
await GetFlowRuleList(); |
||||
|
|
||||
|
var file = formFile; |
||||
|
var msg = ""; |
||||
|
|
||||
|
if (unitNo == "*") |
||||
|
{ |
||||
|
msg += "未選擇製程單位"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
if (lineId == 0) |
||||
|
{ |
||||
|
msg += "未選擇線別"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
if (flowId == 0) |
||||
|
{ |
||||
|
msg += "未選擇流程"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
if (formFile == null) |
||||
|
{ |
||||
|
msg += "未選取檔案或檔案上傳失敗"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
if (Path.GetExtension(file.FileName) != ".xlsx") |
||||
|
{ |
||||
|
msg += "請使用Excel 2007(.xlsx)格式"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
if (file.Length > 0) |
||||
|
{ |
||||
|
string[] fileTitle = file.FileName.Split("_"); |
||||
|
|
||||
|
string wipNO = fileTitle[2]; |
||||
|
string itemNO = fileTitle[3]; |
||||
|
int playQty = 0; |
||||
|
int.TryParse(fileTitle[4].Replace("pc", ""), out playQty); |
||||
|
int wipID = -1; |
||||
|
bool existFlag = false; |
||||
|
ViewBag.WipNo = wipNO; |
||||
|
|
||||
|
//虛擬工單
|
||||
|
result2 = await _pcsApi.GetWipInfo4PDS003(wipNO); |
||||
|
if (result2.DataTotal == 0) |
||||
|
{ |
||||
|
WipInfo wip_info = new WipInfo(); |
||||
|
wip_info.WipNO = wipNO; |
||||
|
wip_info.PlanQTY = playQty; |
||||
|
wip_info.LineID = lineId; |
||||
|
wip_info.UnitNO = unitNo; |
||||
|
wip_info.FlowRuleID = flowId; |
||||
|
wip_info.StatusNO = "A"; |
||||
|
wip_info.WipTimes = 1; |
||||
|
wip_info.Werks = "YSOS"; |
||||
|
wip_info.WipType = "S"; |
||||
|
wip_info.CustomerType = -1; |
||||
|
wip_info.CreateUserID = user_id; |
||||
|
wip_info.CreateDate = System.DateTime.Now; |
||||
|
|
||||
|
result1 = await _pcsApi.PostWipInfo(JsonConvert.SerializeObject(wip_info)); |
||||
|
|
||||
|
if (!result1.Success) |
||||
|
{ |
||||
|
msg += "虛擬工單建立WIP_INFO失敗!!!原因:" + result1.Msg + "\r\n"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
int.TryParse(result1.Msg, out wipID); |
||||
|
|
||||
|
//WIP_ATT
|
||||
|
WipAtt wip_att = new WipAtt(); |
||||
|
wip_att.WipNO = wipNO; |
||||
|
wip_att.ItemNO = itemNO; |
||||
|
wip_att.CreateUserID = user_id; |
||||
|
wip_att.CreateDate = System.DateTime.Now; |
||||
|
|
||||
|
result1 = await _pcsApi.PostWipAtt(JsonConvert.SerializeObject(wip_att)); |
||||
|
if (!result1.Success) |
||||
|
{ |
||||
|
msg += "虛擬工單建立WIP_ATT失敗!!!原因:" + result1.Msg + "\r\n"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
//開線
|
||||
|
var line_info = await _basApi.GetLineInfo(lineId); |
||||
|
LineInfo line = new LineInfo(); |
||||
|
line.LineID = lineId; |
||||
|
line.DeptID = line_info[0].DeptID; |
||||
|
line.LineDesc = line_info[0].LineDesc; |
||||
|
line.Story = line_info[0].Story; |
||||
|
line.UnitNo = line_info[0].UnitNo; |
||||
|
line.WipNo = wipID; |
||||
|
line.StatusNo = line_info[0].StatusNo; |
||||
|
line.CreateUserId = line_info[0].CreateUserId; |
||||
|
line.CreateDate = line_info[0].CreateDate; |
||||
|
line.UpdateDate = line_info[0].UpdateDate; |
||||
|
|
||||
|
result1 = await _basApi.PutLineInfo(lineId, JsonConvert.SerializeObject(line)); |
||||
|
if (!result1.Success) |
||||
|
{ |
||||
|
msg += "虛擬工單開線失敗!!!原因:" + result1.Msg + "\r\n"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
existFlag = true; |
||||
|
|
||||
|
foreach (var item in result2.Data) |
||||
|
{ |
||||
|
JObject jo = JObject.Parse(item.ToString()); |
||||
|
wipID = int.Parse(jo["wipID"].ToString()); |
||||
|
lineId = int.Parse(jo["lineID"].ToString()); |
||||
|
flowId = int.Parse(jo["flowRuleID"].ToString()); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
using (var ms = new MemoryStream()) |
||||
|
{ |
||||
|
file.CopyTo(ms); |
||||
|
var fileBytes = ms.ToArray(); |
||||
|
string s = System.Convert.ToBase64String(fileBytes); |
||||
|
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook(ms); |
||||
|
|
||||
|
if (wb.Worksheets.Count > 1) |
||||
|
{ |
||||
|
msg = "工作表大於一頁"; |
||||
|
ModelState.AddModelError("error", msg); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
// 讀取第一個 Sheet
|
||||
|
ClosedXML.Excel.IXLWorksheet worksheet = wb.Worksheet(1); |
||||
|
|
||||
|
// 定義資料起始/結束 Cell
|
||||
|
var firstCell = worksheet.FirstCellUsed(); |
||||
|
var lastCell = worksheet.LastCellUsed(); |
||||
|
var firstCol1 = worksheet.Cell(1, 1).Value.ToString(); |
||||
|
var firstCol2 = worksheet.Cell(1, 2).Value.ToString(); |
||||
|
var firstCol3 = worksheet.Cell(1, 3).Value.ToString(); |
||||
|
var firstCol4 = worksheet.Cell(1, 4).Value.ToString(); |
||||
|
var firstCol5 = worksheet.Cell(1, 5).Value.ToString(); |
||||
|
var firstCol6 = worksheet.Cell(1, 6).Value.ToString(); |
||||
|
var erroCol = ""; |
||||
|
|
||||
|
|
||||
|
if (lastCell.Address.ColumnNumber != 6) |
||||
|
erroCol += "請確認欄位是否正確,總數應為6欄\r\n"; |
||||
|
|
||||
|
if (firstCol1 != "DATE") |
||||
|
erroCol += "第一個欄位標題應該為DATE\r\n"; |
||||
|
|
||||
|
if (firstCol2 != "ITEM") |
||||
|
erroCol += "第二個欄位標題應該為ITEM\r\n"; |
||||
|
|
||||
|
if (firstCol3 != "SN") |
||||
|
erroCol += "第三個欄位標題應該為SN\r\n"; |
||||
|
|
||||
|
if (firstCol4 != "MB") |
||||
|
erroCol += "第四個欄位標題應該為MB\r\n"; |
||||
|
|
||||
|
if (firstCol5 != "MAC") |
||||
|
erroCol += "第五個欄位標題應該為MAC\r\n"; |
||||
|
|
||||
|
if (firstCol6 != "Panel") |
||||
|
erroCol += "第六個欄位標題應該為Panel\r\n"; |
||||
|
|
||||
|
var resultMsg = ""; |
||||
|
var count = 0; |
||||
|
|
||||
|
for (int i = 2; i <= lastCell.Address.RowNumber; i++) |
||||
|
{ |
||||
|
var Cell1 = worksheet.Cell(i, 1).Value.ToString().ToUpper(); |
||||
|
var Cell2 = worksheet.Cell(i, 2).Value.ToString().ToUpper(); |
||||
|
var Cell3 = worksheet.Cell(i, 3).Value.ToString().ToUpper(); |
||||
|
var Cell4 = worksheet.Cell(i, 4).Value.ToString().ToUpper(); |
||||
|
var Cell5 = worksheet.Cell(i, 5).Value.ToString().ToUpper(); |
||||
|
var Cell6 = worksheet.Cell(i, 6).Value.ToString().ToUpper(); |
||||
|
|
||||
|
if (string.IsNullOrEmpty(Cell1) || string.IsNullOrEmpty(Cell2) || string.IsNullOrEmpty(Cell3) || string.IsNullOrEmpty(Cell4) || string.IsNullOrEmpty(Cell5) || string.IsNullOrEmpty(Cell6)) |
||||
|
{ |
||||
|
resultMsg += "第" + i + "列有缺少資料!!\r\n"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (!existFlag) |
||||
|
{ |
||||
|
//設定工單條碼起訖
|
||||
|
WipBarcode wip_barcode = new WipBarcode(); |
||||
|
wip_barcode.WipNO = wipNO; |
||||
|
wip_barcode.StartNO = Cell3; |
||||
|
wip_barcode.EndNO = Cell3; |
||||
|
wip_barcode.UnitNO = unitNo; |
||||
|
wip_barcode.WipID = wipID; |
||||
|
|
||||
|
result1 = await _pcsApi.PostWipBarcode(JsonConvert.SerializeObject(wip_barcode)); |
||||
|
if (result1.Success) |
||||
|
{ |
||||
|
resultMsg += "第" + i + "行:設定工單起訖成功!!!" + "\r\n"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
resultMsg += "第" + i + "行:設定工單起訖失敗!!!原因:" + result1.Msg + "\r\n"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//获取站别
|
||||
|
var rule_station = await _basApi.GetRuleStationsByFlow(flowId); |
||||
|
int ruleStationID = rule_station[0].RuleStationID; |
||||
|
int stationID = rule_station[0].StationID; |
||||
|
//自動過站
|
||||
|
var barCode = new BarCodeCheckDto |
||||
|
{ |
||||
|
wipNo = wipNO, |
||||
|
barcode = Cell3, |
||||
|
barcodeType = "S", |
||||
|
stationID = stationID, |
||||
|
line = lineId, |
||||
|
unitNo = unitNo, |
||||
|
inputItems = null, |
||||
|
userID = user_id |
||||
|
}; |
||||
|
|
||||
|
var barcode_result = new ResultModel<string>(); |
||||
|
try |
||||
|
{ |
||||
|
barcode_result = await _pcsApi.PassIngByCheck(JsonConvert.SerializeObject(barCode)); |
||||
|
} |
||||
|
catch { } |
||||
|
|
||||
|
if (barcode_result.Success) |
||||
|
{ |
||||
|
resultMsg += "第" + i + "行:資料過站成功!!!" + "\r\n"; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
resultMsg += "第" + i + "行:資料過站失敗!!!原因:" + barcode_result.Msg + "\r\n"; |
||||
|
} |
||||
|
|
||||
|
//儲存資料
|
||||
|
|
||||
|
SNKeyPart snKeyPart = new SNKeyPart(); |
||||
|
snKeyPart.StockInNo = fileTitle[2]; |
||||
|
snKeyPart.StockInPn = fileTitle[3]; |
||||
|
snKeyPart.KPDate = System.DateTime.Parse(Cell1); |
||||
|
snKeyPart.KPItem = int.Parse(Cell2); |
||||
|
snKeyPart.KPSn = Cell3; |
||||
|
snKeyPart.KPMb = Cell4; |
||||
|
snKeyPart.KPMac = Cell5; |
||||
|
snKeyPart.KPPanel = Cell6; |
||||
|
snKeyPart.CreateUserID = user_id; |
||||
|
snKeyPart.CreateDate = System.DateTime.Now; |
||||
|
|
||||
|
result1 = await _pdsApi.PostSNKeyPart(JsonConvert.SerializeObject(snKeyPart)); |
||||
|
|
||||
|
if (!result1.Success) |
||||
|
{ |
||||
|
resultMsg += "第" + i + "行:資料寫入失敗!!!原因:" + result1.Msg + "\r\n"; |
||||
|
} |
||||
|
else |
||||
|
count++; |
||||
|
|
||||
|
/* |
||||
|
if (Cell1.Length > 20) |
||||
|
erroCol += "第" + i + "列DATE資料過長!!\r\n"; |
||||
|
*/ |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
if (resultMsg != "") |
||||
|
{ |
||||
|
ModelState.AddModelError("error", resultMsg); |
||||
|
return View("PDS003"); |
||||
|
|
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ModelState.AddModelError("error", "資料寫入成功!!"); |
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
return View("PDS003"); |
||||
|
} |
||||
|
|
||||
|
[ResponseCache(Duration = 0)] |
||||
|
[HttpGet] |
||||
|
public async Task<IActionResult> GetSNKeyPartByStockInNo(string no, int page = 0, int limit = 10) |
||||
|
{ |
||||
|
var result_total = await _pdsApi.GetSNKeyPartByStockInNo(no, 0, limit); |
||||
|
var result = await _pdsApi.GetSNKeyPartByStockInNo(no, page, limit); |
||||
|
|
||||
|
if (result.Count > 0) |
||||
|
{ |
||||
|
return Json(new Table() { code = 0, msg = "", data = result, count = result.Count }); |
||||
|
} |
||||
|
|
||||
|
return Json(new Table() { count = 0, data = null }); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,44 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AspNetCore.Reporting; |
||||
|
using Microsoft.AspNetCore.Hosting; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.Data; |
||||
|
using Oracle.EntityFrameworkCore; |
||||
|
using Oracle.ManagedDataAccess.Client; |
||||
|
|
||||
|
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Controllers |
||||
|
{ |
||||
|
public class RPTController : Controller |
||||
|
{ |
||||
|
private readonly IWebHostEnvironment environment = null; |
||||
|
public readonly IPCS _pcsApi; |
||||
|
|
||||
|
public RPTController(IWebHostEnvironment environment,IPCS pcsApi) |
||||
|
{ |
||||
|
this.environment = environment; |
||||
|
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); |
||||
|
_pcsApi = pcsApi; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public async Task<IActionResult> RPT001() |
||||
|
{ |
||||
|
string mimeType = ""; |
||||
|
int extension = 1; |
||||
|
var path = $"{this.environment.WebRootPath}\\Reports\\TEST02.rdlc"; |
||||
|
LocalReport localReport = new LocalReport(path); |
||||
|
Dictionary<string, string> param = new Dictionary<string, string>(); |
||||
|
//param.Add("rp1", "Hello RDLC Report!");
|
||||
|
var wip_station = await _pcsApi.GetWipStation(); |
||||
|
|
||||
|
localReport.AddDataSource("WIP_STATION", wip_station); |
||||
|
|
||||
|
|
||||
|
var result = localReport.Execute(RenderType.Pdf, extension, param, mimeType); |
||||
|
return File(result.MainStream, "application/pdf"); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,225 @@ |
|||||
|
using System.ComponentModel; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Reflection; |
||||
|
using System.Collections.Generic; |
||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public class Enums |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 列印方式
|
||||
|
/// </summary>
|
||||
|
public enum EnumPrintMode |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// ON Line列印
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "ON Line列印")] |
||||
|
ON = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// OFF Line列印
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "OFF Line列印")] |
||||
|
OFF = 2 |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 認證Logo
|
||||
|
/// </summary>
|
||||
|
public enum EnumApproveLogo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// CE
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "CE")] |
||||
|
CE, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KCC
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "KCC")] |
||||
|
KCC, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FCC
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "FCC")] |
||||
|
FCC, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ROHS
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "ROHS")] |
||||
|
ROHS, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// UL
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "UL")] |
||||
|
UL, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WEEE
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "WEEE")] |
||||
|
WEEE, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// MADE IN
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "MADE IN")] |
||||
|
MADE_IN, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 皆無
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "皆無")] |
||||
|
N |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 公司Logo
|
||||
|
/// </summary>
|
||||
|
public enum EnumCompanyLogo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// A VALUE
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "A VALUE")] |
||||
|
A, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 無
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "無")] |
||||
|
N |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipAttr
|
||||
|
/// </summary>
|
||||
|
public enum EnumWipAttr |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 正常工單
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "正常工單")] |
||||
|
A, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 非標96工單
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "非標96工單-非標單據:人員輸入")] |
||||
|
B, |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單資訊 系統工程資訊 Power mode
|
||||
|
/// </summary>
|
||||
|
public enum EnumWipSystemPMType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// H/W ATX
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "H/W ATX")] |
||||
|
A = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// H/W ATX,S/W AT
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "H/W ATX,S/W AT")] |
||||
|
B = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// H/W AT
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "H/W AT")] |
||||
|
C = 3, |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單資訊 系統工程資訊 Type
|
||||
|
/// </summary>
|
||||
|
public enum EnumWipSystemType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// N/A
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "N/A")] |
||||
|
A = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Check
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Check")] |
||||
|
B = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Program
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Program")] |
||||
|
C = 3, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 備註說明
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "備註說明")] |
||||
|
D = 4, |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SOP Type
|
||||
|
/// </summary>
|
||||
|
public enum EnumWipSopType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// SOP
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "SOP")] |
||||
|
A = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 技術轉移
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "技術轉移")] |
||||
|
B = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// N/A
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "N/A")] |
||||
|
C = 3, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 暫時文件
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "暫時文件")] |
||||
|
D = 4, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// REWORK
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "REWORK")] |
||||
|
E = 5, |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Get Enum Display
|
||||
|
/// </summary>
|
||||
|
/// <param name="enumValue"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static string GetDisplayName(Enum enumValue) |
||||
|
{ |
||||
|
return enumValue.GetType()? |
||||
|
.GetMember(enumValue.ToString())?.First()? |
||||
|
.GetCustomAttribute<DisplayAttribute>()? |
||||
|
.Name; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,119 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using Microsoft.AspNetCore.Mvc.ViewFeatures; |
||||
|
using Microsoft.AspNetCore.Razor.TagHelpers; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Helper |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 复选框
|
||||
|
/// </summary>
|
||||
|
/// <remarks>
|
||||
|
/// 当Items为空时显示单个,且选择后值为true
|
||||
|
/// </remarks>
|
||||
|
[HtmlTargetElement(CheckboxTagName)] |
||||
|
public class CheckBoxTagHelper : TagHelper |
||||
|
{ |
||||
|
private const string CheckboxTagName = "cl-checkbox"; |
||||
|
private const string ForAttributeName = "asp-for"; |
||||
|
private const string ItemsAttributeName = "asp-items"; |
||||
|
private const string SkinAttributeName = "asp-skin"; |
||||
|
private const string SignleTitleAttributeName = "asp-title"; |
||||
|
protected IHtmlGenerator Generator { get; } |
||||
|
public CheckBoxTagHelper(IHtmlGenerator generator) |
||||
|
{ |
||||
|
Generator = generator; |
||||
|
} |
||||
|
|
||||
|
[ViewContext] |
||||
|
public ViewContext ViewContext { get; set; } |
||||
|
|
||||
|
[HtmlAttributeName(ForAttributeName)] |
||||
|
public ModelExpression For { get; set; } |
||||
|
|
||||
|
[HtmlAttributeName(ItemsAttributeName)] |
||||
|
public IEnumerable<SelectListItem> Items { get; set; } |
||||
|
|
||||
|
[HtmlAttributeName(SkinAttributeName)] |
||||
|
public CheckboxSkin Skin { get; set; } = CheckboxSkin.defult; |
||||
|
|
||||
|
[HtmlAttributeName(SignleTitleAttributeName)] |
||||
|
public string SignleTitle { get; set; } |
||||
|
|
||||
|
public override void Process(TagHelperContext context, TagHelperOutput output) |
||||
|
{ |
||||
|
//获取绑定的生成的Name属性
|
||||
|
string inputName = ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(For?.Name); |
||||
|
string skin = string.Empty; |
||||
|
#region 风格
|
||||
|
switch (Skin) |
||||
|
{ |
||||
|
case CheckboxSkin.defult: |
||||
|
skin = ""; |
||||
|
break; |
||||
|
case CheckboxSkin.primary: |
||||
|
skin = "primary"; |
||||
|
break; |
||||
|
} |
||||
|
#endregion
|
||||
|
#region 单个复选框
|
||||
|
if (Items == null) |
||||
|
{ |
||||
|
output.TagName = "input"; |
||||
|
output.TagMode = TagMode.SelfClosing; |
||||
|
output.Attributes.Add("type", "checkbox"); |
||||
|
output.Attributes.Add("id", inputName); |
||||
|
output.Attributes.Add("name", inputName); |
||||
|
output.Attributes.Add("lay-skin", skin); |
||||
|
output.Attributes.Add("title", SignleTitle); |
||||
|
output.Attributes.Add("value", "true"); |
||||
|
if (For?.Model?.ToString().ToLower() == "true") |
||||
|
{ |
||||
|
output.Attributes.Add("checked", "checked"); |
||||
|
} |
||||
|
return; |
||||
|
} |
||||
|
#endregion
|
||||
|
#region 复选框组
|
||||
|
var currentValues = Generator.GetCurrentValues(ViewContext, For.ModelExplorer, expression: For.Name, allowMultiple: true); |
||||
|
foreach (var item in Items) |
||||
|
{ |
||||
|
var checkbox = new TagBuilder("input"); |
||||
|
checkbox.TagRenderMode = TagRenderMode.SelfClosing; |
||||
|
checkbox.Attributes["type"] = "checkbox"; |
||||
|
checkbox.Attributes["id"] = inputName; |
||||
|
checkbox.Attributes["name"] = inputName; |
||||
|
checkbox.Attributes["lay-skin"] = skin; |
||||
|
checkbox.Attributes["title"] = item.Text; |
||||
|
checkbox.Attributes["value"] = item.Value; |
||||
|
if (item.Disabled) |
||||
|
{ |
||||
|
checkbox.Attributes.Add("disabled", "disabled"); |
||||
|
} |
||||
|
if (item.Selected || (currentValues != null && currentValues.Contains(item.Value))) |
||||
|
{ |
||||
|
checkbox.Attributes.Add("checked", "checked"); |
||||
|
} |
||||
|
|
||||
|
output.Content.AppendHtml(checkbox); |
||||
|
} |
||||
|
output.TagName = ""; |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
||||
|
public enum CheckboxSkin |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 默認
|
||||
|
/// </summary>
|
||||
|
defult, |
||||
|
/// <summary>
|
||||
|
/// 原始
|
||||
|
/// </summary>
|
||||
|
primary |
||||
|
} |
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using Microsoft.AspNetCore.Mvc.ViewFeatures; |
||||
|
using Microsoft.AspNetCore.Razor.TagHelpers; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace TagHelperForModel.Helper |
||||
|
{ |
||||
|
public class DisplayTitleTagHelper : TagHelper |
||||
|
{ |
||||
|
public ModelExpression aspFor { get; set; } |
||||
|
|
||||
|
[ViewContext] |
||||
|
[HtmlAttributeNotBound] |
||||
|
public ViewContext ViewContext { get; set; } |
||||
|
|
||||
|
protected IHtmlGenerator _generator { get; set; } |
||||
|
|
||||
|
public DisplayTitleTagHelper(IHtmlGenerator generator) |
||||
|
{ |
||||
|
_generator = generator; |
||||
|
} |
||||
|
|
||||
|
public override void Process(TagHelperContext context, TagHelperOutput output) |
||||
|
{ |
||||
|
output.TagName = ""; |
||||
|
var propMetadata = aspFor.Metadata; |
||||
|
var @class = context.AllAttributes["class"].Value; |
||||
|
|
||||
|
var label = _generator.GenerateLabel(ViewContext, aspFor.ModelExplorer, |
||||
|
propMetadata.Name, propMetadata.Name, new { @class }); |
||||
|
|
||||
|
var strong = new TagBuilder("strong"); |
||||
|
strong.InnerHtml.Append(propMetadata.DisplayName); |
||||
|
label.InnerHtml.Clear(); |
||||
|
label.InnerHtml.AppendHtml(strong); |
||||
|
|
||||
|
if (propMetadata.IsRequired) |
||||
|
{ |
||||
|
var span = new TagBuilder("span"); |
||||
|
span.AddCssClass("text-danger"); |
||||
|
span.InnerHtml.Append("*"); |
||||
|
|
||||
|
label.InnerHtml.AppendHtml(span); |
||||
|
} |
||||
|
|
||||
|
output.Content.AppendHtml(label); |
||||
|
|
||||
|
|
||||
|
if (string.IsNullOrEmpty(propMetadata.Description) == false) |
||||
|
{ |
||||
|
var span = new TagBuilder("span"); |
||||
|
span.AddCssClass("text-success"); |
||||
|
span.InnerHtml.Append(propMetadata.Description); |
||||
|
|
||||
|
output.Content.AppendHtml(span); |
||||
|
} |
||||
|
|
||||
|
var validation = _generator.GenerateValidationMessage(ViewContext, aspFor.ModelExplorer, |
||||
|
propMetadata.Name, string.Empty, string.Empty, new { @class = "text-danger" }); |
||||
|
|
||||
|
output.Content.AppendHtml(validation); |
||||
|
|
||||
|
base.Process(context, output); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc.Rendering; |
||||
|
using Microsoft.AspNetCore.Mvc.ViewFeatures; |
||||
|
using Microsoft.AspNetCore.Razor.TagHelpers; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Helper |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 單選框
|
||||
|
/// </summary>
|
||||
|
[HtmlTargetElement(RadioTagName)] |
||||
|
public class RadioTagHelper : TagHelper |
||||
|
{ |
||||
|
private const string RadioTagName = "cl-radio"; |
||||
|
private const string ForAttributeName = "asp-for"; |
||||
|
private const string ItemsAttributeName = "asp-items"; |
||||
|
|
||||
|
[ViewContext] |
||||
|
public ViewContext ViewContext { get; set; } |
||||
|
|
||||
|
[HtmlAttributeName(ForAttributeName)] |
||||
|
public ModelExpression For { get; set; } |
||||
|
|
||||
|
[HtmlAttributeName(ItemsAttributeName)] |
||||
|
public IEnumerable<SelectListItem> Items { get; set; } |
||||
|
|
||||
|
public override void Process(TagHelperContext context, TagHelperOutput output) |
||||
|
{ |
||||
|
if (For == null) |
||||
|
{ |
||||
|
throw new ArgumentException("必須繫結模型"); |
||||
|
} |
||||
|
foreach (var item in Items) |
||||
|
{ |
||||
|
var radio = new TagBuilder("input"); |
||||
|
radio.TagRenderMode = TagRenderMode.SelfClosing; |
||||
|
radio.Attributes.Add("id", ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(For.Name)); |
||||
|
radio.Attributes.Add("name", ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(For.Name)); |
||||
|
radio.Attributes.Add("value", item.Value); |
||||
|
radio.Attributes.Add("title", item.Text); |
||||
|
radio.Attributes.Add("type", "radio"); |
||||
|
if (item.Disabled) |
||||
|
{ |
||||
|
radio.Attributes.Add("disabled", "disabled"); |
||||
|
} |
||||
|
if (item.Selected || item.Value == For.Model?.ToString()) |
||||
|
{ |
||||
|
radio.Attributes.Add("checked", "checked"); |
||||
|
} |
||||
|
output.Content.AppendHtml(radio); |
||||
|
} |
||||
|
output.TagName = ""; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 共用呼叫 API
|
||||
|
/// </summary>
|
||||
|
[JsonReturn] |
||||
|
public interface IBLL : IHttpApi |
||||
|
{ |
||||
|
#region Mail 寄信
|
||||
|
/// <summary>
|
||||
|
/// Mail 寄信
|
||||
|
/// </summary>
|
||||
|
/// <param name="Subject">Mail主旨</param>
|
||||
|
/// <param name="Body">Mail內容</param>
|
||||
|
/// <param name="ToMailGroup">群組(,區分多組)</param>
|
||||
|
/// <param name="ToMail">EMail(,區分多組)</param>
|
||||
|
/// <param name="ToCC">是否為密件</param>
|
||||
|
/// <param name="Attachment">附件</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/Mail/ToMail")] |
||||
|
ITask<ResultModel<dynamic>> PostToMail(string Subject, string Body, string ToMailGroup, string ToMail, bool ToCC = false, string Attachment = null); |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,615 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IFQC : IHttpApi |
||||
|
{ |
||||
|
#region FQC001 檢驗類別維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcGroup")] |
||||
|
ITask<ResultModel<QcGroup>> PostQcGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcGroup")] |
||||
|
ITask<ResultModel<QcGroup>> PutQcGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcGroup/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcGroup(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup/QcGroupQuery")] |
||||
|
ITask<ResultModel<QcGroup>> GetQcGroupQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗類別維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup/{id}")] |
||||
|
ITask<QcGroup> GetQcGroup(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC002 檢驗項目維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcItem")] |
||||
|
ITask<ResultModel<QcItem>> PostQcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcItem")] |
||||
|
ITask<ResultModel<QcItem>> PutQcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="groupID">檢驗類別ID</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit">比數</param>
|
||||
|
/// <param name="itemNo">料號</param>
|
||||
|
/// <param name="wipNo">工單號碼</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcItem/QcItemQuery")] |
||||
|
ITask<ResultModel<QcItemDto>> GetQcItemQuery(int groupID, int page, int limit, string itemNo = null, string wipNo = null); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcItem/{id}")] |
||||
|
ITask<QcItem> GetQcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup")] |
||||
|
ITask<List<QcGroup>> GetQcGroup(); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC003 檢驗結果維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResult")] |
||||
|
ITask<ResultModel<FqcResult>> PostFqcResult([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcResult")] |
||||
|
ITask<ResultModel<FqcResult>> PutFqcResult([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcResult/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFqcResult(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResult/FqcResultQuery")] |
||||
|
ITask<ResultModel<FqcResult>> GetFqcResultQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗結果維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResult/{id}")] |
||||
|
ITask<FqcResult> GetFqcResult(string id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC004 抽驗係數維護
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcQuot")] |
||||
|
ITask<ResultModel<QcQuot>> PostQcQuot([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcQuot")] |
||||
|
ITask<ResultModel<QcQuot>> PutQcQuot([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcQuot/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcQuot(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot/QcQuotQuery")] |
||||
|
ITask<ResultModel<QcQuot>> GetQcQuotQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗係數維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot/{id}")] |
||||
|
ITask<QcQuot> GetQcQuot(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC005 抽驗標準維護
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcCriterion")] |
||||
|
ITask<ResultModel<QcCriterion>> PostQcCriterion([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcCriterion")] |
||||
|
ITask<ResultModel<QcCriterion>> PutQcCriterion([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcCriterion/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcCriterion(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="quotID">抽驗係數ID</param>
|
||||
|
/// <param name="AQLType">AQL類型</param>
|
||||
|
/// <param name="QCQty">批量</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/QcCriterionQuery")] |
||||
|
ITask<ResultModel<QcCriterionDto>> GetQcCriterionQuery(int quotID, string AQLType, int QCQty, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/{id}")] |
||||
|
ITask<QcCriterion> GetQcCriterion(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot")] |
||||
|
ITask<List<QcQuot>> GetQcQuot(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準 ByQuotID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/ByQuotID/{id}")] |
||||
|
ITask<List<QcCriterion>> GetQcCriterionByQuotID(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC006 FQC狀態維護
|
||||
|
/// <summary>
|
||||
|
/// 新增過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/StatusType")] |
||||
|
ITask<ResultModel<StatusType>> PostStatusType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/StatusType")] |
||||
|
ITask<ResultModel<StatusType>> PutStatusType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/StatusType/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteStatusType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢過站狀態檔 Query
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType/StatusTypeQuery")] |
||||
|
ITask<ResultModel<StatusType>> GetStatusTypeQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢過站狀態檔 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType/{id}")] |
||||
|
ITask<StatusType> GetStatusType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站狀態檔-List
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType")] |
||||
|
ITask<List<StatusType>> GetStatusType(); |
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC007 FQC抽驗作業
|
||||
|
/// <summary>
|
||||
|
/// 新增FQC檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultMaster")] |
||||
|
ITask<ResultModel<FqcResultMaster>> PostFqcResultMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新FQC檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcResultMaster")] |
||||
|
ITask<ResultModel<FqcResultMaster>> PutFqcResultMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增FQC檢驗結果明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultDetail")] |
||||
|
ITask<ResultModel<FqcResultDetail>> PostFqcResultDetail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新入庫單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcInhouseMaster")] |
||||
|
ITask<ResultModel<FqcInhouseMaster>> PutFqcInhouseMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新入庫單 抽驗係數標準
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcInhouseMaster/PutForCritID")] |
||||
|
ITask<ResultModel<FqcInhouseMaster>> PutFqcInhouseMasterForCritID([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新入庫單 庫別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcInhouseMaster/PutForLocationNo")] |
||||
|
ITask<ResultModel<FqcInhouseMaster>> PutFqcInhouseMasterForLocationNo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗批退
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QngInfo")] |
||||
|
ITask<ResultModel<QngInfo>> PostQngInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC抽驗資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseMaster/FqcQuery/{inhouseNo}")] |
||||
|
ITask<ResultModel<FqcDto>> GetFqcQuery(string inhouseNo, int? seqid = 1); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取不良現象群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGGroups")] |
||||
|
ITask<List<NGGroup>> GetNGGroups(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据群組代碼獲取不良現象類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGClasses/Group/{no}")] |
||||
|
ITask<List<NGClass>> GetNGClassesByGroup(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 不良現象-List
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGReasons/Class/{no}")] |
||||
|
ITask<ResultModel<NGReason>> GetNGReasonsByClass(string no, int page = 0, int limit = 1000); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用內部序號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/No/{id}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用客戶序號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/ByExtraNo/{extraNo}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByExtraNo(string extraNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用包裝箱號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/ByBoxNo/{boxNo}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByBoxNo(string boxNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用入庫單號與序號取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMaster/ByInhouseNo/{inhouseNo}/{seq}")] |
||||
|
ITask<List<FqcResultMaster>> GetFqcResultMasterByInhouseNo(string inhouseNo, int seq); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用入庫單號與序號取檢驗單明细資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseDetail/{inhouseNo}/{seq}")] |
||||
|
ITask<List<FqcInhouseDetail>> GetFqcInhouseDetail(string inhouseNo, int seq); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用FQCID取檢驗結果明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultDetail/{id}")] |
||||
|
ITask<List<FqcResultDetail>> GetFqcResultDetail(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用id取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMaster/{id}")] |
||||
|
ITask<FqcResultMaster> GetFqcResultMaster(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用id取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseMaster/{inhouseNo}/{seqID}")] |
||||
|
ITask<FqcInhouseMaster> GetFqcInhouseMaster(string inhouseNo, int seqID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增 檢驗結果上傳圖檔資料表
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultMasterBlob")] |
||||
|
ITask<ResultModel<FqcResultMasterBlob>> PostFqcResultMasterBlob([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢 檢驗結果上傳圖檔資料表 By FQCID
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMasterBlob/ByFQCID/{id}")] |
||||
|
ITask<List<FqcResultMasterBlob>> GetFqcResultMasterBlobByFqcID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 查詢工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">料號</param>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipFqcItem/ByWipNo/{id}")] |
||||
|
ITask<List<WipFqcItem>> GetWipFqcItemByWipNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 新增工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WipFqcItem")] |
||||
|
ITask<ResultModel<WipFqcItem>> PostWipFqcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 刪除工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WipFqcItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWipFqcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC抽驗過站
|
||||
|
/// </summary>
|
||||
|
/// <param name="inhouseNo">入庫單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <param name="userID">UserID</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarCodeCheck/PassIngByFQC")] |
||||
|
ITask<ResultModel<string>> PassingByFQC(string inhouseNo, int seqID, int userID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC 細項資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="inhouseNo">入庫單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <param name="boxNo">箱號</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseDetail/FqcInhouseDetailByFQC007V")] |
||||
|
ITask<ResultModel<FqcResultDto>> FQC007V(string inhouseNo, int seqID, string boxNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC 細項資料(全部)
|
||||
|
/// </summary>
|
||||
|
/// <param name="inhouseNo">入庫單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseDetail/FqcInhouseDetailByFQC007All")] |
||||
|
ITask<ResultModel<FqcResultDto>> FQC007InhouseDetails(string inhouseNo, int seqID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC007 取PLM ECN
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/GetPLMData/Get_PLM_ECN")] |
||||
|
ITask<ResultModel<string>> GetPLMEcn(string ItemNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除 FQC抽驗資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">內部條碼</param>
|
||||
|
/// <param name="inhouseNo">FQC單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <param name="boxNo">箱號</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcResultDetail")] |
||||
|
ITask<ResultModel<FqcResultDetail>> DeleteFqcResultDetail(string id, string inhouseNo, int seqID, string boxNo); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC008 FQC查詢
|
||||
|
/// <summary>
|
||||
|
/// FQC查詢
|
||||
|
/// </summary>
|
||||
|
/// <param name="barcodeNo">內部序號</param>
|
||||
|
/// <param name="wipNo">工單號碼</param>
|
||||
|
/// <param name="boxNo">外箱號碼</param>
|
||||
|
/// <param name="inhouseNo">入庫單號碼</param>
|
||||
|
/// <param name="date_str">入庫時間起</param>
|
||||
|
/// <param name="date_end">入庫時間迄</param>
|
||||
|
/// <param name="status">抽驗結果</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit">筆數</param>
|
||||
|
/// <param name="factoryID">委外廠商</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseMaster/FqcInhouseMasterQuery")] |
||||
|
ITask<ResultModel<FqcInhouseMasterDto>> GetFqcInhouseMasterQuery(string barcodeNo = null, string wipNo = null |
||||
|
, string boxNo = null, string inhouseNo = null, string date_str = null, string date_end = null |
||||
|
, string status = null, int page = 0, int limit = 10, string factoryID = null, string factoryNo = null); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC009 料號檢驗工項維護
|
||||
|
/// <summary>
|
||||
|
/// MaterialItem 料號基本資料檔
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">料號</param>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialItem/ByItemNO/{id}")] |
||||
|
ITask<MaterialItem> GetMaterialItemByItemNO(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// MaterialItem 料號查詢綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">料號</param>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialFqcItem/ByitemNo/{id}")] |
||||
|
ITask<List<MaterialFqcItem>> GetMaterialFqcItemsByitemNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// MaterialItem 新增料號綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MaterialFqcItem")] |
||||
|
ITask<ResultModel<MaterialFqcItem>> PostMaterialFqcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// MaterialItem 刪除料號綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialFqcItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMaterialFqcItem(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC011 FQC報表自動派送維護
|
||||
|
/// <summary>
|
||||
|
/// 新增FQC報表自動派送
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcNoticeMail")] |
||||
|
ITask<ResultModel<FqcNoticeMail>> PostFqcNoticeMail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新FQC報表自動派送
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcNoticeMail")] |
||||
|
ITask<ResultModel<FqcNoticeMail>> PutFqcNoticeMail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除FQC報表自動派送
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcNoticeMail/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFqcNoticeMail(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢FQC報表自動派送
|
||||
|
/// </summary>
|
||||
|
/// <param name="material">料號</param>
|
||||
|
/// <param name="fqcResult">檢驗結果</param>
|
||||
|
/// <param name="status">狀態</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcNoticeMail/Query")] |
||||
|
ITask<ResultModel<FqcNoticeMailDto>> GetFqcNoticeMailQuery(string material, string fqcResult = null, string status = null, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢FQC報表自動派送 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcNoticeMail/{id}")] |
||||
|
ITask<FqcNoticeMail> GetFqcNoticeMail(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC012 FQC刪除
|
||||
|
/// <summary>
|
||||
|
/// 刪除FQC 表頭
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcInhouseMaster/{no}/{seq}")] |
||||
|
ITask<ResultModel<string>> DeleteFqcInhouseMaster(string no, int seq); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除FQC 表身
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcInhouseDetail/{no}/{seq}")] |
||||
|
ITask<ResultModel<string>> DeleteFqcInhouseDetail(string no, int seq); |
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,325 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IJIG : IHttpApi |
||||
|
{ |
||||
|
#region JIG001 設備種類資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備種類
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitCommodityInfoes")] |
||||
|
ITask<ResultModel<OutfitCommodityInfo>> PostOutfitCommodityInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備種類
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitCommodityInfoes/{id}")] |
||||
|
ITask<ResultModel<OutfitCommodityInfo>> PutOutfitCommodityInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除設備種類
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitCommodityInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteOutfitCommodityInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備種類資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitCommodityInfoes/{id}")] |
||||
|
ITask<List<OutfitCommodityInfo>> GetOutfitCommodityInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備種類資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitCommodityInfoes")] |
||||
|
ITask<List<OutfitCommodityInfo>> GetOutfitCommodityInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備種類BY QUERY
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitCommodityInfoes/Query/{TypeFlag}/{Status}")] |
||||
|
ITask<List<OutfitCommodityInfo>> GetOutfitCommodityInfoesByQuery(int TypeFlag, string Status); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG002 設備規格資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備規格
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitVarityInfoes")] |
||||
|
ITask<ResultModel<OutfitVarityInfo>> PostOutfitVarityInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備規格
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitVarityInfoes/{id}")] |
||||
|
ITask<ResultModel<OutfitVarityInfo>> PutOutfitVarityInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除設備規格
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitVarityInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteOutfitVarityInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備規格資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitVarityInfoes/{id}")] |
||||
|
ITask<List<OutfitVarityInfo>> GetOutfitVarityInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備規格資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitVarityInfoes")] |
||||
|
ITask<List<OutfitVarityInfo>> GetOutfitVarityInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備種類BY QUERY
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitVarityInfoes/Query/{TypeFlag}/{CommodityID}/{Status}")] |
||||
|
ITask<List<OutfitVarityInfo>> GetOutfitVarityInfoesByQuery(int TypeFlag, int CommodityID, string Status); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG003 設備廠商資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備廠商
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitVendorInfoes")] |
||||
|
ITask<ResultModel<OutfitVendorInfo>> PostOutfitVendorInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備廠商
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitVendorInfoes/{id}")] |
||||
|
ITask<ResultModel<OutfitVendorInfo>> PutOutfitVendorInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除設備廠商
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitVendorInfoes/{id}")] |
||||
|
// ITask<string> DeleteOutfitVendorInfo(int id); //修改前
|
||||
|
ITask<ResultModel<string>> DeleteOutfitVendorInfo(int id); //修改後 YIRU
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備廠商資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitVendorInfoes/{id}")] |
||||
|
ITask<List<OutfitVendorInfo>> GetOutfitVendorInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備廠商資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitVendorInfoes")] |
||||
|
ITask<List<OutfitVendorInfo>> GetOutfitVendorInfoes(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG004 設備基本數據維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitInfoes")] |
||||
|
ITask<ResultModel<OutfitInfo>> PostOutfitInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitInfoes/{id}")] |
||||
|
ITask<ResultModel<OutfitInfo>> PutOutfitInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteOutfitInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitInfoes/{id}")] |
||||
|
ITask<List<OutfitInfo>> GetOutfitInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitInfoes")] |
||||
|
ITask<List<OutfitInfo>> GetOutfitInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据設備基本數據
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitInfoes/Query/{TypeFlag}/{CommodityID}/{VarityID}/{Status}/{QANo}/{PartNo}/{UseStatus}")] |
||||
|
ITask<List<OutfitInfo>> GetOutfitInfoesByQuery(int TypeFlag, int CommodityID, int VarityID, string Status, string QANo, string PartNo, string UseStatus); |
||||
|
|
||||
|
//yiru 2022-09-20 add BEGIN
|
||||
|
/// <summary>
|
||||
|
/// 新增 檢驗結果上傳圖檔資料表
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitInfoBlob")] |
||||
|
ITask<ResultModel<OutfitInfoBlob>> PostOutfitInfoBlob([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新 檢驗結果上傳圖檔資料表
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitInfoBlob/{id}")] |
||||
|
ITask<ResultModel<OutfitInfoBlob>> PutOutfitInfoBlob(int id,[FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢 檢驗結果上傳圖檔資料表 By OUTFITID
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitInfoBlob/ByOutfitID/{id}")] |
||||
|
ITask<List<OutfitInfoBlob>> GetOutfitInfoBlobByOutfitID(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除圖檔資料表
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitInfoBlob/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteOutfitInfoBlob(int id); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
//yiru 2022-09-20 add END
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG005 設備狀態紀錄維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備狀態紀錄
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitStatusLogs")] |
||||
|
ITask<ResultModel<OutfitStatusLog>> PostOutfitStatusLog([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備狀態紀錄
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitStatusLogs/{id}")] |
||||
|
ITask<ResultModel<OutfitStatusLog>> PutOutfitStatusLog(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備狀態紀錄
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitStatusLogs/{id}")] |
||||
|
ITask<List<OutfitStatusLog>> GetOutfitStatusLog(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據OutfitID獲取指定設備狀態紀錄
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitStatusLogs/Outfit/{id}")] |
||||
|
ITask<List<OutfitStatusLog>> GetOutfitStatusLogByOutfitID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據OutfitID獲取指定設備狀態紀錄
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitStatusLogs/OutfitDto/{id}")] |
||||
|
ITask<List<OutfitStatusLogDto>> GetOutfitStatusLogDtoByOutfitID(int id); |
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG010 設備未歸查詢 TIRU
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備設備未歸 BY QUERY
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitInfoes/Query1/{TypeFlag}/{CommodityID}/{VarityID}/{Status}/{QANo}/{PartNo}/{UseStatus}")] |
||||
|
ITask<List<OutfitInfo>> GetOutfitInfoesByQuery1(int TypeFlag, int CommodityID, int VarityID, string Status, string QANo, string PartNo, string UseStatus); |
||||
|
#endregion
|
||||
|
|
||||
|
#region JIG015 設備廠別資料維護 YIRU
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增設備廠別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/OutfitFactoryInfos")] |
||||
|
ITask<ResultModel<OutfitFactoryInfo>> PostOutfitFactoryInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新設備廠別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/OutfitFactoryInfos/{id}")] |
||||
|
ITask<ResultModel<OutfitFactoryInfo>> PutOutfitFactoryInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除設備廠別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/OutfitFactoryInfos/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteOutfitFactoryInfo(int id); |
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定設備廠別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitFactoryInfos/{id}")] |
||||
|
ITask<List<OutfitFactoryInfo>> GetOutfitFactoryInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取設備廠別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/OutfitFactoryInfos")] |
||||
|
ITask<List<OutfitFactoryInfo>> GetOutfitFactoryInfos(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,240 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IKCS:IHttpApi |
||||
|
{ |
||||
|
#region KCS001 MAC資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MACInfoes")] |
||||
|
ITask<ResultModel<MACInfo>> PostMACInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MACInfoes/{id}")] |
||||
|
ITask<ResultModel<MACInfo>> PutMACInfo(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MACInfoes/{id}")] |
||||
|
ITask<ResultModel<MACInfo>> DeleteMACInfo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MACInfoes/{id}")] |
||||
|
ITask<List<MACInfo>> GetMACInfo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MACInfoes")] |
||||
|
ITask<List<MACInfo>> GetMACInfoes(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取MAC資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MACInfoes/GetMACInfoes4KCS001")] |
||||
|
ITask<List<MACInfo>> GetMACInfoes4KCS001(string itemNO, string classGroupNo, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region KCS002 序號料號維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增序號料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/PartMaps")] |
||||
|
ITask<ResultModel<PartMap>> PostPartMap([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新序號料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/PartMaps/{id}")] |
||||
|
ITask<ResultModel<PartMap>> PutPartMap(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除序號料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/PartMaps/{id}")] |
||||
|
ITask<ResultModel<PartMap>> DeletePartMap(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定序號料號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/PartMaps/{id}")] |
||||
|
ITask<List<PartMap>> GetPartMap(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取序號料號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/PartMaps")] |
||||
|
ITask<List<PartMap>> GetPartMaps(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region KCS004 組件料號序號維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增組件料號序號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/KPLinks")] |
||||
|
ITask<ResultModel<KPLink>> PostKPLink([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新組件料號序號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/KPLinks/{id}")] |
||||
|
ITask<ResultModel<KPLink>> PutKPLink(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除組件料號序號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/KPLinks/{id}")] |
||||
|
ITask<ResultModel<KPLink>> DeleteKPLink(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定組件料號序號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/KPLinks/{id}")] |
||||
|
ITask<List<KPLink>> GetKPLink(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取組件料號序號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/KPLinks")] |
||||
|
ITask<List<KPLink>> GetKPLinks(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除料號組件 (組件停用)
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialKp/ByKpNo/{id}")] |
||||
|
ITask<ResultModel<MaterialKp>> DeleteMaterialKpByKpNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工單組件 (組件停用)
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WipKps/ByKpNo/{id}")] |
||||
|
ITask<ResultModel<WipKp>> DeleteWipKpsByKpNo(string id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region KCS006 組件類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/Items")] |
||||
|
ITask<ResultModel<Items>> PostItems([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/Items/{id}")] |
||||
|
ITask<ResultModel<Items>> PutItems(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/Items/{id}")] |
||||
|
ITask<ResultModel<Items>> DeleteItems(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定組件類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Items/{id}")] |
||||
|
ITask<List<Items>> GetItems(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取組件類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Items")] |
||||
|
ITask<List<Items>> GetItems(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region KCS007 組件料號維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增組件料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MaterialKp")] |
||||
|
ITask<ResultModel<MaterialKp>> PostMaterialKp([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新組件料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MaterialKp/{id}")] |
||||
|
ITask<ResultModel<MaterialKp>> PutMaterialKp(int id,[FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除組件料號
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialKp/{id}")] |
||||
|
ITask<ResultModel<MaterialKp>> DeleteMaterialKp(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定組件料號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialKp/{id}")] |
||||
|
ITask<List<MaterialKp>> GetMaterialKp(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取組件料號資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialKp")] |
||||
|
ITask<List<MaterialKp>> GetMaterialKps(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取組件類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialKp/ByItemID/{id}")] |
||||
|
ITask<List<MaterialKp>> GetMaterialKpsByItemID(int id); |
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,559 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IPCB : IHttpApi |
||||
|
{ |
||||
|
#region FQC001 檢驗類別維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcGroup")] |
||||
|
ITask<ResultModel<QcGroup>> PostQcGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcGroup")] |
||||
|
ITask<ResultModel<QcGroup>> PutQcGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcGroup/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcGroup(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗類別維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup/QcGroupQuery")] |
||||
|
ITask<ResultModel<QcGroup>> GetQcGroupQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗類別維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup/{id}")] |
||||
|
ITask<QcGroup> GetQcGroup(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC002 檢驗項目維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcItem")] |
||||
|
ITask<ResultModel<QcItem>> PostQcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcItem")] |
||||
|
ITask<ResultModel<QcItem>> PutQcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="groupID">檢驗類別ID</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit">比數</param>
|
||||
|
/// <param name="itemNo">料號</param>
|
||||
|
/// <param name="wipNo">工單號碼</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcItem/QcItemQuery")] |
||||
|
ITask<ResultModel<QcItemDto>> GetQcItemQuery(int groupID, int page, int limit, string itemNo = null, string wipNo = null); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcItem/{id}")] |
||||
|
ITask<QcItem> GetQcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcGroup")] |
||||
|
ITask<List<QcGroup>> GetQcGroup(); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC003 檢驗結果維護
|
||||
|
/// <summary>
|
||||
|
/// 新增檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResult")] |
||||
|
ITask<ResultModel<FqcResult>> PostFqcResult([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcResult")] |
||||
|
ITask<ResultModel<FqcResult>> PutFqcResult([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FqcResult/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFqcResult(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗結果維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResult/FqcResultQuery")] |
||||
|
ITask<ResultModel<FqcResult>> GetFqcResultQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗結果維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResult/{id}")] |
||||
|
ITask<FqcResult> GetFqcResult(string id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC004 抽驗係數維護
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcQuot")] |
||||
|
ITask<ResultModel<QcQuot>> PostQcQuot([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcQuot")] |
||||
|
ITask<ResultModel<QcQuot>> PutQcQuot([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcQuot/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcQuot(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗係數維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot/QcQuotQuery")] |
||||
|
ITask<ResultModel<QcQuot>> GetQcQuotQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗係數維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot/{id}")] |
||||
|
ITask<QcQuot> GetQcQuot(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC005 抽驗標準維護
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QcCriterion")] |
||||
|
ITask<ResultModel<QcCriterion>> PostQcCriterion([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QcCriterion")] |
||||
|
ITask<ResultModel<QcCriterion>> PutQcCriterion([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QcCriterion/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteQcCriterion(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準維護
|
||||
|
/// </summary>
|
||||
|
/// <param name="quotID">抽驗係數ID</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/QcCriterionQuery")] |
||||
|
ITask<ResultModel<QcCriterionDto>> GetQcCriterionQuery(int quotID, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準維護 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/{id}")] |
||||
|
ITask<QcCriterion> GetQcCriterion(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢檢驗項目維護
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcQuot")] |
||||
|
ITask<List<QcQuot>> GetQcQuot(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢抽驗標準 ByQuotID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QcCriterion/ByQuotID/{id}")] |
||||
|
ITask<List<QcCriterion>> GetQcCriterionByQuotID(int id); |
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC006 FQC狀態維護
|
||||
|
/// <summary>
|
||||
|
/// 新增過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/StatusType")] |
||||
|
ITask<ResultModel<StatusType>> PostStatusType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/StatusType")] |
||||
|
ITask<ResultModel<StatusType>> PutStatusType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除過站狀態檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/StatusType/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteStatusType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢過站狀態檔 Query
|
||||
|
/// </summary>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType/StatusTypeQuery")] |
||||
|
ITask<ResultModel<StatusType>> GetStatusTypeQuery(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢過站狀態檔 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType/{id}")] |
||||
|
ITask<StatusType> GetStatusType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站狀態檔-List
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StatusType")] |
||||
|
ITask<List<StatusType>> GetStatusType(); |
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region FQC007 FQC抽驗作業
|
||||
|
/// <summary>
|
||||
|
/// 新增FQC檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultMaster")] |
||||
|
ITask<ResultModel<FqcResultMaster>> PostFqcResultMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新FQC檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcResultMaster")] |
||||
|
ITask<ResultModel<FqcResultMaster>> PutFqcResultMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增FQC檢驗結果明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultDetail")] |
||||
|
ITask<ResultModel<FqcResultDetail>> PostFqcResultDetail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新入庫單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FqcInhouseMaster")] |
||||
|
ITask<ResultModel<FqcInhouseMaster>> PutFqcInhouseMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增抽驗批退
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QngInfo")] |
||||
|
ITask<ResultModel<QngInfo>> PostQngInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢過站狀態檔 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseMaster/FqcQuery/{inhouseNo}")] |
||||
|
ITask<ResultModel<FqcDto>> GetFqcQuery(string inhouseNo, int? seqid = 1); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取不良現象群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGGroups")] |
||||
|
ITask<List<NGGroup>> GetNGGroups(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据群組代碼獲取不良現象類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGClasses/Group/{no}")] |
||||
|
ITask<List<NGClass>> GetNGClassesByGroup(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 不良現象-List
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGReasons/Class/{no}")] |
||||
|
ITask<List<NGReason>> GetNGReasonsByClass(string no, int page = 0, int limit = 1000); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用內部序號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/No/{id}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用客戶序號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/ByExtraNo/{extraNo}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByExtraNo(string extraNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用包裝箱號取BarCode資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeInfoes/ByBoxNo/{boxNo}")] |
||||
|
ITask<List<BarcodeInfo>> GetBarcodeInfoesByBoxNo(string boxNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用入庫單號與序號取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMaster/ByInhouseNo/{inhouseNo}/{seq}")] |
||||
|
ITask<List<FqcResultMaster>> GetFqcResultMasterByInhouseNo(string inhouseNo, int seq); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用入庫單號與序號取檢驗單明细資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseDetail/{inhouseNo}/{seq}")] |
||||
|
ITask<List<FqcInhouseDetail>> GetFqcInhouseDetail(string inhouseNo, int seq); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用FQCID取檢驗結果明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultDetail/{id}")] |
||||
|
ITask<List<FqcResultDetail>> GetFqcResultDetail(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用id取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMaster/{id}")] |
||||
|
ITask<FqcResultMaster> GetFqcResultMaster(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用id取檢驗單結果
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseMaster/{inhouseNo}/{seqID}")] |
||||
|
ITask<FqcInhouseMaster> GetFqcInhouseMaster(string inhouseNo, int seqID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增 檢驗結果上傳圖檔資料表
|
||||
|
/// </summary>
|
||||
|
/// <param name="model"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FqcResultMasterBlob")] |
||||
|
ITask<ResultModel<FqcResultMasterBlob>> PostFqcResultMasterBlob([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢 檢驗結果上傳圖檔資料表 By FQCID
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcResultMasterBlob/ByFQCID/{id}")] |
||||
|
ITask<List<FqcResultMasterBlob>> GetFqcResultMasterBlobByFqcID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 查詢工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">料號</param>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipFqcItem/ByWipNo/{id}")] |
||||
|
ITask<List<WipFqcItem>> GetWipFqcItemByWipNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 新增工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WipFqcItem")] |
||||
|
ITask<ResultModel<WipFqcItem>> PostWipFqcItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// WipFqcItem 刪除工單綁定檢驗工項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WipFqcItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWipFqcItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC抽驗過站
|
||||
|
/// </summary>
|
||||
|
/// <param name="inhouseNo">入庫單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <param name="userID">UserID</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarCodeCheck/PassIngByFQC")] |
||||
|
ITask<ResultModel<string>> PassingByFQC(string inhouseNo, int seqID, int userID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// FQC 細項資料
|
||||
|
/// </summary>
|
||||
|
/// <param name="inhouseNo">入庫單號</param>
|
||||
|
/// <param name="seqID">順序</param>
|
||||
|
/// <param name="boxNo">箱號</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FqcInhouseDetail/FqcInhouseDetailByFQC007V")] |
||||
|
ITask<ResultModel<FqcResultDto>> FQC007V(string inhouseNo, int seqID, string boxNo); |
||||
|
#endregion
|
||||
|
|
||||
|
#region PCB013 鋼板量測紀錄
|
||||
|
/// <summary>
|
||||
|
/// 鋼板資料查詢
|
||||
|
/// </summary>
|
||||
|
/// <param name="steelPlateNo">鋼板編號</param>
|
||||
|
/// <param name="pcbPartNo">PCB板號</param>
|
||||
|
/// <param name="side">正背面</param>
|
||||
|
/// <param name="status">狀態</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit">筆數</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SteelPlateInfo/SteelPlateInfoQuery")] |
||||
|
ITask<ResultModel<SteelPlateInfoDto>> GetSteelPlateInfoQuery(string steelPlateNo = null, string pcbPartNo = null |
||||
|
, string side = null, string status = null, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增鋼板資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SteelPlateInfo")] |
||||
|
ITask<ResultModel<SteelPlateInfo>> PostSteelPlateInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新鋼板資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SteelPlateInfo")] |
||||
|
ITask<ResultModel<SteelPlateInfo>> PutSteelPlateInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢鋼板資料 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SteelPlateInfo/{id}")] |
||||
|
ITask<SteelPlateInfo> GetSteelPlateInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢鋼板資料 By No
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SteelPlateInfo/ByNo/{id}")] |
||||
|
ITask<List<SteelPlateInfo>> GetSteelPlateInfoByNo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增鋼板資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SteelPlateMeasure")] |
||||
|
ITask<ResultModel<SteelPlateMeasure>> PostSteelPlateMeasure([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SteelPlateMeasure/BySteelPlateID/{id}")] |
||||
|
ITask<ResultModel<SteelPlateMeasureDto>> GetSteelPlateMeasureBySteelPlateID(int id, int page = 0, int limit = 10); |
||||
|
#endregion
|
||||
|
|
||||
|
#region PCB014 錫膏使用管控
|
||||
|
/// <summary>
|
||||
|
/// 錫膏資料查詢
|
||||
|
/// </summary>
|
||||
|
/// <param name="solderPasteNo">錫膏編號</param>
|
||||
|
/// <param name="status">狀態</param>
|
||||
|
/// <param name="page">頁數</param>
|
||||
|
/// <param name="limit">筆數</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SolderPasteInfo/SolderPasteInfoQuery")] |
||||
|
ITask<ResultModel<SolderPasteInfoDto>> GetSolderPasteInfoQuery(string solderPasteNo = null, string pcbPartNo = null |
||||
|
, string side = null, string status = null, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增錫膏資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SolderPasteInfo")] |
||||
|
ITask<ResultModel<SolderPasteInfo>> PostSolderPasteInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新錫膏資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SolderPasteInfo")] |
||||
|
ITask<ResultModel<SolderPasteInfo>> PutSolderPasteInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢錫膏資料 ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SolderPasteInfo/{id}")] |
||||
|
ITask<SolderPasteInfo> GetSolderPasteInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢錫膏資料 By No
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SolderPasteInfo/ByNo/{id}")] |
||||
|
ITask<List<SolderPasteInfo>> GetSolderPasteInfoByNo(string id); |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,61 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IPDS:IHttpApi |
||||
|
{ |
||||
|
#region PDS003 外包機種資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增外包機種資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SNKeyParts")] |
||||
|
ITask<ResultModel<SNKeyPart>> PostSNKeyPart([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新外包機種資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SNKeyParts/{id}")] |
||||
|
ITask<ResultModel<SNKeyPart>> PutSNKeyPart(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除外包機種資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/SNKeyParts/{id}")] |
||||
|
ITask<ResultModel<SNKeyPart>> DeleteSNKeyPart(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定外包機種資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SNKeyParts/{id}")] |
||||
|
ITask<List<SNKeyPart>> GetSNKeyPart(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取外包機種資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SNKeyParts")] |
||||
|
ITask<List<SNKeyPart>> GetSNKeyParts(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取外包機種資料by入庫單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SNKeyParts/StockInNo")] |
||||
|
ITask<List<SNKeyPart>> GetSNKeyPartByStockInNo(string no,int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,670 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IPPS:IHttpApi |
||||
|
{ |
||||
|
#region PPS001 工單狀態維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工單狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WipStatus")] |
||||
|
ITask<ResultModel<WipStatus>> PostWipStatus([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工單狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WipStatus/{id}")] |
||||
|
ITask<ResultModel<WipStatus>> PutWipStatus(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工單狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WipStatus/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWipStatus(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定工單狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipStatus/{id}")] |
||||
|
ITask<List<WipStatus>> GetWipStatus(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取工單狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipStatus")] |
||||
|
ITask<List<WipStatus>> GetWipStatus(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS002 條碼狀態維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增條碼狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/BarcodeStatus")] |
||||
|
ITask<ResultModel<BarcodeStatus>> PostBarcodeStatus([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新條碼狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/BarcodeStatus/{id}")] |
||||
|
ITask<ResultModel<BarcodeStatus>> PutBarcodeStatus(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除條碼狀態
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/BarcodeStatus/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteBarcodeStatus(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定條碼狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeStatus/{id}")] |
||||
|
ITask<List<BarcodeStatus>> GetBarcodeStatus(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取條碼狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeStatus")] |
||||
|
ITask<List<BarcodeStatus>> GetBarcodeStatus(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS003 機種C/T資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增機種C/T資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/CycleTimes")] |
||||
|
ITask<ResultModel<CycleTime>> PostCycleTime([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新機種C/T資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/CycleTimes/{id}")] |
||||
|
ITask<ResultModel<CycleTime>> PutCycleTime(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除機種C/T資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/CycleTimes/{id}")] |
||||
|
ITask<ResultModel<CycleTime>> DeleteCycleTime(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定機種C/T資料資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/CycleTimes/{id}")] |
||||
|
ITask<List<CycleTime>> GetCycleTime(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取機種C/T資料資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/CycleTimes")] |
||||
|
ITask<List<CycleTime>> GetCycleTimes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS005 異常群組維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ErrorGroups")] |
||||
|
ITask<ResultModel<ErrorGroup>> PostErrorGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ErrorGroups/{id}")] |
||||
|
ITask<ResultModel<ErrorGroup>> PutErrorGroup(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ErrorGroups/{id}")] |
||||
|
ITask<string> DeleteErrorGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorGroups/{id}")] |
||||
|
ITask<List<ErrorGroup>> GetErrorGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorGroups")] |
||||
|
ITask<List<ErrorGroup>> GetErrorGroups(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS006 異常類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ErrorClasses")] |
||||
|
ITask<ResultModel<ErrorClass>> PostErrorClass([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ErrorClasses/{id}")] |
||||
|
ITask<ResultModel<ErrorClass>> PutErrorClass(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ErrorClasses/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteErrorClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorClasses/{id}")] |
||||
|
ITask<List<ErrorClass>> GetErrorClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorClasses")] |
||||
|
ITask<List<ErrorClass>> GetErrorClasses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据群組代碼獲取類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorClasses/Group/{no}")] |
||||
|
ITask<List<ErrorClass>> GetErrorClassesByGroup(string no); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS007 異常原因維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ErrorReasons")] |
||||
|
ITask<ResultModel<ErrorReason>> PostErrorReason([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ErrorReasons/{id}")] |
||||
|
ITask<ResultModel<ErrorReason>> PutErrorReason(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ErrorReasons/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteErrorReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons/{id}")] |
||||
|
ITask<List<ErrorReason>> GetErrorReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons")] |
||||
|
ITask<List<ErrorReason>> GetErrorReasons(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据類別代碼獲取原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons/Class/{no}")] |
||||
|
ITask<List<ErrorReason>> GetErrorReasonsByClass(string no); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS008 不良現象群組維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增不良現象群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NGGroups")] |
||||
|
ITask<ResultModel<NGGroup>> PostNGGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良現象群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NGGroups/{id}")] |
||||
|
ITask<ResultModel<NGGroup>> PutNGGroup(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除不良現象群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/NGGroups/{id}")] |
||||
|
ITask<ResultModel<NGGroup>> DeleteNGGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定不良現象群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGGroups/{id}")] |
||||
|
ITask<List<NGGroup>> GetNGGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取不良現象群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGGroups")] |
||||
|
ITask<List<NGGroup>> GetNGGroups(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS009 不良現象類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增不良現象類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NGClasses")] |
||||
|
ITask<ResultModel<NGClass>> PostNGClass([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良現象類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NGClasses/{id}")] |
||||
|
ITask<ResultModel<NGClass>> PutNGClass(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除不良現象類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/NGClasses/{id}")] |
||||
|
ITask<ResultModel<NGClass>> DeleteNGClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定不良現象類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGClasses/{id}")] |
||||
|
ITask<List<NGClass>> GetNGClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取不良現象類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGClasses")] |
||||
|
ITask<List<NGClass>> GetNGClasses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据群組代碼獲取不良現象類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGClasses/Group/{no}")] |
||||
|
ITask<List<NGClass>> GetNGClassesByGroup(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS010 不良現象原因維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增不良現象原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NGReasons")] |
||||
|
ITask<ResultModel<NGReason>> PostNGReason([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良現象原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NGReasons/{id}")] |
||||
|
ITask<ResultModel<NGReason>> PutNGReason(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良現象原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NGReasons/{id}/{statusno}")] |
||||
|
ITask<ResultModel<NGReason>> PutNGReasonStatus(string id, string statusno); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除不良現象原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/NGReasons/{id}")] |
||||
|
ITask<ResultModel<NGReason>> DeleteNGReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定不良現象原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGReasons/{id}")] |
||||
|
ITask<List<NGReason>> GetNGReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取不良現象原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGReasons")] |
||||
|
ITask<List<NGReason>> GetNGReasons(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据類別代碼獲取不良現象原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NGReasons/Class/{no}")] |
||||
|
ITask<ResultModel<NGReason>> GetNGReasonsByClass(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS011 維修群組維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RMAGroups")] |
||||
|
ITask<ResultModel<RMAGroup>> PostRMAGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新維修群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RMAGroups/{id}")] |
||||
|
ITask<ResultModel<RMAGroup>> PutRMAGroup(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除維修群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RMAGroups/{id}")] |
||||
|
ITask<ResultModel<RMAGroup>> DeleteRMAGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定維修群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAGroups/{id}")] |
||||
|
ITask<List<RMAGroup>> GetRMAGroup(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取維修群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAGroups")] |
||||
|
ITask<List<RMAGroup>> GetRMAGroups(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS012 維修類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RMAClasses")] |
||||
|
ITask<ResultModel<RMAClass>> PostRMAClass([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新維修類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RMAClasses/{id}")] |
||||
|
ITask<ResultModel<RMAClass>> PutRMAClass(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除維修類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RMAClasses/{id}")] |
||||
|
ITask<ResultModel<RMAClass>> DeleteRMAClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定維修類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAClasses/{id}")] |
||||
|
ITask<List<RMAClass>> GetRMAClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取維修類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAClasses")] |
||||
|
ITask<List<RMAClass>> GetRMAClasses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据群組代碼獲取維修類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAClasses/Group/{no}")] |
||||
|
ITask<List<RMAClass>> GetRMAClassesByGroup(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS013 維修原因維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RMAReasons")] |
||||
|
ITask<ResultModel<RMAReason>> PostRMAReason([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新維修原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RMAReasons/{id}")] |
||||
|
ITask<ResultModel<RMAReason>> PutRMAReason(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除維修原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RMAReasons/{id}")] |
||||
|
ITask<ResultModel<RMAReason>> DeleteRMAReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定維修原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAReasons/{id}")] |
||||
|
ITask<List<RMAReason>> GetRMAReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取維修原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAReasons")] |
||||
|
ITask<List<RMAReason>> GetRMAReasons(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取維修原因資料(distinct)
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAReasons/GetDistinctRMAReason")] |
||||
|
ITask<ResultModel<dynamic>> GetDistinctRMAReason(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据類別代碼獲取維修原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RMAReasons/Class/{no}")] |
||||
|
ITask<List<RMAReason>> GetRMAReasonsByClass(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS014 維修方式維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修方式
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RepairTypes")] |
||||
|
ITask<ResultModel<RepairType>> PostRepairType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新維修方式
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RepairTypes/{id}")] |
||||
|
ITask<ResultModel<RepairType>> PutRepairType(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除維修方式
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RepairTypes/{id}")] |
||||
|
ITask<ResultModel<RepairType>> DeleteRepairType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定維修方式資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairTypes/{id}")] |
||||
|
ITask<List<RepairType>> GetRepairType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取維修方式資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairTypes")] |
||||
|
ITask<List<RepairType>> GetRepairTypes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS015 組件類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RepairItems")] |
||||
|
ITask<ResultModel<RepairItem>> PostRepairItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RepairItems/{id}")] |
||||
|
ITask<ResultModel<RepairItem>> PutRepairItem(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除組件類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RepairItems/{id}")] |
||||
|
ITask<ResultModel<RepairItem>> DeleteRepairItem(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定組件類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairItems/{id}")] |
||||
|
ITask<List<RepairItem>> GetRepairItem(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取組件類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairItems")] |
||||
|
ITask<List<RepairItem>> GetRepairItems(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region PPS016 問題類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增問題類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/QATypes")] |
||||
|
ITask<ResultModel<QAType>> PostQAType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新問題類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/QATypes/{id}")] |
||||
|
ITask<ResultModel<QAType>> PutQAType(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除問題類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/QATypes/{id}")] |
||||
|
ITask<ResultModel<QAType>> DeleteQAType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定問題類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QATypes/{id}")] |
||||
|
ITask<List<QAType>> GetQAType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取問題類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/QATypes")] |
||||
|
ITask<List<QAType>> GetQATypes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據PLM料號獲取指定資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("/api/PlmMeterialInfoe/{id}")] |
||||
|
ITask<List<PlmMeterialInfo>> GetPlmMeterialInfo(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據PLM料號獲取指定資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("/api/PlmBoms/GetPlmBom4REP001")] |
||||
|
ITask<List<PlmBom>> GetPlmBom4REP001(string itemNo,string locationNo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,358 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IREP:IHttpApi |
||||
|
{ |
||||
|
#region REP001 前判維修輸入
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據測試不良ID獲取指定不良資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgInfo/{id}")] |
||||
|
ITask<List<NgInfo>> GetNgInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據條碼獲取指定不良資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgInfo/Barcode/{no}")] |
||||
|
ITask<List<NgInfo>> GetNgInfoByBarcode(string no); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據維修狀態獲取指定不良資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgInfo/Status/{id}")] |
||||
|
ITask<List<NgInfo>> GetNgInfoByStatus(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據維修狀態獲取指定不良資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgInfo/GetNgInfoByStatus4REP001")] |
||||
|
ITask<ResultModel<dynamic>> GetNgInfoByStatus4REP001(int status,string factoryNo, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據NG_ID獲取指定不良零件資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgComponents/NGID/{id}")] |
||||
|
ITask<List<NgComponent>> GetNgComponentByNGID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據COMPONENT_ID獲取指定不良零件資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgComponents/{id}")] |
||||
|
ITask<List<NgComponent>> GetNgComponent(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良零件資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NgComponents/{id}")] |
||||
|
ITask<ResultModel<NgComponent>> PutNgComponent(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增不良零件資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NgComponents")] |
||||
|
ITask<ResultModel<NgComponent>> PostNgComponent([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據COMPONENT_ID獲取指定維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairRecords/{id}")] |
||||
|
ITask<List<RepairRecord>> GetRepairRecord(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據NG_ID獲取指定維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairRecords/NG_ID/{id}")] |
||||
|
ITask<List<RepairRecord>> GetRepairRecordByNgID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RepairRecords")] |
||||
|
ITask<ResultModel<RepairRecord>> PostRepairRecord([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RepairRecords/{id}")] |
||||
|
ITask<ResultModel<RepairRecord>> PutRepairRecord(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/{id}")] |
||||
|
ITask<List<NgRepair>> GetNgRepair(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修進/出條碼查詢
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairData4REP005")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairData4REP005(string stationID, string stateID, string dateStart, string dateEnd, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢維修資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairData4REP012")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairData4REP012(string productType, string testType, string unitNo, string lineID, string stationID, string wipNo, string itemNo, string dateStart, string dateEnd, string modelNo, string itemPN, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢維修資料by不良代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetErrorCode4REP012")] |
||||
|
ITask<ResultModel<dynamic>> GetErrorCode4REP012(string productType, string testType, string unitNo, string lineID, string stationID, string wipNo, string itemNo, string dateStart, string dateEnd, string modelNo, string itemPN); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢維修資料by维修代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRMACode4REP012")] |
||||
|
ITask<ResultModel<dynamic>> GetRMACode4REP012(string productType, string testType, string unitNo, string lineID, string stationID, string wipNo, string itemNo, string dateStart, string dateEnd, string modelNo, string itemPN); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢維修資料by维修代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetLocation4REP012")] |
||||
|
ITask<ResultModel<dynamic>> GetLocation4REP012(string productType, string testType, string unitNo, string lineID, string stationID, string wipNo, string itemNo, string dateStart, string dateEnd, string modelNo, string itemPN); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢維修資料by维修代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairResponsibleUnit4REP012")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairResponsibleUnit4REP012(string productType, string testType, string unitNo, string lineID, string stationID, string wipNo, string itemNo, string dateStart, string dateEnd, string modelNo, string itemPN); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢統計不良代碼by工單號碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetErrorCode4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetErrorCode4QRS018(string wipNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢統計維修代碼by工單號碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairCode4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairCode4QRS018(string wipNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢統計維修料號by工單號碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairPartNo4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairPartNo4QRS018(string wipNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據工單+站別+不良代碼查詢不良條碼明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetErrorCodeList4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetErrorCodeList4QRS018(string wipNo, int stationID, string ngNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據工單+站別+維修代碼查詢維修條碼明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairCodeList4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairCodeList4QRS018(string wipNo, int stationID, string repairNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據工單+站別+料號查詢維修條碼明細
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairPartNoList4QRS018")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairPartNoList4QRS018(string wipNo, int stationID, string partNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據COMPONENT_ID獲取指定維修過程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/Component/{id}")] |
||||
|
ITask<List<NgRepair>> GetNgRepairByComponent(decimal id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據REPAIR_ID獲取指定維修图片資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairBlobs/{id}")] |
||||
|
ITask<List<NgRepairBlob>> GetNgRepairBlob(decimal id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NgInfo")] |
||||
|
ITask<ResultModel<NgInfo>> PutNgInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增不良維修資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NgRepairs")] |
||||
|
ITask<ResultModel<NgRepair>> PostNgRepair([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新不良維修資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/NgRepairs/{id}")] |
||||
|
ITask<ResultModel<NgRepair>> PutNgRepair(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增維修圖片資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/NgRepairBlobs")] |
||||
|
ITask<ResultModel<NgRepairBlob>> PostNgRepairBlob([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除維修圖片資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/NgRepairBlobs/{id}")] |
||||
|
ITask<ResultModel<NgRepairBlob>> DeleteNgRepairBlob(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region 警報資料相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WipAlarms")] |
||||
|
ITask<ResultModel<WipAlarm>> PostWipAlarm([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WipAlarms/{id}")] |
||||
|
ITask<ResultModel<WipAlarm>> PutWipAlarm(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WipAlarms/{id}")] |
||||
|
ITask<ResultModel<WipAlarm>> DeleteWipAlarm(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據警報ID獲取指定警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipAlarms/{id}")] |
||||
|
ITask<List<WipAlarm>> GetWipAlarm(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取全部警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipAlarms")] |
||||
|
ITask<List<WipAlarm>> GetWipAlarms(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据警報類別ID獲取警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipAlarms/Type/{id}")] |
||||
|
ITask<ResultModel<WipAlarm>> GetWipAlarmsByType(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据警報類別ID+工單號碼獲取警報資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WipAlarms/GetWipAlarm2")] |
||||
|
ITask<ResultModel<WipAlarm>> GetWipAlarm2(int alarmTypeID, string wipNO, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region REP006 報廢轉出資料輸入
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據測試不良ID獲取指定報廢轉出資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeQngInfoes/{id}")] |
||||
|
ITask<List<BarcodeQngInfo>> GetBarcodeQngInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據條碼獲取指定報廢轉出資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeQngInfoes/Barcode/{no}")] |
||||
|
ITask<List<BarcodeQngInfo>> GetBarcodeQngInfoByBarcode(string no); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新報廢轉出資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/BarcodeQngInfoes/{id}")] |
||||
|
ITask<ResultModel<BarcodeQngInfo>> PutBarcodeQngInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增報廢轉出資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/BarcodeQngInfoes")] |
||||
|
ITask<ResultModel<BarcodeQngInfo>> PostBarcodeQngInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除報廢轉出資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/BarcodeQngInfoes/{id}")] |
||||
|
ITask<ResultModel<BarcodeQngInfo>> DeleteBarcodeQngInfo(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 報廢資料查詢
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeQngInfoes/GetQngInfoData4REP008")] |
||||
|
ITask<ResultModel<dynamic>> GetQngInfoData4REP008(string unitNo, string wipNo, string itemNo, string dateStart, string dateEnd, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 轉出資料查詢
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/BarcodeQngInfoes/GetQngInfoData4REP009")] |
||||
|
ITask<ResultModel<dynamic>> GetQngInfoData4REP009(string unitNo, string wipNo, string itemNo, string dateStart, string dateEnd, int page, int limit); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修進/出統計報表
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/NgRepairs/GetRepairData4REP013")] |
||||
|
ITask<ResultModel<dynamic>> GetRepairData4REP013(string wipNo, string itemNo, string dateStart, string dateEnd, int page, int limit); |
||||
|
} |
||||
|
} |
@ -0,0 +1,276 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface ISPC:IHttpApi |
||||
|
{ |
||||
|
#region SPC001 巡檢類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionTypes")] |
||||
|
ITask<ResultModel<InspectionType>> PostInspectionType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新巡檢類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/InspectionTypes/{id}")] |
||||
|
ITask<ResultModel<InspectionType>> PutInspectionType(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除巡檢類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/InspectionTypes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteInspectionType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionTypes/{id}")] |
||||
|
ITask<List<InspectionType>> GetInspectionType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取巡檢類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionTypes")] |
||||
|
ITask<List<InspectionType>> GetInspectionTypes(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SPC002 巡檢表單维護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢表單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionForms")] |
||||
|
ITask<ResultModel<InspectionForm>> PostInspectionForm([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新巡檢表單
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/InspectionForms/{id}")] |
||||
|
ITask<ResultModel<InspectionForm>> PutInspectionForm(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除巡檢表單维
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/InspectionForms/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteInspectionForm(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢表單資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionForms/{id}")] |
||||
|
ITask<List<InspectionForm>> GetInspectionForm(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取指定巡檢表單資料By Query
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionForms/Query/{id}/{status}")] |
||||
|
ITask<List<InspectionForm>> GetInspectionFormsByQuery(int id,string status); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取巡檢表單資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionForms")] |
||||
|
ITask<List<InspectionForm>> GetInspectionForms(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SPC003 巡檢細項維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢細項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionItems")] |
||||
|
ITask<ResultModel<InspectionItem>> PostInspectionItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新巡檢細項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/InspectionItems/{id}")] |
||||
|
ITask<ResultModel<InspectionItem>> PutInspectionItem(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除巡檢細項
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/InspectionItems/{id}")] |
||||
|
ITask<string> DeleteInspectionItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢細項資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionItems/{id}")] |
||||
|
ITask<List<InspectionItem>> GetInspectionItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢細項資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionItems/Form/{id}")] |
||||
|
ITask<List<InspectionItem>> GetInspectionItemsByFormID(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取巡檢細項資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionItems")] |
||||
|
ITask<List<InspectionItem>> GetInspectionItems(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SPC004 每日工時資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// InspectionResultDetail By Id and ItemID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultDetails/Query/{id}/{Iid}")] |
||||
|
ITask<List<InspectionResultDetail>> GetInspectionResultDetailByQuery(int id, int Iid); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// InspectionResultDetailDto
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultDetails/Query/{id}")] |
||||
|
ITask<List<InspectionResultDetailDto>> GetInspectionResultDetailQuery(int id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SPC005 巡檢結果維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionResultMasters")] |
||||
|
ITask<ResultModel<InspectionResultMaster>> PostInspectionResultMaster([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/InspectionResultMasters/{id}")] |
||||
|
ITask<ResultModel<InspectionResultMaster>> PutInspectionResultMaster(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/InspectionResultDetails/{id}")] |
||||
|
ITask<ResultModel<InspectionResultDetail>> PutInspectionResultDetail(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/InspectionResultMasters/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteInspectionResultMaster(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/{id}")] |
||||
|
ITask<List<InspectionResultMaster>> GetInspectionResultMaster(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters")] |
||||
|
ITask<List<InspectionResultMaster>> GetInspectionResultMasters(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/Form/{id}")] |
||||
|
ITask<List<InspectionResultMaster>> GetInspectionResultMastersByFormId(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/Query/{WipNo}/{ItemNo}/{BarcodeNo}/{StatusNo}")] |
||||
|
ITask<List<InspectionResultMaster>> GetInspectionResultMastersByQuery(string WipNo, string ItemNo, string BarcodeNo, string StatusNo); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据巡檢結果MASTER
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/QueryAll/{id}/{WipNo}/{ItemNo}/{BarcodeNo}/{StatusNo}/{sdate}/{edate}")] |
||||
|
ITask<ResultModel<InspectionResultMasterDto>> GetInspectionResultMastersByQueryAll(int id, string WipNo, string ItemNo, string BarcodeNo, string StatusNo, string sdate, string edate, int page = 0, int limit = 10); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取MASTER ID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultMasters/NewID")] |
||||
|
ITask<string> GetInspectionResultMastersNewID(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢結果Detail
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionResultDetails")] |
||||
|
ITask<ResultModel<InspectionResultDetail>> PostInspectionResultDetail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增巡檢結果Blob
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/InspectionResultBlobs")] |
||||
|
ITask<ResultModel<InspectionResultBlob>> PostInspectionResultBlob([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取指定巡檢表單Blob資料By Query
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultBlobs/Query/{id}/{itemID}")] |
||||
|
ITask<List<InspectionResultBlob>> GetInspectionResultBlobsByQuery(int id, int itemID); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定巡檢結果Details
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/InspectionResultDetails/{id}")] |
||||
|
ITask<List<InspectionResultDetail>> GetInspectionResultDetails(int id); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,596 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IWHS:IHttpApi |
||||
|
{ |
||||
|
#region WHS001 工作群組維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工作群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WorkGroups")] |
||||
|
ITask<ResultModel<WorkGroup>> PostWorkGroups([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工作群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WorkGroups/{id}")] |
||||
|
ITask<ResultModel<WorkGroup>> PutWorkGroups(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工作群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WorkGroups/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWorkGroups(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定工單狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkGroups/{id}")] |
||||
|
ITask<List<WorkGroup>> GetWorkGroups(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取工單狀態資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkGroups")] |
||||
|
ITask<List<WorkGroup>> GetWorkGroups(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS002 工時類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工時類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WorkClasses")] |
||||
|
ITask<ResultModel<WorkClass>> PostWorkClass([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工時類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WorkClasses/{id}")] |
||||
|
ITask<ResultModel<WorkClass>> PutWorkClass(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工時類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WorkClasses/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWorkClass(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定工時類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkClasses/{id}")] |
||||
|
ITask<List<WorkClass>> GetWorkClasses(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取工時類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkClasses")] |
||||
|
ITask<List<WorkClass>> GetWorkClasses(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS003 標準工時維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/StandardWorkTimes")] |
||||
|
ITask<ResultModel<StandardWorkTime>> PostStandardWorkTime([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/StandardWorkTimes/{id}")] |
||||
|
ITask<ResultModel<StandardWorkTime>> PutStandardWorkTime(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/StandardWorkTimes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteStandardWorkTime(int id); //yiru modify
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定標準工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimes/{id}")] |
||||
|
ITask<List<StandardWorkTime>> GetStandardWorkTime(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取標準工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimes")] |
||||
|
ITask<List<StandardWorkTime>> GetStandardWorkTimes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取標準工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimes/WHS003/{u}/{l}/{i}")] |
||||
|
ITask<List<StandardWorkTime>> GetStandardWorkTimes003(string u,int l,string i); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取標準工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimes/WHS005/{u}/{l}/{i}")] |
||||
|
ITask<List<StandardWorkTime>> GetStandardWorkTimes005(string u, string l, string i); |
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS006 每日工時資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增每日工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WorkManPowers")] |
||||
|
ITask<ResultModel<WorkManPower>> PostWorkManPower([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新每日工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WorkManPowers/{id}")] |
||||
|
ITask<ResultModel<WorkManPower>> PutWorkManPower(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除每日工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WorkManPowers/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteWorkManPower(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定每日工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkManPowers/{id}")] |
||||
|
ITask<List<WorkManPower>> GetWorkManPower(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取每日工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkManPowers")] |
||||
|
ITask<List<WorkManPower>> GetWorkManPowers(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢每日工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkManPowers/Query/{factoryid}/{unitid}/{lineid}/{classID}/{stationID}/{userNo}/{deptID}/{sdate}/{edate}")] |
||||
|
ITask<List<WorkManPower>> GetWorkManPowersByQuery(string factoryid, string unitid, string lineid, string classID, string stationID, string userNo, string deptID, string sdate, string edate); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS007 異常原因維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ErrorReasons")] |
||||
|
ITask<ResultModel<ErrorReason>> PostErrorReason([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ErrorReasons/{id}")] |
||||
|
ITask<ResultModel<ErrorReason>> PutErrorReason(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常原因
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ErrorReasons/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteErrorReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons/{id}")] |
||||
|
ITask<List<ErrorReason>> GetErrorReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons")] |
||||
|
ITask<List<ErrorReason>> GetErrorReasons(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据類別代碼獲取原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ErrorReasons/Class/{no}")] |
||||
|
ITask<List<ErrorReason>> GetErrorReasonsByClass(string no); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS008 工時援入/外資料維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工時援入/外
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SupportUsers")] |
||||
|
ITask<ResultModel<SupportUser>> PostSupportUser([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工時援入/外
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SupportUsers/{id}")] |
||||
|
ITask<ResultModel<SupportUser>> PutSupportUser(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工時援入/外
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/SupportUsers/{id}")] |
||||
|
ITask<ResultModel<SupportUser>> DeleteSupportUser(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取指定工時援入/外群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SupportUsers/")] |
||||
|
ITask<List<SupportUser>> GetSupportUsers(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定工時援入/外群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SupportUsers/{id}")] |
||||
|
ITask<List<SupportUser>> GetSupportUser(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 援入援外綜合查詢
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SupportUsers/Query/{f}/{type}/{unit}/{sd}/{ed}")] |
||||
|
ITask<List<SupportUser>> GetSupportUserByQuery(string f, string type, string unit, string sd, string ed); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS009 異常工時維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ExceptionWorktimes")] |
||||
|
ITask<ResultModel<ExceptionWorktime>> PostExceptionWorktime([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ExceptionWorktimes/{id}")] |
||||
|
ITask<ResultModel<ExceptionWorktime>> PutExceptionWorktime(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ExceptionWorktimes/{id}")] |
||||
|
ITask<ResultModel<ExceptionWorktime>> DeleteExceptionWorktime(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimes/{id}")] |
||||
|
ITask<List<ExceptionWorktime>> GetExceptionWorktime(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimes")] |
||||
|
ITask<List<ExceptionWorktime>> GetExceptionWorktimes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢線上異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimes/Query/{factoryid}/{unitid}/{lineid}/{deptid}/{sdate}/{edate}")] |
||||
|
ITask<List<ExceptionWorktime>> GetExceptionWorktimeByQuery(string factoryid, string unitid, string lineid, string deptid, string sdate, string edate); |
||||
|
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimes/ByQueryWHS009/{factoryid}/{unitid}/{lineid}/{deptid}/{sdate}/{edate}")] |
||||
|
ITask<List<ExceptionWorktimeDto>> GetExceptionWorktimeByQueryWHS009(string factoryid, string unitid, string lineid, string deptid, string sdate, string edate); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS011 重工標準工時維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/StandardWorkTimeReworks")] |
||||
|
ITask<ResultModel<StandardWorkTimeRework>> PostStandardWorkTimeRework([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/StandardWorkTimeReworks/{id}")] |
||||
|
ITask<ResultModel<StandardWorkTimeRework>> PutStandardWorkTimeRework(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/StandardWorkTimeReworks/{id}")] |
||||
|
ITask<ResultModel<StandardWorkTimeRework>> DeleteStandardWorkTimeRework(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimeReworks/{id}")] |
||||
|
ITask<List<StandardWorkTimeRework>> GetStandardWorkTimeRework(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取重工標準工時資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimeReworks")] |
||||
|
ITask<List<StandardWorkTimeRework>> GetStandardWorkTimeReworks(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据類別代碼獲取不良現象原因資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StandardWorkTimeReworks/Query/{wipno}/{sid}")] |
||||
|
ITask<List<StandardWorkTimeRework>> GetStandardWorkTimeReworkByQuery(string wipno, int sid); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS013 線上無效工時查詢
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定線上無效工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimeOline/{id}")] |
||||
|
ITask<List<ExceptionWorktimeOline>> GetExceptionWorktimeOline(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取線上無效工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimeOlines")] |
||||
|
ITask<List<ExceptionWorktimeOline>> GetExceptionWorktimeOlines(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢線上無效工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionWorktimeOlines/Query/{factoryid}/{unitid}/{lineid}/{deptid}/{sdate}/{edate}")] |
||||
|
ITask<List<ExceptionWorktimeOline>> GetExceptionWorktimeOlineByQuery(string factoryid, string unitid, string lineid, string deptid, string sdate, string edate); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS014 異常工時類別維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ExceptionClasses")] |
||||
|
ITask<ResultModel<ExceptionClass>> PostExceptionClass([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ExceptionClasses/{id}")] |
||||
|
ITask<ResultModel<ExceptionClass>> PutExceptionClass(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ExceptionClasses/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteExceptionClass(string id); //yiru modify
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常工時類別查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionClasses/{id}")] |
||||
|
ITask<List<ExceptionClass>> GetExceptionClass(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常工時類別查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionClasses")] |
||||
|
ITask<List<ExceptionClass>> GetExceptionClasses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢異常工時類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionClasses/Query/{id}")] |
||||
|
ITask<List<ExceptionClass>> GetExceptionClassesByGroup(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS015 異常工時代碼維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常工時代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ExceptionCodes")] |
||||
|
ITask<ResultModel<ExceptionCode>> PostExceptionCode([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常工時代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ExceptionCodes/{id}")] |
||||
|
ITask<ResultModel<ExceptionCode>> PutExceptionCode(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常工時代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ExceptionCodes/{id}")] |
||||
|
ITask<ResultModel<ExceptionCode>> DeleteExceptionCode(string id); |
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常工時代碼查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionCodes/{id}")] |
||||
|
ITask<List<ExceptionCode>> GetExceptionCode(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常工時代碼查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionCodes")] |
||||
|
ITask<List<ExceptionCode>> GetExceptionCodes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢異常工時代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionCodes/Query/{id}")] |
||||
|
ITask<List<ExceptionCode>> GetExceptionCodesByQuery(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS016 異常工時原因維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ExceptionReasons")] |
||||
|
ITask<ResultModel<ExceptionReason>> PostExceptionReason([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ExceptionReasons/{id}")] |
||||
|
ITask<ResultModel<ExceptionReason>> PutExceptionReason(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除重工標準工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ExceptionReasons/{id}")] |
||||
|
ITask<ResultModel<ExceptionReason>> DeleteExceptionReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定線上無效工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionReasons/{id}")] |
||||
|
ITask<List<ExceptionReason>> GetExceptionReason(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取線上無效工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionReasons")] |
||||
|
ITask<List<ExceptionReason>> GetExceptionReasons(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢線上無效工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ExceptionReasons/Query/{id}")] |
||||
|
ITask<List<ExceptionReason>> GetExceptionReasonsByQuery(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region WHS018 生產工時維護
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/WorkingHoursCollections")] |
||||
|
ITask<ResultModel<WorkingHoursCollection>> PostWorkingHoursCollection([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/WorkingHoursCollections/{id}")] |
||||
|
ITask<ResultModel<WorkingHoursCollection>> PutWorkingHoursCollection(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/WorkingHoursCollections/{id}")] |
||||
|
ITask<ResultModel<WorkingHoursCollection>> DeleteWorkingHoursCollection(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定異常工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkingHoursCollections/{id}")] |
||||
|
ITask<List<WorkingHoursCollection>> GetWorkingHoursCollection(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取異常工時查詢資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkingHoursCollections")] |
||||
|
ITask<List<WorkingHoursCollection>> GetWorkingHoursCollections(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢線上異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkingHoursCollections/ByQuery/{unitNo}/{lineid}/{stationid}/{wipno}/{itemno}/{user}/{sdate}/{edate}")] |
||||
|
ITask<List<WorkingHoursCollection>> GetWorkingHoursCollectionByQuery(string unitNo, string lineid, string stationid, string wipno, string itemno, string user, string sdate, string edate); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 查詢線上異常工時
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/WorkingHoursCollections/DtoByQuery/{unitNo}/{lineid}/{stationid}/{wipno}/{itemno}/{user}/{sdate}/{edate}")] |
||||
|
ITask<List<WorkingHoursCollectionDto>> GetWorkingHoursCollectionDtoByQuery(string unitNo, string lineid, string stationid, string wipno, string itemno, string user, string sdate, string edate); |
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.SYS; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IAuth:IHttpApi |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 登录处理
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/Auth/Login")] |
||||
|
ITask<LoginDTO> Login([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取认证信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Auth")] |
||||
|
//ITask<LoginResultDTO> AuthInfo();
|
||||
|
ITask<List<AuthInfo>> AuthInfo(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,913 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface IBAS: IHttpApi |
||||
|
{ |
||||
|
#region BAS001工廠資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增工廠
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FactoryInfoes")] |
||||
|
ITask<ResultModel<FactoryInfo>> PostFactoryInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新工廠
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FactoryInfoes/{id}")] |
||||
|
ITask<ResultModel<FactoryInfo>> PutFactoryInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除工廠
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FactoryInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFactoryInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定工廠資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FactoryInfoes/{id}")] |
||||
|
ITask<List<FactoryInfo>> GetFactoryInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取工廠資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FactoryInfoes")] |
||||
|
ITask<List<FactoryInfo>> GetFactoryInfoes(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS002生產製程單位維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增生產製程單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FactoryUnits")] |
||||
|
ITask<ResultModel<FactoryUnit>> PostFactoryUnit([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新生產製程單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FactoryUnits/{id}")] |
||||
|
ITask<ResultModel<FactoryUnit>> PutFactoryUnit(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除生產製程單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FactoryUnits/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFactoryUnit(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定生產製程單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FactoryUnits/{id}")] |
||||
|
ITask<List<FactoryUnit>> GetFactoryUnit(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取生產製程單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FactoryUnits")] |
||||
|
ITask<List<FactoryUnit>> GetFactoryUnits(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS003線別資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增線別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/LineInfoes")] |
||||
|
ITask<ResultModel<LineInfo>> PostLineInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新線別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/LineInfoes/{id}")] |
||||
|
ITask<ResultModel<LineInfo>> PutLineInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除線別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/LineInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteLineInfo(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定線別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/LineInfoes/{id}")] |
||||
|
ITask<List<LineInfo>> GetLineInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取線別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/LineInfoes")] |
||||
|
ITask<List<LineInfo>> GetLineInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据單位獲取線別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/LineInfoes/Unit/{id}")] |
||||
|
ITask<List<LineInfo>> GetLineInfoByUnit(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据單位獲取線別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/LineInfoes/List")] |
||||
|
ITask<List<ListObj>> GetLineInfoList(); |
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS005班別維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增班別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ClassInfoes")] |
||||
|
ITask<ResultModel<ClassInfo>> PostClassInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新班別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ClassInfoes/{id}")] |
||||
|
ITask<ResultModel<ClassInfo>> PutClassInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除班別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ClassInfoes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteClassInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定班別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ClassInfoes/{id}")] |
||||
|
ITask<List<ClassInfo>> GetClassInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取班別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ClassInfoes")] |
||||
|
ITask<List<ClassInfo>> GetClassInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据單位獲取班別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ClassInfoes/Unit/{id}")] |
||||
|
ITask<List<ClassInfo>> GetClassInfoByUnit(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS006時段資料檔維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增時段資料檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/TimeSegments")] |
||||
|
ITask<ResultModel<TimeSegment>> PostTimeSegment([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新時段資料檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/TimeSegments/{id}")] |
||||
|
ITask<ResultModel<TimeSegment>> PutTimeSegment(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除時段資料檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/TimeSegments/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteTimeSegment(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定時段資料檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/TimeSegments/{id}")] |
||||
|
ITask<List<TimeSegment>> GetTimeSegment(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取時段資料檔
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/TimeSegments")] |
||||
|
ITask<List<TimeSegment>> GetTimeSegments(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS007站別類別維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/StationTypes")] |
||||
|
ITask<ResultModel<StationType>> PostStationType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/StationTypes/{id}")] |
||||
|
ITask<ResultModel<StationType>> PutStationType(string id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/StationTypes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteStationType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StationTypes/{id}")] |
||||
|
ITask<List<StationType>> GetStationType(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/StationTypes")] |
||||
|
ITask<List<StationType>> GetStationTypes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS008站別維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/Stationses")] |
||||
|
ITask<ResultModel<Stations>> PostStations([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/Stationses/{id}")] |
||||
|
ITask<ResultModel<Stations>> PutStations(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除站別類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/Stationses/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteStations(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Stationses/{id}")] |
||||
|
ITask<List<Stations>> GetStations(int id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据單位獲取站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Stationses/Unit/{id}")] |
||||
|
ITask<List<Stations>> GetStationsByUnit(string id); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Stationses")] |
||||
|
ITask<List<Stations>> GetStationses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取F/T站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Stationses/FT/{id}")] |
||||
|
ITask<List<Stations>> GetStations4FT(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS009流程資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FlowRules")] |
||||
|
ITask<ResultModel<FlowRule>> PostFlowRule([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 複製流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/FlowRules/{id}")] |
||||
|
ITask<ResultModel<FlowRule>> PostFlowRuleCopy(int id,[FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/FlowRules/{id}")] |
||||
|
ITask<ResultModel<FlowRule>> PutFlowRule(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/FlowRules/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteFlowRule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FlowRules/{id}")] |
||||
|
ITask<List<FlowRule>> GetFlowRule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FlowRules")] |
||||
|
ITask<List<FlowRule>> GetFlowRules(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据製程單位獲取流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/FlowRules/Unit/{no}")] |
||||
|
ITask<List<FlowRule>> GetFlowRulesByUnit(string no, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS010流程站别維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增流程站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RuleStations")] |
||||
|
ITask<ResultModel<RuleStation>> PostRuleStation([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新流程站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RuleStations/{id}")] |
||||
|
ITask<ResultModel<RuleStation>> PutRuleStation(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除流程站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RuleStations/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteRuleStation(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuleStations/{id}")] |
||||
|
ITask<List<RuleStation>> GetRuleStation(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuleStations")] |
||||
|
ITask<List<RuleStation>> GetRuleStations(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据流程ID獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuleStations/Flow/{id}")] |
||||
|
ITask<List<RuleStation>> GetRuleStationsByFlow(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据流程ID獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuleStations/Flow2/{id}")] |
||||
|
ITask<List<RuleStation>> GetRuleStationsByFlow2(string id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuleStations/Unit/{id}")] |
||||
|
ITask<List<RuleStation>> GetRuleStationByUnit(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS011流程規則維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增流程規則
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/Rules")] |
||||
|
ITask<ResultModel<Rules>> PostRules([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新流程站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/Rules/{id}")] |
||||
|
ITask<ResultModel<Rules>> PutRules(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除流程站別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/Rules/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteRules(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據規則ID獲取指定流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Rules/{id}")] |
||||
|
ITask<List<Rules>> GetRules(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Rules/GetRules")] |
||||
|
ITask<List<Rules>> GetRules(int id, string ruleStatus, int nextStationID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Rules/GetRules2")] |
||||
|
ITask<List<Rules>> GetRules2(int flowRuleID, int id, string ruleStatus, int nextStationID); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Rules")] |
||||
|
ITask<List<Rules>> GetRuleses(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据流程ID獲取流程站別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/Rules/Flow/{id}")] |
||||
|
ITask<List<Rules>> GetRulesesByFlow(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS014責任單位資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增責任單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RepairResponsibleUnitses")] |
||||
|
ITask<ResultModel<RepairResponsibleUnits>> PostRepairResponsibleUnits([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新責任單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RepairResponsibleUnitses/{id}")] |
||||
|
ITask<ResultModel<RepairResponsibleUnits>> PutRepairResponsibleUnits(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除責任單位
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RepairResponsibleUnitses/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteRepairResponsibleUnits(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定責任單位資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairResponsibleUnitses/{id}")] |
||||
|
ITask<List<RepairResponsibleUnits>> GetRepairResponsibleUnits(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據維修原因代碼獲取指定責任單位資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairResponsibleUnitses/Query/{no}")] |
||||
|
ITask<List<RepairResponsibleUnits>> GetRepairResponsibleUnitsByReasonNo(string no); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取責任單位資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RepairResponsibleUnitses")] |
||||
|
ITask<List<RepairResponsibleUnits>> GetRepairResponsibleUnitses(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS015Mail群組類別維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增Mail群組類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MailGroups")] |
||||
|
ITask<ResultModel<MailGroup>> PostMailGroup([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新Mail群組類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MailGroups/{id}")] |
||||
|
ITask<ResultModel<MailGroup>> PutMailGroup(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除Mail群組類別
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MailGroups/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMailGroup(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定Mail群組類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MailGroups/{id}")] |
||||
|
ITask<List<MailGroup>> GetMailGroup(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取Mail群組類別資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MailGroups")] |
||||
|
ITask<List<MailGroup>> GetMailGroups(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS016Mail群組資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增Mail群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MailGroupDetails")] |
||||
|
ITask<ResultModel<MailGroupDetail>> PostMailGroupDetail([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新Mail群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MailGroupDetails/{id}")] |
||||
|
ITask<ResultModel<MailGroupDetail>> PutMailGroupDetail(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除Mail群組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MailGroupDetails/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMailGroupDetail(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定Mail群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MailGroupDetails/{id}")] |
||||
|
ITask<List<MailGroupDetail>> GetMailGroupDetail(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取Mail群組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MailGroupDetails")] |
||||
|
ITask<List<MailGroupDetailDto>> GetMailGroupDetails(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据角色ID獲取用户角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MailGroupDetails/Group/{id}")] |
||||
|
ITask<List<MailGroupDetailDto>> GetMailGroupDetailByGroup(int id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region 測試代碼資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增測試代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/TestTypes")] |
||||
|
ITask<ResultModel<TestType>> PostTestType([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新測試代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/TestTypes/{id}")] |
||||
|
ITask<ResultModel<TestType>> PutTestType(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除測試代碼
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/TestTypes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteTestType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定測試代碼資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/TestTypes/{id}")] |
||||
|
ITask<List<TestType>> GetTestType(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取測試代碼資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/TestTypes")] |
||||
|
ITask<List<TestType>> GetTestTypes(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS012料號流程資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增料號流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MaterialFlows")] |
||||
|
ITask<ResultModel<MaterialFlow>> PostMaterialFlows([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新料號流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MaterialFlows/{id}")] |
||||
|
ITask<ResultModel<MaterialFlow>> PutMaterialFlows(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除料號流程
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialFlows/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMaterialFlows(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定料號流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialFlows/Query/{itemno}/{unitNo}")] |
||||
|
ITask<List<MaterialFlow>> GetMaterialFlowsByQuery(string itemno, string unitNo, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定料號流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialFlows/{id}")] |
||||
|
ITask<List<MaterialFlow>> GetMaterialFlow(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號流程資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialFlows")] |
||||
|
ITask<List<MaterialFlow>> GetMaterialFlows(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS013料號燒机時間維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增料號燒机時間
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RuninTimes")] |
||||
|
ITask<ResultModel<RuninTime>> PostRuninTimes([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新料號燒机時間
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RuninTimes/{id}")] |
||||
|
ITask<ResultModel<RuninTime>> PutRuninTimes(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除料號燒机時間
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RuninTimes/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteRuninTimes(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據itemno獲取指定料號燒机時間資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuninTimes/ItemNo/{id}")] |
||||
|
ITask<List<RuninTime>> GetRuninTime(string id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號燒机時間資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuninTimes")] |
||||
|
ITask<List<RuninTime>> GetRuninTimes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據id獲取指定料號燒机時間資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RuninTimes/{id}")] |
||||
|
ITask<List<RuninTime>> GetRuninTime(int id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取工單屬性資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ProcessTypes")] |
||||
|
ITask<List<AMESCoreStudio.WebApi.Models.AMES.ProcessType>> GetProcessType(); |
||||
|
|
||||
|
#region BAS017料號工作項目對應維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增料號工作項目對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MaterialStationsItem")] |
||||
|
ITask<ResultModel<MaterialStationsItem>> PostMaterialStationsItem([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新料號工作項目對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MaterialStationsItem/{id}")] |
||||
|
ITask<ResultModel<MaterialStationsItem>> PutMaterialStationsItem(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除料料號工作項目對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialStationsItem/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMaterialStationsItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定料號工作項目對應資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialStationsItem/{id}")] |
||||
|
ITask<List<MaterialStationsItem>> GetMaterialStationsItem(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號工作項目資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialStationsItems")] |
||||
|
ITask<List<MaterialStationsItem>> GetMaterialStationsItems(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號工作項目對應ByItemID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialStationsItem/ByItemID/{id}")] |
||||
|
ITask<List<MaterialStationsItem>> GetMaterialStationsItemByItemID(int id); |
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS018料號治具對應維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增料號治具對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/MaterialOutfit")] |
||||
|
ITask<ResultModel<MaterialOutfit>> PostMaterialOutfit([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新料號治具對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/MaterialOutfit/{id}")] |
||||
|
ITask<ResultModel<MaterialOutfit>> PutMaterialOutfit(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除料料號治具對應
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/MaterialOutfit/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteMaterialOutfit(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定料號治具對應資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialOutfit/{id}")] |
||||
|
ITask<List<MaterialOutfit>> GetMaterialOutfit(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號治具資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialOutfit")] |
||||
|
ITask<List<MaterialOutfit>> GetMaterialOutfits(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取料號治具對應ByItemID
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/MaterialOutfit/ByItemID/{id}")] |
||||
|
ITask<List<MaterialOutfit>> GetMaterialOutfitByItemID(int id); |
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region BAS019出貨序號編碼規則維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增出貨序號編碼規則
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SerialRules")] |
||||
|
ITask<ResultModel<SerialRule>> PostSerialRule([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新出貨序號編碼規則
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SerialRules/{id}")] |
||||
|
ITask<ResultModel<SerialRule>> PutSerialRule(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除出貨序號編碼規則
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/SerialRules/{id}")] |
||||
|
ITask<ResultModel<string>> DeleteSerialRule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定出貨序號編碼規則
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SerialRules/{id}")] |
||||
|
ITask<List<SerialRule>> GetSerialRule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取出貨序號編碼規則資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SerialRules")] |
||||
|
ITask<List<SerialRule>> GetSerialRules(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取出貨序號編碼規則ByItemNo
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SerialRules/ItemNo/{id}")] |
||||
|
ITask<List<SerialRule>> GetSerialRuleByItemNo(string id, int page = 0, int limit = 10); |
||||
|
|
||||
|
|
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.Extensions.FileProviders; |
||||
|
using Microsoft.AspNetCore.Builder; |
||||
|
using System.IO; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public interface IFileServerProvider |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Contains a list of FileServer options, a combination of virtual + physical paths we can access at any time
|
||||
|
/// </summary>
|
||||
|
IList<FileServerOptions> FileServerOptionsCollection { get; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Gets the IFileProvider to access a physical location by using its virtual path
|
||||
|
/// </summary>
|
||||
|
IFileProvider GetProvider(string virtualPath); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Implements IFileServerProvider in a very simple way, for demonstration only
|
||||
|
/// </summary>
|
||||
|
public class FileServerProvider : IFileServerProvider |
||||
|
{ |
||||
|
public IList<FileServerOptions> FileServerOptionsCollection { get; } |
||||
|
|
||||
|
public FileServerProvider(IList<FileServerOptions> fileServerOptions) |
||||
|
{ |
||||
|
FileServerOptionsCollection = fileServerOptions; |
||||
|
} |
||||
|
|
||||
|
public IFileProvider GetProvider(string virtualPath) |
||||
|
{ |
||||
|
var options = FileServerOptionsCollection.FirstOrDefault(e => e.RequestPath == virtualPath); |
||||
|
if (options != null) |
||||
|
return options.FileProvider; |
||||
|
|
||||
|
throw new FileNotFoundException($"virtual path {virtualPath} is not registered in the fileserver provider"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class FileServerProviderExtensions |
||||
|
{ |
||||
|
public static IApplicationBuilder UseFileServerProvider(this IApplicationBuilder application, IFileServerProvider fileServerprovider) |
||||
|
{ |
||||
|
foreach (var option in fileServerprovider.FileServerOptionsCollection) |
||||
|
{ |
||||
|
application.UseFileServer(option); |
||||
|
} |
||||
|
return application; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,437 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using WebApiClient; |
||||
|
using WebApiClient.Attributes; |
||||
|
using AMESCoreStudio.WebApi; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using AMESCoreStudio.WebApi.Models.SYS; |
||||
|
using AMESCoreStudio.CommonTools.Result; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
[JsonReturn] |
||||
|
public interface ISYS : IHttpApi |
||||
|
{ |
||||
|
#region SYS001系統資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增系統
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/SystemInfoes")] |
||||
|
ITask<ResultModel<SystemInfo>> PostSystemInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新系統
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/SystemInfoes/{id}")] |
||||
|
ITask<ResultModel<SystemInfo>> PutSystemInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除系統
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/SystemInfoes/{id}")] |
||||
|
ITask<ResultModel<SystemInfo>> DeleteSystemInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定系統資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SystemInfoes/{id}")] |
||||
|
ITask<List<SystemInfo>> GetSystemInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取系統資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/SystemInfoes")] |
||||
|
ITask<ResultModel<SystemInfo>> GetSystemInfoes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS002模組資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增模組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ModuleInfoes")] |
||||
|
ITask<ResultModel<ModuleInfo>> PostModuleInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新模組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ModuleInfoes/{id}")] |
||||
|
ITask<ResultModel<ModuleInfo>> PutModuleInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除模組
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ModuleInfoes/{id}")] |
||||
|
ITask<ResultModel<ModuleInfo>> DeleteModuleInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定模組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ModuleInfoes/{id}")] |
||||
|
ITask<List<ModuleInfo>> GetModuleInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取模組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ModuleInfoes")] |
||||
|
ITask<List<ModuleInfo>> GetModuleInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据系統獲取模組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ModuleInfoes/System/{id}")] |
||||
|
ITask<ResultModel<ModuleInfo>> GetModuleInfoesBySystem(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS003功能資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/ProgramInfoes")] |
||||
|
ITask<ResultModel<ProgramInfo>> PostProgramInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/ProgramInfoes/{id}")] |
||||
|
ITask<ResultModel<ProgramInfo>> PutProgramInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/ProgramInfoes/{id}")] |
||||
|
ITask<ResultModel<ProgramInfo>> DeleteProgramInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ProgramInfoes/{id}")] |
||||
|
ITask<List<ProgramInfo>> GetProgramInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ProgramInfoes")] |
||||
|
ITask<List<ProgramInfo>> GetProgramInfoes(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据模组编号獲取功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ProgramInfoes/Module/{id}")] |
||||
|
ITask<ResultModel<ProgramInfo>> GetProgramInfoesByMoudle(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据系統+模组獲取模組資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/ProgramInfoes/GetProgramInfoesBySystemModule")] |
||||
|
ITask<ResultModel<dynamic>> GetProgramInfoesBySystemModule(int systemID,int moduleID, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS004角色資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RoleInfoes")] |
||||
|
ITask<ResultModel<RoleInfo>> PostRoleInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RoleInfoes/{id}")] |
||||
|
ITask<ResultModel<RoleInfo>> PutRoleInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RoleInfoes/{id}")] |
||||
|
ITask<ResultModel<RoleInfo>> DeleteRoleInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleInfoes/{id}")] |
||||
|
ITask<List<RoleInfo>> GetRoleInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleInfoes")] |
||||
|
ITask<ResultModel<RoleInfo>> GetRoleInfoes(int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS005角色模组資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增角色模组
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RoleModules")] |
||||
|
ITask<ResultModel<RoleModule>> PostRoleModule([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新角色模组
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RoleModules/{id}")] |
||||
|
ITask<ResultModel<RoleModule>> PutRoleModule(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除角色模组
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RoleModules/{id}")] |
||||
|
ITask<ResultModel<RoleModule>> DeleteRoleModule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定角色模组資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleModules/{id}")] |
||||
|
ITask<List<RoleModule>> GetRoleModule(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取角色模组資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleModules")] |
||||
|
ITask<List<RoleModule>> GetRoleModules(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据用户ID獲取所有角色模组資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleModules/User/{id}")] |
||||
|
ITask<ResultModel<dynamic>> GetRoleModulesByUser(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据角色ID獲取角色模组資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RoleModules/Role/{id}")] |
||||
|
ITask<ResultModel<RoleModule>> GetRoleModulesByRole(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS006角色功能資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增角色功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/RolePrograms")] |
||||
|
ITask<ResultModel<RoleProgram>> PostRoleProgram([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新角色功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/RolePrograms/{id}")] |
||||
|
ITask<ResultModel<RoleProgram>> PutRoleProgram(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除角色功能
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/RolePrograms/{id}")] |
||||
|
ITask<ResultModel<RoleProgram>> DeleteRoleProgram(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定角色功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RolePrograms/{id}")] |
||||
|
ITask<List<RoleProgram>> GetRoleProgram(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取角色功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RolePrograms")] |
||||
|
ITask<List<RoleProgram>> GetRolePrograms(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据用户ID獲取所有角色功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RolePrograms/User/{id}")] |
||||
|
ITask<ResultModel<dynamic>> GetRoleProgramsByUser(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据角色ID獲取角色功能資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/RolePrograms/Role/{id}")] |
||||
|
ITask<ResultModel<RoleProgram>> GetRoleProgramsByRole(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS007部门資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增部门
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/DeptInfoes")] |
||||
|
ITask<ResultModel<DeptInfo>> PostDeptInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新部门
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/DeptInfoes/{id}")] |
||||
|
ITask<ResultModel<DeptInfo>> PutDeptInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除部门
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/DeptInfoes/{id}")] |
||||
|
ITask<ResultModel<DeptInfo>> DeleteDeptInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定部门資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/DeptInfoes/{id}")] |
||||
|
ITask<List<DeptInfo>> GetDeptInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取部门資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/DeptInfoes")] |
||||
|
ITask<List<DeptInfo>> GetDeptInfoes(); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS008用户資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增用户
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/UserInfoes")] |
||||
|
ITask<ResultModel<UserInfo>> PostUserInfo([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新用户
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/UserInfoes/{id}")] |
||||
|
ITask<ResultModel<UserInfo>> PutUserInfo(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除用户
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/UserInfoes/{id}")] |
||||
|
ITask<ResultModel<UserInfo>> DeleteUserInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定用户資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserInfoes/{id}")] |
||||
|
ITask<List<UserInfo>> GetUserInfo(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定用户關聯資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserInfoes/GetUserData")] |
||||
|
ITask<ResultModel<dynamic>> GetUserData(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取用户資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserInfoes")] |
||||
|
ITask<ResultModel<UserInfo>> GetUserInfoes(int page = 0, int limit = 10); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用UserNo 查詢
|
||||
|
/// </summary>
|
||||
|
/// <param name="id">UserNo</param>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserInfoes/ByUserNo/{id}")] |
||||
|
ITask<UserInfo> GetUserInfoByUserNo(string id); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region SYS009用户角色資料維護相關
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增用户角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPost("api/UserRoles")] |
||||
|
ITask<ResultModel<UserRole>> PostUserRole([FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新用户角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpPut("api/UserRoles/{id}")] |
||||
|
ITask<ResultModel<UserRole>> PutUserRole(int id, [FromBody, RawJsonContent] string model); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刪除用户角色
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpDelete("api/UserRoles/{id}")] |
||||
|
ITask<ResultModel<UserRole>> DeleteUserRole(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根據ID獲取指定用户角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserRoles/{id}")] |
||||
|
ITask<List<UserRole>> GetUserRole(int id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 獲取用户角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserRoles")] |
||||
|
ITask<List<UserRole>> GetUserRoles(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据角色ID獲取用户角色資料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[WebApiClient.Attributes.HttpGet("api/UserRoles/User/{id}")] |
||||
|
ITask<ResultModel<UserRole>> GetUserRolesByUser(int id, int page = 0, int limit = 10); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Models |
||||
|
{ |
||||
|
public class ErrorViewModel |
||||
|
{ |
||||
|
public string RequestId { get; set; } |
||||
|
|
||||
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.Models |
||||
|
{ |
||||
|
public class Table |
||||
|
{ |
||||
|
public int code { get; set; } = 0; |
||||
|
public string msg { get; set; } |
||||
|
public int count { get; set; } |
||||
|
public dynamic data { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Result |
||||
|
{ |
||||
|
public bool success { get; set; } = true; |
||||
|
public string msg { get; set; } = "成功!"; |
||||
|
public dynamic data { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Result1 : Result |
||||
|
{ |
||||
|
public dynamic data1 { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public class LoginViewModel |
||||
|
{ |
||||
|
[Required] |
||||
|
public string LoginNo { get; set; } = "admin"; |
||||
|
[Required] |
||||
|
public string LoginPassword { get; set; } = "admin"; |
||||
|
|
||||
|
public string Language { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Hosting; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
using Microsoft.Extensions.Hosting; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public class Program |
||||
|
{ |
||||
|
public static void Main(string[] args) |
||||
|
{ |
||||
|
CreateHostBuilder(args).Build().Run(); |
||||
|
} |
||||
|
|
||||
|
public static IHostBuilder CreateHostBuilder(string[] args) |
||||
|
{ |
||||
|
var configuration = new ConfigurationBuilder() |
||||
|
.SetBasePath(Environment.CurrentDirectory) |
||||
|
.AddJsonFile("appsettings.json") |
||||
|
.Build(); |
||||
|
configuration.GetSection("Setting").Bind(AppSetting.Setting); |
||||
|
|
||||
|
if (AppSetting.Setting.Urls.ToString()=="") |
||||
|
AppSetting.Setting.Urls = "http://*:8080"; |
||||
|
|
||||
|
return Host.CreateDefaultBuilder(args) |
||||
|
.ConfigureWebHostDefaults(webBuilder => |
||||
|
{ |
||||
|
webBuilder.UseStartup<Startup>() |
||||
|
.UseUrls(AppSetting.Setting.Urls); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
public static IHostBuilder CreateHostBuilder(string[] args) => |
||||
|
Host.CreateDefaultBuilder(args) |
||||
|
.ConfigureWebHostDefaults(webBuilder => |
||||
|
{ |
||||
|
webBuilder.UseStartup<Startup>(); |
||||
|
}); |
||||
|
*/ |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- |
||||
|
https://go.microsoft.com/fwlink/?LinkID=208121. |
||||
|
--> |
||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<PropertyGroup> |
||||
|
<DeleteExistingFiles>False</DeleteExistingFiles> |
||||
|
<ExcludeApp_Data>False</ExcludeApp_Data> |
||||
|
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> |
||||
|
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> |
||||
|
<LastUsedPlatform>Any CPU</LastUsedPlatform> |
||||
|
<PublishProvider>FileSystem</PublishProvider> |
||||
|
<PublishUrl>bin\Release\netcoreapp3.1\publish\</PublishUrl> |
||||
|
<WebPublishMethod>FileSystem</WebPublishMethod> |
||||
|
</PropertyGroup> |
||||
|
</Project> |
@ -0,0 +1,11 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<!-- |
||||
|
https://go.microsoft.com/fwlink/?LinkID=208121. |
||||
|
--> |
||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
|
<PropertyGroup> |
||||
|
<_PublishTargetUrl>D:\Ray_Work\AMES\AMESCoreStudio.Web\bin\Release\netcoreapp3.1\publish\</_PublishTargetUrl> |
||||
|
<History>True|2023-03-29T06:11:49.5115381Z;True|2023-03-17T15:58:26.7200532+08:00;True|2023-03-17T15:53:24.2052151+08:00;True|2023-03-17T15:49:32.1327666+08:00;True|2023-03-17T15:44:37.4769083+08:00;True|2023-03-17T15:39:00.9800860+08:00;True|2023-03-17T14:49:16.5234356+08:00;False|2023-03-17T14:43:44.0797916+08:00;True|2023-03-16T10:00:02.7534836+08:00;False|2023-03-16T09:51:59.1142764+08:00;False|2023-03-16T09:49:40.1872120+08:00;True|2023-02-10T13:36:28.1221228+08:00;</History> |
||||
|
<LastFailureDetails /> |
||||
|
</PropertyGroup> |
||||
|
</Project> |
@ -0,0 +1,27 @@ |
|||||
|
{ |
||||
|
"iisSettings": { |
||||
|
"windowsAuthentication": false, |
||||
|
"anonymousAuthentication": true, |
||||
|
"iisExpress": { |
||||
|
"applicationUrl": "http://localhost:8081", |
||||
|
"sslPort": 0 |
||||
|
} |
||||
|
}, |
||||
|
"profiles": { |
||||
|
"IIS Express": { |
||||
|
"commandName": "IISExpress", |
||||
|
"launchBrowser": true, |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
} |
||||
|
}, |
||||
|
"AMESCoreStudio.Web": { |
||||
|
"commandName": "Project", |
||||
|
"launchBrowser": true, |
||||
|
"environmentVariables": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"applicationUrl": "https://localhost:5001;http://localhost:5000" |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,123 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="Test" xml:space="preserve"> |
||||
|
<value>测试</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,123 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="Test" xml:space="preserve"> |
||||
|
<value>測試</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,120 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
</root> |
@ -0,0 +1,132 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="SYSTEM_DESC" xml:space="preserve"> |
||||
|
<value>系統描述</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_ID" xml:space="preserve"> |
||||
|
<value>系統編號</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NAME" xml:space="preserve"> |
||||
|
<value>系統名稱</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NO" xml:space="preserve"> |
||||
|
<value>系統代碼</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,132 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="SYSTEM_DESC" xml:space="preserve"> |
||||
|
<value>系統描述</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_ID" xml:space="preserve"> |
||||
|
<value>系統編號</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NAME" xml:space="preserve"> |
||||
|
<value>系統名稱</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NO" xml:space="preserve"> |
||||
|
<value>系統代碼</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,132 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="SYSTEM_DESC" xml:space="preserve"> |
||||
|
<value>系統描述</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_ID" xml:space="preserve"> |
||||
|
<value>系統編號</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NAME" xml:space="preserve"> |
||||
|
<value>系統名稱</value> |
||||
|
</data> |
||||
|
<data name="SYSTEM_NO" xml:space="preserve"> |
||||
|
<value>系統代碼</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,126 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="Hello" xml:space="preserve"> |
||||
|
<value>您好</value> |
||||
|
</data> |
||||
|
<data name="Test" xml:space="preserve"> |
||||
|
<value>測試</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,123 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<root> |
||||
|
<!-- |
||||
|
Microsoft ResX Schema |
||||
|
|
||||
|
Version 2.0 |
||||
|
|
||||
|
The primary goals of this format is to allow a simple XML format |
||||
|
that is mostly human readable. The generation and parsing of the |
||||
|
various data types are done through the TypeConverter classes |
||||
|
associated with the data types. |
||||
|
|
||||
|
Example: |
||||
|
|
||||
|
... ado.net/XML headers & schema ... |
||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
|
<resheader name="version">2.0</resheader> |
||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
|
</data> |
||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
|
<comment>This is a comment</comment> |
||||
|
</data> |
||||
|
|
||||
|
There are any number of "resheader" rows that contain simple |
||||
|
name/value pairs. |
||||
|
|
||||
|
Each data row contains a name, and value. The row also contains a |
||||
|
type or mimetype. Type corresponds to a .NET class that support |
||||
|
text/value conversion through the TypeConverter architecture. |
||||
|
Classes that don't support this are serialized and stored with the |
||||
|
mimetype set. |
||||
|
|
||||
|
The mimetype is used for serialized objects, and tells the |
||||
|
ResXResourceReader how to depersist the object. This is currently not |
||||
|
extensible. For a given mimetype the value must be set accordingly: |
||||
|
|
||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
|
that the ResXResourceWriter will generate, however the reader can |
||||
|
read any of the formats listed below. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
|
value : The object must be serialized with |
||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
|
: and then encoded with base64 encoding. |
||||
|
|
||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
|
value : The object must be serialized into a byte array |
||||
|
: using a System.ComponentModel.TypeConverter |
||||
|
: and then encoded with base64 encoding. |
||||
|
--> |
||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
|
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:choice maxOccurs="unbounded"> |
||||
|
<xsd:element name="metadata"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="assembly"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:attribute name="alias" type="xsd:string" /> |
||||
|
<xsd:attribute name="name" type="xsd:string" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="data"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
|
<xsd:attribute ref="xml:space" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
<xsd:element name="resheader"> |
||||
|
<xsd:complexType> |
||||
|
<xsd:sequence> |
||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
|
</xsd:sequence> |
||||
|
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:choice> |
||||
|
</xsd:complexType> |
||||
|
</xsd:element> |
||||
|
</xsd:schema> |
||||
|
<resheader name="resmimetype"> |
||||
|
<value>text/microsoft-resx</value> |
||||
|
</resheader> |
||||
|
<resheader name="version"> |
||||
|
<value>2.0</value> |
||||
|
</resheader> |
||||
|
<resheader name="reader"> |
||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<resheader name="writer"> |
||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
|
</resheader> |
||||
|
<data name="Login" xml:space="preserve"> |
||||
|
<value>登錄</value> |
||||
|
</data> |
||||
|
</root> |
@ -0,0 +1,14 @@ |
|||||
|
using Microsoft.Extensions.Localization; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public class SharedResource |
||||
|
{ |
||||
|
private readonly IStringLocalizer _localizer; |
||||
|
|
||||
|
public SharedResource(IStringLocalizer<SharedResource> localizer) |
||||
|
{ |
||||
|
_localizer = localizer; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,195 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Authentication.Cookies; |
||||
|
using Microsoft.AspNetCore.Builder; |
||||
|
using Microsoft.AspNetCore.Hosting; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.Extensions.Configuration; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.Hosting; |
||||
|
using Microsoft.Extensions.FileProviders; |
||||
|
using WebApiClient; |
||||
|
using System.Globalization; |
||||
|
using Microsoft.AspNetCore.Mvc.Razor; |
||||
|
using Microsoft.AspNetCore.Localization; |
||||
|
using AMESCoreStudio.Web.Code; |
||||
|
using Microsoft.AspNetCore.Http.Features; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web |
||||
|
{ |
||||
|
public class Startup |
||||
|
{ |
||||
|
public Startup(IConfiguration configuration) |
||||
|
{ |
||||
|
Configuration = configuration; |
||||
|
} |
||||
|
|
||||
|
public IConfiguration Configuration { get; } |
||||
|
|
||||
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
|
public void ConfigureServices(IServiceCollection services) |
||||
|
{ |
||||
|
// 耎�JSON
|
||||
|
services.AddControllers().AddNewtonsoftJson(); |
||||
|
|
||||
|
// FormPost计秖��
|
||||
|
services.Configure<FormOptions>(options => |
||||
|
{ |
||||
|
options.ValueLengthLimit = 209715200; |
||||
|
options.ValueCountLimit = int.MaxValue; |
||||
|
}); |
||||
|
|
||||
|
// ModelBinding掸计��
|
||||
|
services.AddMvc(options => |
||||
|
{ |
||||
|
options.MaxModelBindingCollectionSize = int.MaxValue; |
||||
|
}); |
||||
|
|
||||
|
// 郎�ヘ魁
|
||||
|
//Add our IFileServerProvider implementation as a singleton
|
||||
|
//services.AddSingleton<IFileServerProvider>(new FileServerProvider(
|
||||
|
// new List<FileServerOptions>
|
||||
|
// {
|
||||
|
// new FileServerOptions
|
||||
|
// {
|
||||
|
// // 龟砰隔畖
|
||||
|
// FileProvider = new PhysicalFileProvider(@"\\10.0.8.7\\shop"),
|
||||
|
// // 店览隔畖
|
||||
|
// RequestPath = new PathString("/aa"),
|
||||
|
// EnableDirectoryBrowsing = true
|
||||
|
// }
|
||||
|
// new FileServerOptions
|
||||
|
// {
|
||||
|
// FileProvider = new PhysicalFileProvider(@"//qasrv-n/Web/ISOZone/"),
|
||||
|
// RequestPath = new PathString("/DocEsop"),
|
||||
|
// EnableDirectoryBrowsing = true
|
||||
|
// }
|
||||
|
// }));
|
||||
|
|
||||
|
var config = Configuration.Get<VirtualPathConfig>().VirtualPath; |
||||
|
var fileServerOptions = new List<FileServerOptions>(); |
||||
|
if (config != null) |
||||
|
{ |
||||
|
config.ForEach(f => |
||||
|
{ |
||||
|
fileServerOptions.Add(new FileServerOptions |
||||
|
{ |
||||
|
FileProvider = new PhysicalFileProvider(@f.RealPath), |
||||
|
RequestPath = new PathString(f.RequestPath), |
||||
|
}); |
||||
|
}); |
||||
|
}; |
||||
|
services.AddSingleton<IFileServerProvider>(new FileServerProvider(fileServerOptions)); |
||||
|
|
||||
|
// 配置跨域处理,允许所有来源
|
||||
|
services.AddCors(options => |
||||
|
options.AddPolicy("AMESPolicy", |
||||
|
p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod())); |
||||
|
|
||||
|
|
||||
|
services.AddLocalization(o => |
||||
|
{ |
||||
|
o.ResourcesPath = "Resources"; |
||||
|
}); |
||||
|
|
||||
|
// Add framework services.
|
||||
|
//services.AddMvc();
|
||||
|
//services.AddMvc().AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix);
|
||||
|
services.AddMvc() |
||||
|
.AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix) |
||||
|
.AddDataAnnotationsLocalization(options => |
||||
|
{ |
||||
|
options.DataAnnotationLocalizerProvider = (type, factory) => factory.Create(typeof(SharedResource)); |
||||
|
}); |
||||
|
//services.AddControllersWithViews();
|
||||
|
|
||||
|
services.AddControllersWithViews().AddRazorRuntimeCompilation(); |
||||
|
|
||||
|
//使用Session
|
||||
|
services.AddSession(); |
||||
|
|
||||
|
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) |
||||
|
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options => |
||||
|
{ |
||||
|
options.LoginPath = new PathString("/Login/Index"); |
||||
|
options.LogoutPath = new PathString("/Login/Logout"); |
||||
|
options.AccessDeniedPath = new PathString("/Home/Error"); |
||||
|
options.Cookie.Name = "_AMESCookie"; |
||||
|
//options.Cookie.SameSite = SameSiteMode.None;
|
||||
|
|
||||
|
//当Cookie 过期时间已达一半时,是否重置为ExpireTimeSpan
|
||||
|
options.SlidingExpiration = true; |
||||
|
options.Cookie.HttpOnly = true; |
||||
|
}); |
||||
|
|
||||
|
//添加HttpClient相关
|
||||
|
var types = typeof(Startup).Assembly.GetTypes() |
||||
|
.Where(type => type.IsInterface |
||||
|
&& ((System.Reflection.TypeInfo)type).ImplementedInterfaces != null |
||||
|
&& type.GetInterfaces().Any(a => a.FullName == typeof(IHttpApi).FullName)); |
||||
|
foreach (var type in types) |
||||
|
{ |
||||
|
services.AddHttpApi(type); |
||||
|
services.ConfigureHttpApi(type, o => |
||||
|
{ |
||||
|
o.HttpHost = new Uri(AppSetting.Setting.ApiUrl); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IFileServerProvider fileServerprovider) |
||||
|
{ |
||||
|
if (env.IsDevelopment()) |
||||
|
{ |
||||
|
app.UseDeveloperExceptionPage(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
app.UseExceptionHandler("/Home/Error"); |
||||
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
|
app.UseHsts(); |
||||
|
} |
||||
|
|
||||
|
app.UseCors("AMESPolicy"); |
||||
|
|
||||
|
//app.UseHttpsRedirection();
|
||||
|
app.UseStaticFiles(); |
||||
|
|
||||
|
IList<CultureInfo> supportedCultures = new List<CultureInfo> |
||||
|
{ |
||||
|
new CultureInfo("en-US"), |
||||
|
new CultureInfo("zh-CN"), |
||||
|
new CultureInfo("zh-TW") |
||||
|
}; |
||||
|
|
||||
|
app.UseRequestLocalization(new RequestLocalizationOptions |
||||
|
{ |
||||
|
DefaultRequestCulture = new RequestCulture("en-US"), |
||||
|
SupportedCultures = supportedCultures, |
||||
|
SupportedUICultures = supportedCultures |
||||
|
}); |
||||
|
|
||||
|
app.UseRouting(); |
||||
|
app.UseAuthorization(); |
||||
|
app.UseAuthentication(); |
||||
|
app.UseSession(); |
||||
|
|
||||
|
app.UseEndpoints(endpoints => |
||||
|
{ |
||||
|
endpoints.MapControllerRoute( |
||||
|
name: "default", |
||||
|
pattern: "{controller=Login}/{action=Index}/{id?}"); |
||||
|
}); |
||||
|
|
||||
|
app.UseCookiePolicy(); |
||||
|
|
||||
|
// 郎�ヘ魁
|
||||
|
app.UseFileServerProvider(fileServerprovider); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewComponent |
||||
|
{ |
||||
|
[Microsoft.AspNetCore.Mvc.ViewComponent] |
||||
|
public class SOP_FileViewComponent : Microsoft.AspNetCore.Mvc.ViewComponent |
||||
|
{ |
||||
|
public string Invoke() |
||||
|
{ |
||||
|
return $"測試天氣"; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.EFC |
||||
|
{ |
||||
|
class EFC010ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 舊條碼
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "舊條碼")] |
||||
|
public string BarCodeNoOld { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新條碼
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "新條碼")] |
||||
|
public string BarCodeNoNew { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 置換類型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "置換類型")] |
||||
|
public string ChangeType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 備註
|
||||
|
/// </summary>
|
||||
|
public string Memo { get; set; } |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS004CViewModel |
||||
|
{ |
||||
|
public WipInfo WipInfo { get; set; } |
||||
|
|
||||
|
public WipAtt WipAtt { get; set; } |
||||
|
|
||||
|
public WipBarcode WipBarcode { get; set; } |
||||
|
|
||||
|
public WipBarcodeOther WipBarcodeOther { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipBarcode> WipBarcodes { get; set; } |
||||
|
|
||||
|
public IEnumerable<RuleStation> RuleStation { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipBarcodeOther> WipBarcodeOthers { get; set; } |
||||
|
|
||||
|
// 序號綁定 Type SN:內部序號 SSN:出貨序號
|
||||
|
public string Type { get; set; } |
||||
|
|
||||
|
// 綁定條碼
|
||||
|
public string BarcodeNo { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,282 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS009RViewModel |
||||
|
{ |
||||
|
public PCS009RViewModel() |
||||
|
{ |
||||
|
WinInfos = new List<WinInfo>(); |
||||
|
BarCodeLogs = new List<BarCodeLog>(); |
||||
|
BarCodeChanges = new List<BarCodeChange>(); |
||||
|
BarCodeKPs = new List<BarcodeItemDTO>(); |
||||
|
KPChanges = new List<BarcodeItemChangeDTO>(); |
||||
|
Outfits = new List<Outfit>(); |
||||
|
nGInfoDtos = new List<NGInfoDto>(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 外部條碼
|
||||
|
/// </summary>
|
||||
|
public string ExtraBarCodeNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 狀態描述
|
||||
|
/// </summary>
|
||||
|
public string StatusNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 包裝箱號
|
||||
|
/// </summary>
|
||||
|
public string BoxNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 入庫單號
|
||||
|
/// </summary>
|
||||
|
public string InhouseNo { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 重量
|
||||
|
/// </summary>
|
||||
|
public string Wight { get; set; } |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單歷程
|
||||
|
/// </summary>
|
||||
|
public List<WinInfo> WinInfos { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產歷程
|
||||
|
/// </summary>
|
||||
|
public List<BarCodeLog> BarCodeLogs { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件清單
|
||||
|
/// </summary>
|
||||
|
public List<BarcodeItemDTO> BarCodeKPs { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 治具清單
|
||||
|
/// </summary>
|
||||
|
public List<Outfit> Outfits { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 條碼變更
|
||||
|
/// </summary>
|
||||
|
public List<BarCodeChange> BarCodeChanges { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件變更
|
||||
|
/// </summary>
|
||||
|
public List<BarcodeItemChangeDTO> KPChanges { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 維修紀錄
|
||||
|
/// </summary>
|
||||
|
public List<NGInfoDto> nGInfoDtos { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單資料
|
||||
|
/// </summary>
|
||||
|
public class WinInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
public string ItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
public string UnitNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別
|
||||
|
/// </summary>
|
||||
|
public string Line { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ECN
|
||||
|
/// </summary>
|
||||
|
public string ECN { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// EAN
|
||||
|
/// </summary>
|
||||
|
public string EAN { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 建置日期
|
||||
|
/// </summary>
|
||||
|
public string CreateDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// DATECODE
|
||||
|
/// </summary>
|
||||
|
public string DateCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 客戶料號
|
||||
|
/// </summary>
|
||||
|
public string CustomerItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單備註
|
||||
|
/// </summary>
|
||||
|
public string Remarks { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產歷程
|
||||
|
/// </summary>
|
||||
|
public class BarCodeLog |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 編號
|
||||
|
/// </summary>
|
||||
|
public string No { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別名稱
|
||||
|
/// </summary>
|
||||
|
public string Station { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 規則描述
|
||||
|
/// </summary>
|
||||
|
public string RuleStation { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 系統類型
|
||||
|
/// </summary>
|
||||
|
public string SysType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 使用者
|
||||
|
/// </summary>
|
||||
|
public string User { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站日期
|
||||
|
/// </summary>
|
||||
|
public string InputDate { get; set; } |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 治具清單
|
||||
|
/// </summary>
|
||||
|
public class Outfit |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 編號
|
||||
|
/// </summary>
|
||||
|
public string No { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站别
|
||||
|
/// </summary>
|
||||
|
public string Station { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 治具代碼
|
||||
|
/// </summary>
|
||||
|
public string OutfitNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站日期
|
||||
|
/// </summary>
|
||||
|
public string InputDate { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 條碼變更
|
||||
|
/// </summary>
|
||||
|
public class BarCodeChange |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 舊條碼序號
|
||||
|
/// </summary>
|
||||
|
public string BarCodeOld { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新條碼序號
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNew { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 變更類型
|
||||
|
/// </summary>
|
||||
|
public string BarCodeChangeType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 備註
|
||||
|
/// </summary>
|
||||
|
public string Memo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 置換人員
|
||||
|
/// </summary>
|
||||
|
public string User { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 變更時間
|
||||
|
/// </summary>
|
||||
|
public string Date { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件變更
|
||||
|
/// </summary>
|
||||
|
public class KPChange |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 組件條碼
|
||||
|
/// </summary>
|
||||
|
public string KPPartNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件料號
|
||||
|
/// </summary>
|
||||
|
public string KPItemNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 置換類別
|
||||
|
/// </summary>
|
||||
|
public string ChangeType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 置換人員
|
||||
|
/// </summary>
|
||||
|
public string User { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 變更時間
|
||||
|
/// </summary>
|
||||
|
public string Date { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS009ViewModel |
||||
|
{ |
||||
|
|
||||
|
public PCS009ViewModel() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 組件條碼
|
||||
|
/// </summary>
|
||||
|
public string PartNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 外部條碼 EXTRA_BARCODE_NO
|
||||
|
/// </summary>
|
||||
|
public string ExtraBarCodeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 包裝箱號
|
||||
|
/// </summary>
|
||||
|
public string BoxNo { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS013ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間起
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoStr { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間迄
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoEnd { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定原因
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "鎖定原因")] |
||||
|
public string LockReason { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS014ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間起
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoStr { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間迄
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoEnd { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 解鎖原因
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "解鎖原因")] |
||||
|
public string UnLockReason { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,175 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS021ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BarCodeID
|
||||
|
/// </summary>
|
||||
|
public int BarCodeID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單數
|
||||
|
/// </summary>
|
||||
|
public int PlanQTY { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 已刷數
|
||||
|
/// </summary>
|
||||
|
public int InputQTY { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別
|
||||
|
/// </summary>
|
||||
|
public int LineID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
public string UnitNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程ID
|
||||
|
/// </summary>
|
||||
|
public int FlowRuleID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// RuleStationID
|
||||
|
/// </summary>
|
||||
|
public int RuleStation { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 作業站
|
||||
|
/// </summary>
|
||||
|
public int Station { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工作站類別
|
||||
|
/// </summary>
|
||||
|
public string StationTypeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
public string ItemNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// input
|
||||
|
/// </summary>
|
||||
|
public string Input { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// inputNo (異常代碼)
|
||||
|
/// </summary>
|
||||
|
public string InputNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站順序
|
||||
|
/// </summary>
|
||||
|
public int StationSEQ { get; set; } = 0 ; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否是內部序號
|
||||
|
/// </summary>
|
||||
|
public bool Barcode { get; set; } = false ; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否有不良代號
|
||||
|
/// </summary>
|
||||
|
public bool BarcodeNG { get; set; } = false; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別測試類別代碼
|
||||
|
/// </summary>
|
||||
|
public string StationTestType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工程備註
|
||||
|
/// </summary>
|
||||
|
public string SystemMemo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KeyPart 代號
|
||||
|
/// </summary>
|
||||
|
public string KpItemName { get; set; } = string.Empty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// inputs
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public List<Inputs> Inputs { get; set; } = new List<Inputs>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號相關資料
|
||||
|
/// </summary>
|
||||
|
public MaterialItem MaterialItem { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號KP資訊資料檔
|
||||
|
/// </summary>
|
||||
|
public List<WipKpDto> WipKps { get; set; } = new List<WipKpDto>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號治具資訊
|
||||
|
/// </summary>
|
||||
|
public List<WipOutfitDtos> wipOutfits { get; set; } = new List<WipOutfitDtos>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別工項資料檔
|
||||
|
/// </summary>
|
||||
|
public List<MaterialStationsItem> MaterialStationsItems { get; set; } = new List<MaterialStationsItem>(); |
||||
|
|
||||
|
public List<PCS021ViewModel_SOP> Sops { get; set; } = new List<PCS021ViewModel_SOP>(); |
||||
|
} |
||||
|
|
||||
|
public class WipOutfitDtos : WipOutfitDto |
||||
|
{ |
||||
|
public string Inputs { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Inputs |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 不良代號 || KeyPart
|
||||
|
/// </summary>
|
||||
|
public string Input { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 異常欄位
|
||||
|
/// </summary>
|
||||
|
public string InputNo { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SOP
|
||||
|
/// </summary>
|
||||
|
public class PCS021ViewModel_SOP |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 檔案名稱
|
||||
|
/// </summary>
|
||||
|
public string SopName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 檔案路徑
|
||||
|
/// </summary>
|
||||
|
public string SopPath { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS023ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 舊條碼
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "舊條碼")] |
||||
|
public string BarCodeNoOld { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新條碼
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[Display(Name = "新條碼")] |
||||
|
public string BarCodeNoNew { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 置換類型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "置換類型")] |
||||
|
public string ChangeType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 備註
|
||||
|
/// </summary>
|
||||
|
public string Memo { get; set; } |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS027ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部序號
|
||||
|
/// </summary>
|
||||
|
public string Barcode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 內部序號 List
|
||||
|
/// </summary>
|
||||
|
public string BarCodeItem { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KP ItemNo
|
||||
|
/// </summary>
|
||||
|
public int KPItemNo { get; set; } = 0; |
||||
|
} |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS032ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 經過作業站
|
||||
|
/// </summary>
|
||||
|
public int GoByStation { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 退回目的地作業站
|
||||
|
/// </summary>
|
||||
|
public int RetrueStation { get; set; } |
||||
|
|
||||
|
|
||||
|
[Display(Name = "備註")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
/// <summary>
|
||||
|
/// 備註
|
||||
|
/// </summary>
|
||||
|
public string Memo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 退站類型
|
||||
|
/// </summary>
|
||||
|
public string Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 指定起訖條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoStr { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 指定起訖條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoEnd { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class PCS036ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 內部條碼
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間起
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoStr { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 鎖定條碼區間迄
|
||||
|
/// </summary>
|
||||
|
public string BarCodeNoEnd { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 備註
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "解除綁定備註")] |
||||
|
[Required(ErrorMessage = "{0},不能空白")] |
||||
|
[StringLength(100)] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,108 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.PCS |
||||
|
{ |
||||
|
public class WipNoDetailViewModel |
||||
|
{ |
||||
|
public WipNoDetailViewModel() |
||||
|
{ |
||||
|
wipBarcodes = new List<WipBarcode>(); |
||||
|
ruleStations = new List<RuleStationDto>(); |
||||
|
materialSops = new List<MaterialSopDto>(); |
||||
|
WipKps = new List<WipKpDto>(); |
||||
|
Outfits = new List<MaterialOutfit>(); |
||||
|
WipSops = new List<WipSopDto>(); |
||||
|
WipOutfits = new List<WipOutfitDto>(); |
||||
|
wipInfoBlobs = new List<WipInfoBlob>(); |
||||
|
wipMACs = new List<WipMAC>(); |
||||
|
wipBarcodeOther = new WipBarcodeOther(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單屬性
|
||||
|
/// </summary>
|
||||
|
public WipAtt wipAtt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產序號
|
||||
|
/// </summary>
|
||||
|
public WipBarcode wipBarcode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 板卡資訊
|
||||
|
/// </summary>
|
||||
|
public WipBoard wipBoard { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 系統組裝
|
||||
|
/// </summary>
|
||||
|
public WipSystem wipSystem { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipBarcode> wipBarcodes { get; set; } |
||||
|
|
||||
|
public IEnumerable<RuleStationDto> ruleStations { get; set; } |
||||
|
|
||||
|
public IEnumerable<MaterialSopDto> materialSops { get; set; } |
||||
|
|
||||
|
public List<WipKpDto> WipKps { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipOutfitDto> WipOutfits { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipSopDto> WipSops { get; set; } |
||||
|
|
||||
|
public IEnumerable<MaterialOutfit> Outfits { get; set; } |
||||
|
|
||||
|
public IEnumerable<WipInfoBlob> wipInfoBlobs { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public WipSop wipSop { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 標籤
|
||||
|
/// </summary>
|
||||
|
public WipLabel wipLabel { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// MAC
|
||||
|
/// </summary>
|
||||
|
public IEnumerable<WipMAC> wipMACs { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 條碼區間設定
|
||||
|
/// </summary>
|
||||
|
public WipBarcodeOther wipBarcodeOther { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單圖檔資料
|
||||
|
/// </summary>
|
||||
|
public WipInfoBlob wipInfoBlob { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號對應工時
|
||||
|
/// </summary>
|
||||
|
public string itemNoCT1 { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public class WipDataViewModel : WipNoDetailViewModel |
||||
|
{ |
||||
|
public WipDataViewModel() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單資料
|
||||
|
/// </summary>
|
||||
|
public WipInfo wipInfo { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS010ViewModel |
||||
|
{ |
||||
|
public QRS010ViewModel() |
||||
|
{ |
||||
|
YieldDatas = new List<YieldData>(); |
||||
|
} |
||||
|
|
||||
|
public List<YieldData> YieldDatas { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class YieldData |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單數量
|
||||
|
/// </summary>
|
||||
|
public int PlanQTY { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程站別ID
|
||||
|
/// </summary>
|
||||
|
public int RuleStationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別ID
|
||||
|
/// </summary>
|
||||
|
public int StationID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別名稱
|
||||
|
/// </summary>
|
||||
|
public string StationDesc { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
public string ItemNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別
|
||||
|
/// </summary>
|
||||
|
public string LineDesc { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 機種
|
||||
|
/// </summary>
|
||||
|
public string ModelNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 首次良品數量
|
||||
|
/// </summary>
|
||||
|
public int FirstCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站數量
|
||||
|
/// </summary>
|
||||
|
public int PassCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 良率
|
||||
|
/// </summary>
|
||||
|
public double Yield { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS014BViewModel |
||||
|
{ |
||||
|
public QRS014BViewModel() |
||||
|
{ |
||||
|
FPYDatas = new List<FPY4MonthGroup>(); |
||||
|
} |
||||
|
|
||||
|
public List<FPY4MonthGroup> FPYDatas { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class FPY4MonthGroup |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 月份
|
||||
|
/// </summary>
|
||||
|
public string Month { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 良率
|
||||
|
/// </summary>
|
||||
|
public double Yield { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS014ViewModel |
||||
|
{ |
||||
|
public QRS014ViewModel() |
||||
|
{ |
||||
|
SumYieldDatas = new List<SumYieldData>(); |
||||
|
} |
||||
|
|
||||
|
public List<SumYieldData> SumYieldDatas { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class SumYieldData |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 良率
|
||||
|
/// </summary>
|
||||
|
public double Yield { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS015ViewModel |
||||
|
{ |
||||
|
public QRS015ViewModel() |
||||
|
{ |
||||
|
IpqcDatas = new List<IpqcData>(); |
||||
|
} |
||||
|
|
||||
|
public List<IpqcData> IpqcDatas { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class IpqcData |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 周次
|
||||
|
/// </summary>
|
||||
|
public string WeekCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 抽檢總筆數
|
||||
|
/// </summary>
|
||||
|
public int IpqcCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 通過筆數
|
||||
|
/// </summary>
|
||||
|
public int PassCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 不良筆數
|
||||
|
/// </summary>
|
||||
|
public int FailCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 通過率
|
||||
|
/// </summary>
|
||||
|
public double Rate { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS016ViewModel |
||||
|
{ |
||||
|
public QRS016ViewModel() |
||||
|
{ |
||||
|
FqcDatas = new List<FqcData>(); |
||||
|
} |
||||
|
|
||||
|
public List<FqcData> FqcDatas { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class FqcData |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 周次
|
||||
|
/// </summary>
|
||||
|
public string WeekCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 抽檢總筆數
|
||||
|
/// </summary>
|
||||
|
public int FqcCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 通過筆數
|
||||
|
/// </summary>
|
||||
|
public int PassCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 不良筆數
|
||||
|
/// </summary>
|
||||
|
public int FailCnt { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 通過率
|
||||
|
/// </summary>
|
||||
|
public double Rate { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,175 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels.QRS |
||||
|
{ |
||||
|
public class QRS021ViewModel |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 工單號碼
|
||||
|
/// </summary>
|
||||
|
public string WipNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單ID
|
||||
|
/// </summary>
|
||||
|
public int WipID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// BarCodeID
|
||||
|
/// </summary>
|
||||
|
public int BarCodeID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工單數
|
||||
|
/// </summary>
|
||||
|
public int PlanQTY { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 已刷數
|
||||
|
/// </summary>
|
||||
|
public int InputQTY { get; set; } = 0; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 線別
|
||||
|
/// </summary>
|
||||
|
public int LineID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生產單位
|
||||
|
/// </summary>
|
||||
|
public string UnitNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流程ID
|
||||
|
/// </summary>
|
||||
|
public int FlowRuleID { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// RuleStationID
|
||||
|
/// </summary>
|
||||
|
public int RuleStation { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 作業站
|
||||
|
/// </summary>
|
||||
|
public int Station { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工作站類別
|
||||
|
/// </summary>
|
||||
|
public string StationTypeNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號
|
||||
|
/// </summary>
|
||||
|
public string ItemNO { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// input
|
||||
|
/// </summary>
|
||||
|
public string Input { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// inputNo (異常代碼)
|
||||
|
/// </summary>
|
||||
|
public string InputNo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 過站順序
|
||||
|
/// </summary>
|
||||
|
public int StationSEQ { get; set; } = 0 ; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否是內部序號
|
||||
|
/// </summary>
|
||||
|
public bool Barcode { get; set; } = false ; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否有不良代號
|
||||
|
/// </summary>
|
||||
|
public bool BarcodeNG { get; set; } = false; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別測試類別代碼
|
||||
|
/// </summary>
|
||||
|
public string StationTestType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工程備註
|
||||
|
/// </summary>
|
||||
|
public string SystemMemo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// KeyPart 代號
|
||||
|
/// </summary>
|
||||
|
public string KpItemName { get; set; } = string.Empty; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// inputs
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public List<Inputs> Inputs { get; set; } = new List<Inputs>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號相關資料
|
||||
|
/// </summary>
|
||||
|
public MaterialItem MaterialItem { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號KP資訊資料檔
|
||||
|
/// </summary>
|
||||
|
public List<WipKpDto> WipKps { get; set; } = new List<WipKpDto>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 料號治具資訊
|
||||
|
/// </summary>
|
||||
|
public List<WipOutfitDtos> wipOutfits { get; set; } = new List<WipOutfitDtos>(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 站別工項資料檔
|
||||
|
/// </summary>
|
||||
|
public List<MaterialStationsItem> MaterialStationsItems { get; set; } = new List<MaterialStationsItem>(); |
||||
|
|
||||
|
public List<QRS021ViewModel_SOP> Sops { get; set; } = new List<QRS021ViewModel_SOP>(); |
||||
|
} |
||||
|
|
||||
|
public class WipOutfitDtos : WipOutfitDto |
||||
|
{ |
||||
|
public string Inputs { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Inputs |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 不良代號 || KeyPart
|
||||
|
/// </summary>
|
||||
|
public string Input { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 異常欄位
|
||||
|
/// </summary>
|
||||
|
public string InputNo { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SOP
|
||||
|
/// </summary>
|
||||
|
public class QRS021ViewModel_SOP |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 檔案名稱
|
||||
|
/// </summary>
|
||||
|
public string SopName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 檔案路徑
|
||||
|
/// </summary>
|
||||
|
public string SopPath { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels |
||||
|
{ |
||||
|
public class REP001ViewModel |
||||
|
{ |
||||
|
public NgInfo ngInfo { get; set; } |
||||
|
|
||||
|
public NgComponent ngComponent { get; set; } |
||||
|
|
||||
|
public RepairRecord repairRecord { get; set; } |
||||
|
|
||||
|
public NgRepair ngRepair { get; set; } |
||||
|
|
||||
|
public NgRepairBlob ngRepairBlob { get; set; } |
||||
|
|
||||
|
public NGReason ngReason { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using AMESCoreStudio.WebApi.Models.AMES; |
||||
|
using AMESCoreStudio.WebApi.Models.BAS; |
||||
|
using AMESCoreStudio.WebApi.DTO.AMES; |
||||
|
|
||||
|
namespace AMESCoreStudio.Web.ViewModels |
||||
|
{ |
||||
|
public class REP006ViewModel |
||||
|
{ |
||||
|
public BarcodeInfo barcodeInfo { get; set; } |
||||
|
|
||||
|
public BarcodeQngInfo barcodeQngInfo { get; set; } |
||||
|
|
||||
|
public string OPUserNo { get; set; } |
||||
|
|
||||
|
public string IPQAUserNo { get; set; } |
||||
|
|
||||
|
public string PEUserNo { get; set; } |
||||
|
|
||||
|
public string ManagerUserNo { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,113 @@ |
|||||
|
@{ |
||||
|
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: 'factoryID', |
||||
|
width: 160, |
||||
|
title: '工廠編號', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'factoryNo', |
||||
|
width: 200, |
||||
|
title: '工廠代碼' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'factoryNameCh', |
||||
|
minWidth: 200, |
||||
|
title: '中文名稱' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'factoryNameEn', |
||||
|
title: '英文名稱', |
||||
|
width: 160 |
||||
|
}, |
||||
|
{ |
||||
|
field: 'center', |
||||
|
width: 160, |
||||
|
title: '操作', |
||||
|
templet: function (d) { |
||||
|
var btn = '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="edit">修改</a>'; |
||||
|
if (d.statusNo=="A") |
||||
|
btn += ' <a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" lay-event="del">停用</a>'; |
||||
|
else |
||||
|
btn += ' <a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="del">啟用</a>'; |
||||
|
return btn |
||||
|
//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.factoryID) { |
||||
|
hg.open('修改工廠資料', '/BAS/BAS001U/' + obj.data.factoryID, 480,480); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//通过行tool删除,lay-event="del" |
||||
|
function del(obj) { |
||||
|
var str; |
||||
|
if (obj.data.statusNo == "A") |
||||
|
str = "停用"; |
||||
|
else |
||||
|
str = "啟用"; |
||||
|
if (obj.data.factoryID) { |
||||
|
hg.confirm("系統:" + obj.data.factoryNameCh + ",確定要"+str+"嗎?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS001D', |
||||
|
data: { id: obj.data.factoryID }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
//obj.del(); //只删本地数据 |
||||
|
hg.msghide(str + "成功!"); |
||||
|
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('新增工廠', '/BAS/BAS001C', 480, 480); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
]; |
||||
|
//基本数据表格 |
||||
|
var table = hg.table.datatable('test', '工廠資料維護', '/BAS/GetFactoryInfoes', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.FactoryInfo |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS001C"; |
||||
|
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="BAS001Save" id="filter_all"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="FactoryID" value="0" /> |
||||
|
<input type="hidden" asp-for="OrgID" value="-1" /> |
||||
|
<input type="hidden" asp-for="VirtualFlag" value="N" /> |
||||
|
<input type="hidden" asp-for="StatusNo" value="A" /> |
||||
|
<input type="hidden" asp-for="FactoryCode" value="0" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" value="0" /> |
||||
|
<input type="hidden" asp-for="CreateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNo" class="form-control col-sm-9" placeholder="請輸入工廠代碼" /> |
||||
|
<span asp-validation-for="FactoryNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNameCh" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNameCh" class="form-control col-sm-9" placeholder="請輸入中文廠名" /> |
||||
|
<span asp-validation-for="FactoryNameCh" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNameEn" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNameEn" class="form-control col-sm-9" placeholder="請輸入英文廠名" /> |
||||
|
<span asp-validation-for="FactoryNameEn" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
@*<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="TelNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="TelNo" class="form-control col-sm-9" placeholder="請輸入電話" /> |
||||
|
<span asp-validation-for="TelNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="Address" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="Address" class="form-control col-sm-9" placeholder="請輸入地址" /> |
||||
|
<span asp-validation-for="Address" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="CountryID" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="CountryID" class="form-control col-sm-9" placeholder="請輸入國別" /> |
||||
|
<span asp-validation-for="CountryID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="OrgID" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="OrgID" class="form-control col-sm-9" placeholder="請輸入廠別" /> |
||||
|
<span asp-validation-for="OrgID" 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="button" value="儲存" class="btn btn-primary offset-sm-3" onclick="postformsubmit()" /> |
||||
|
</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 postformsubmit() { |
||||
|
//获取form表单对象,提交选择项目 |
||||
|
var form = document.getElementById("filter_all"); |
||||
|
form.submit();//form表单提交 |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,64 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.FactoryInfo |
||||
|
|
||||
|
@{ |
||||
|
ViewData["Title"] = "BAS001U"; |
||||
|
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="BAS001Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="FactoryID" /> |
||||
|
<input type="hidden" asp-for="OrgID" /> |
||||
|
<input type="hidden" asp-for="VirtualFlag"/> |
||||
|
<input type="hidden" asp-for="StatusNo" /> |
||||
|
<input type="hidden" asp-for="FactoryCode" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" /> |
||||
|
<input type="hidden" asp-for="CreateDate" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNo" class="form-control col-sm-9" placeholder="請輸入工廠代碼" /> |
||||
|
<span asp-validation-for="FactoryNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNameCh" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNameCh" class="form-control col-sm-9" placeholder="請輸入中文名稱" /> |
||||
|
<span asp-validation-for="FactoryNameCh" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="FactoryNameEn" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="FactoryNameEn" class="form-control col-sm-9" placeholder="請輸入英文名稱" /> |
||||
|
<span asp-validation-for="FactoryNameEn" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<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,147 @@ |
|||||
|
@{ |
||||
|
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"> |
||||
|
<div class="layui-inline"> |
||||
|
<button type="button" id="btnAdd" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon"></i>新增</button> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
table.render({ |
||||
|
elem: '#test' |
||||
|
, url: "@Url.Action("GetFactoryUnits", "BAS")" |
||||
|
, title: '生產製程單位維護' |
||||
|
, cellMinwidth: 80//全局定义常规单元格的最小宽度,1ayui 2.2.1 新增 |
||||
|
, cols: [[ |
||||
|
{ |
||||
|
field: 'seq', |
||||
|
width: 160, |
||||
|
title: '#', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unitNo', |
||||
|
width: 100, |
||||
|
title: '單位代號' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unitName', |
||||
|
minWidth: 100, |
||||
|
title: '單位名稱' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unitCode', |
||||
|
title: '狀態代碼', |
||||
|
width: 160 |
||||
|
}, |
||||
|
{ |
||||
|
field: 'center', |
||||
|
width: 160, |
||||
|
title: '操作', |
||||
|
templet: function (item) { |
||||
|
var btn = '<a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="edit">修改</a>'; |
||||
|
if (item.statusNo == "A") |
||||
|
btn += ' <a class="layui-btn layui-btn-danger layui-btn-xs layui-icon layui-icon-delete" lay-event="del">停用</a>'; |
||||
|
else |
||||
|
btn += ' <a class="layui-btn layui-btn-normal layui-btn-xs layui-icon layui-icon-edit" lay-event="del">啟用</a>'; |
||||
|
return btn |
||||
|
} |
||||
|
} |
||||
|
]] |
||||
|
, page: true |
||||
|
, limits: [3, 5, 10]//一页选择显示3,5或10条数据 |
||||
|
, limit: 10 //一页显示10条数据 |
||||
|
, parseData: function (res) { //将原始数据解析成tabe组件所规定的数据,res光 |
||||
|
var result; |
||||
|
console.log(this); |
||||
|
console.log(JSON.stringify(res)); |
||||
|
if (this.page.curr) { |
||||
|
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr) |
||||
|
} |
||||
|
else { |
||||
|
result = res.data.slice(0, this.limit); |
||||
|
} |
||||
|
return { |
||||
|
"code": res.code,//解析接口状态 |
||||
|
"msg": res.msg,//解析提示文本 |
||||
|
"count": res.count,//解析数据长度 |
||||
|
"data": result//解析数据列表 |
||||
|
}; |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
table.on('tool(test)', function (obj) { |
||||
|
if (obj.event == 'edit') { |
||||
|
if (obj.data.unitNo) { |
||||
|
hg.open('修改生產單位', '/BAS/BAS002U/' + obj.data.unitNo, 480, 480); |
||||
|
} |
||||
|
} |
||||
|
if (obj.event == 'del') { |
||||
|
if (obj.data.unitNo) { |
||||
|
var str; |
||||
|
if (obj.data.statusNo == "A") |
||||
|
str = "停用"; |
||||
|
else |
||||
|
str = "啟用"; |
||||
|
hg.confirm("系統:" + obj.data.unitName + ",確定要" + str + "嗎?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS002D', |
||||
|
data: { id: obj.data.unitNo }, |
||||
|
type: 'POST', |
||||
|
success: function (res) { |
||||
|
if (res.success) { |
||||
|
//obj.del(); //只删本地数据 |
||||
|
|
||||
|
hg.msghide(str + "成功!", { |
||||
|
icon: 6 |
||||
|
}); |
||||
|
layui.table.reload('test', { page: { curr: $(".layui-laypage-em").next().html() } }) |
||||
|
|
||||
|
} |
||||
|
//if (res.status == 200) { |
||||
|
// layer.msg("刪除成功", { |
||||
|
// icon: 6 |
||||
|
// }); |
||||
|
// layui.table.reload(tableId, { page: { curr: $(".layui-laypage-em").next().html() } }) //這行時在當前頁刷新表格的寫法 |
||||
|
//} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
|
||||
|
$('#btnAdd').click(function () { |
||||
|
hg.open('新增生產製程單位', '/BAS/BAS002C', 480, 480); |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.FactoryUnit |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS002C"; |
||||
|
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="BAS002Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="SEQ" value="0" /> |
||||
|
<input type="hidden" asp-for="StatusNo" value="A" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitNo" class="form-control col-sm-9" placeholder="請輸入單位代碼" /> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitName" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitName" class="form-control col-sm-9" placeholder="請輸入單位名稱" /> |
||||
|
<span asp-validation-for="UnitName" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitCode" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitCode" class="form-control col-sm-9" placeholder="請輸入狀態代碼" /> |
||||
|
<span asp-validation-for="UnitCode" 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.BAS.FactoryUnit |
||||
|
|
||||
|
@{ |
||||
|
ViewData["Title"] = "BAS002U"; |
||||
|
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="BAS002Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="SEQ" /> |
||||
|
<input type="hidden" asp-for="StatusNo"/> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitNo" class="form-control col-sm-9" placeholder="請輸入單位代碼" /> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitName" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitName" class="form-control col-sm-9" placeholder="請輸入單位名稱" /> |
||||
|
<span asp-validation-for="UnitName" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitCode" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="UnitCode" class="form-control col-sm-9" placeholder="請輸入狀態代碼" /> |
||||
|
<span asp-validation-for="UnitCode" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<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,327 @@ |
|||||
|
@{ |
||||
|
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"> |
||||
|
<div class="layui-form" style="margin-bottom:5px;"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<button type="button" id="btnAdd" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon"></i>新增</button> |
||||
|
</div> |
||||
|
<div class="layui-inline" style="margin-right:0px;"> |
||||
|
<label class=" layui-inline layui-form-label" style="width:120px;">请選擇單位名稱</label> |
||||
|
<div class="layui-input-inline" width:400px;"> |
||||
|
<select id="unit" lay-event="unit" lay-filter="unit" lay-submit asp-items="@ViewBag.FactoryUnit"> |
||||
|
</select> |
||||
|
</div> |
||||
|
<input id="unitId" type="hidden" name="unitId" /> |
||||
|
</div> |
||||
|
<div class="layui-inline" style="margin-left:0px;"> |
||||
|
<div class="layui-btn-group"> |
||||
|
<button id="btnSearch" class="layui-btn layui-btn-sm layui-btn-normal"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
var treeTable; |
||||
|
layui.config({ |
||||
|
base: '../lib/layui_ext/' |
||||
|
}).extend({ |
||||
|
treeTable: 'treetable/treeTable' |
||||
|
}).use(['treeTable'], function () { |
||||
|
treeTable = layui.treeTable; |
||||
|
treeTable.on('tool(test)', function (obj) { |
||||
|
if (obj.event == 'edit') { |
||||
|
if (obj.data.lineID) { |
||||
|
hg.open('修改線別', '/BAS/BAS003U/' + obj.data.lineID, 480, 480); |
||||
|
} |
||||
|
} |
||||
|
if (obj.event == 'del') { |
||||
|
var str; |
||||
|
if (obj.data.statusNo == 'A') |
||||
|
str = '停用'; |
||||
|
else |
||||
|
str = '啟用'; |
||||
|
hg.confirm("系統:" + obj.data.lineDesc + ",确定要"+str+"吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS003U2', //抓取停用 |
||||
|
data: { model: obj.data }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
//obj.del(); //只删本地数据 |
||||
|
hg.msghide("成功!"); |
||||
|
var aa = $("#unitId").val(); |
||||
|
request(aa); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
form.on('select(unit)', function (data) { |
||||
|
//alert("select yessss!!"); |
||||
|
$("#unitId").val(data.value); |
||||
|
$('#btnSearch').click(); |
||||
|
}); |
||||
|
}); |
||||
|
var data = []; |
||||
|
$(document).ready(function () { |
||||
|
var aa = $("#unitId").val(); |
||||
|
request(aa); |
||||
|
}); |
||||
|
//通过table定义reload刷新列表,update本地填充一条数据 |
||||
|
var TABLE = function () { |
||||
|
return { |
||||
|
reload: function () { |
||||
|
var aa = $("#unitId").val(); |
||||
|
request(aa); |
||||
|
}, |
||||
|
update: function (d) { |
||||
|
var model = $.parseJSON(d); |
||||
|
var up = false; |
||||
|
layui.each(data, function (i, d) { |
||||
|
if (d.id == model.id) { |
||||
|
data[i] = model; |
||||
|
up = true; |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
up || data.push(model); |
||||
|
init(data); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
function request(Unitstr) { |
||||
|
hg.request('/BAS/GetLineInfoByUnit/' + Unitstr, function (result) { |
||||
|
data = result.data; |
||||
|
init(data); |
||||
|
}); |
||||
|
} |
||||
|
var insTb; |
||||
|
function init(data) { |
||||
|
insTb = treeTable.render({ |
||||
|
elem: '#test', |
||||
|
height: 'full-180', |
||||
|
text: { |
||||
|
none: '<div style="padding: 18px 0;">暂无数据</div>' |
||||
|
}, |
||||
|
data: data, |
||||
|
tree: { |
||||
|
iconIndex: -1, |
||||
|
isPidData: false, |
||||
|
idName: 'lineID', |
||||
|
}, |
||||
|
cols: [ |
||||
|
{ |
||||
|
field: 'lineID', |
||||
|
width: 120, |
||||
|
title: '#', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unit', |
||||
|
title: '製程單位', |
||||
|
width: 200, |
||||
|
templet: function (d) { |
||||
|
if (d.unit != null) { |
||||
|
return d.unit["unitName"]; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return ''; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'lineDesc', |
||||
|
minWidth: 100, |
||||
|
title: '線別說明' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'story', |
||||
|
title: '樓層', |
||||
|
width: 80 |
||||
|
}, |
||||
|
{ |
||||
|
align: 'center' |
||||
|
, title: '操作' |
||||
|
, width: 200 |
||||
|
,templet: function (item) { |
||||
|
var btns = ''; |
||||
|
btns = btns + '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>'; |
||||
|
if (item.statusNo == "A") |
||||
|
btns = btns + '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">停用</a>'; |
||||
|
else if (item.statusNo == "S") |
||||
|
btns = btns + '<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="del">啟用</a>'; |
||||
|
|
||||
|
return btns; |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
style: 'margin-top:0;', |
||||
|
done: function () { |
||||
|
} |
||||
|
}); |
||||
|
insTb.expandAll(); |
||||
|
} |
||||
|
var table = new TABLE(); |
||||
|
//搜索 |
||||
|
$('#btnSearch').click(function () { |
||||
|
|
||||
|
hg.msghide("刷新数据!"); |
||||
|
var aa = $("#unit").val(); |
||||
|
//alert(aa); |
||||
|
|
||||
|
request(aa); |
||||
|
}) |
||||
|
|
||||
|
$('#btnAdd').click(function () { |
||||
|
hg.open('新增線別', '/BAS/BAS003C', 600, 360); |
||||
|
}); |
||||
|
</script> |
||||
|
@*<script type="text/javascript"> |
||||
|
//监听表单提交事件 |
||||
|
hg.form.onsubmit('querysubmit', function (data) { |
||||
|
table && table.reload(data); |
||||
|
}); |
||||
|
var tableCols = [[ |
||||
|
{ |
||||
|
field: 'lineID', |
||||
|
width: 50, |
||||
|
title: '#', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'deptID', |
||||
|
width: 100, |
||||
|
title: '部門代碼', |
||||
|
templet: function (d) { |
||||
|
return d.dept["deptNo"]; |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'dept', |
||||
|
width: 100, |
||||
|
title: '部門名稱', |
||||
|
templet: function (d) { |
||||
|
return d.dept["deptName"]; |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
field: 'lineDesc', |
||||
|
minWidth: 100, |
||||
|
title: '線別說明' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'story', |
||||
|
title: '樓層', |
||||
|
width: 80 |
||||
|
}, |
||||
|
{ |
||||
|
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="edit2">停用</a> <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) { |
||||
|
alert(obj); |
||||
|
if (obj.data.lineID) { |
||||
|
hg.open('修改線別', '/BAS/BAS003U/' + obj.data.lineID, 480,480); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//通过行tool删除,lay-event="del" |
||||
|
function del(obj) { |
||||
|
if (obj.data.lineID) { |
||||
|
hg.confirm("系統:" + obj.data.lineDesc + ",确定要删除吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS003D', |
||||
|
data: { id: obj.data.lineID }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
obj.del(); //只删本地数据 |
||||
|
hg.msghide("删除成功!"); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//通过行tool停用,lay-event="edit2" |
||||
|
function edit2(obj) { |
||||
|
if (obj.data.lineID) { |
||||
|
hg.confirm("系統:" + obj.data.lineDesc + ",确定要停用吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS003U2', |
||||
|
data: { model: obj.data}, |
||||
|
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('新增線別資料', '/BAS/BAS003C', 480, 480); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
]; |
||||
|
//基本数据表格 |
||||
|
var table = hg.table.datatable('test', '線別資料維護', '/BAS/GetLineInfoes', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
</script>*@ |
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.LineInfo |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS003C"; |
||||
|
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="BAS003Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="LineID" value="0" /> |
||||
|
<input type="hidden" asp-for="WipNo" value="-1" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" value="0" /> |
||||
|
<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="StatusNo" value="A" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="UnitNo" asp-items="@ViewBag.FactoryUnit" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
<!-- |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="DeptID" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="DeptID" asp-items="@ViewBag.DeptList" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="DeptID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
--> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="LineDesc" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="LineDesc" class="form-control col-sm-9" placeholder="請輸入線別說明" /> |
||||
|
<span asp-validation-for="LineDesc" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="Story" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="Story" class="form-control col-sm-9" placeholder="請輸入樓層" /> |
||||
|
<span asp-validation-for="Story" 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,73 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.LineInfo |
||||
|
|
||||
|
@{ |
||||
|
ViewData["Title"] = "BAS003U"; |
||||
|
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="BAS003Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="LineID" /> |
||||
|
<input type="hidden" asp-for="WipNo" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" /> |
||||
|
<input type="hidden" asp-for="CreateDate" /> |
||||
|
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="StatusNo" /> |
||||
|
<input type="hidden" asp-for="UnitNo" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<input value="@Model.Unit.UnitName" class="form-control col-sm-9" readonly /> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
<!-- |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="DeptID" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="DeptID" asp-items="@ViewBag.DeptList" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="DeptID" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
--> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="LineDesc" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="LineDesc" class="form-control col-sm-9" placeholder="請輸入線別說明" /> |
||||
|
<span asp-validation-for="LineDesc" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="Story" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="Story" class="form-control col-sm-9" placeholder="請輸入樓層" /> |
||||
|
<span asp-validation-for="Story" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
<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,372 @@ |
|||||
|
@{ |
||||
|
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 class="layui-form-item layui-layout-right"> |
||||
|
<div class="layui-inline layui-show-xs-block"> |
||||
|
<button id="btnSearch" class="layui-btn layui-btn-sm layui-btn-normal"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="querysubmit"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
</div> |
||||
|
</div>*@ |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="layui-card-body"> |
||||
|
<div class="layui-form" style="margin-bottom:5px;"> |
||||
|
<div class="layui-form-item"> |
||||
|
<div class="layui-inline"> |
||||
|
<button type="button" id="btnAdd" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon"></i>新增</button> |
||||
|
</div> |
||||
|
<div class="layui-inline" style="margin-right:0px;"> |
||||
|
<label class=" layui-inline layui-form-label" style="width:120px;">请選擇單位名稱</label> |
||||
|
<div class="layui-input-inline" width:400px;"> |
||||
|
<select id="unit" lay-event="unit" lay-filter="unit" lay-submit asp-items="@ViewBag.FactoryUnit"> |
||||
|
</select> |
||||
|
</div> |
||||
|
<input id="unitId" type="hidden" name="unitId" /> |
||||
|
</div> |
||||
|
<div class="layui-inline" style="margin-left:0px;"> |
||||
|
<div class="layui-btn-group"> |
||||
|
<button id="btnSearch" class="layui-btn layui-btn-sm layui-btn-normal"> |
||||
|
<i class="layui-icon layui-icon-sm"></i> |
||||
|
</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
////layui.use(['form', 'layer'], function () { |
||||
|
//// form = layui.form; |
||||
|
|
||||
|
//// form.on('select(unit)', function (data) { |
||||
|
//// $("#unitId").val(data.value); |
||||
|
|
||||
|
//// //var table = hg.table.datatable('test', '班別資料維護', '/BAS/GetClassInfoByUnit/' + data.value), {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
//// //var qs = $('button[lay-filter="querysubmit"]'); |
||||
|
//// //qs.click(); |
||||
|
|
||||
|
//// //hg.msghide("刷新数据!"); |
||||
|
//// //table && table.reload(); |
||||
|
//// }); |
||||
|
////}); |
||||
|
|
||||
|
////监听表单提交事件 |
||||
|
//hg.form.onsubmit('querysubmit', function (data) { |
||||
|
// table && table.reload(data); |
||||
|
//}); |
||||
|
//var tableCols = [[ |
||||
|
// { |
||||
|
// field: 'classID', |
||||
|
// width: 80, |
||||
|
// title: '#', |
||||
|
// sort: true |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'classNo', |
||||
|
// width: 90, |
||||
|
// title: '班別代碼' |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'beginTime', |
||||
|
|
||||
|
// title: '上班時間' |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'endTime', |
||||
|
|
||||
|
// title: '下班時間' |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'breakTime', |
||||
|
// width: 100, |
||||
|
// title: '休息時間(分)' |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'sartDate', |
||||
|
// width: 100, |
||||
|
// title: '起用時間', |
||||
|
// templet: function (d) { |
||||
|
// return layui.util.toDateString(d.bulletinTime, "yyyy-MM-dd"); |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'stopDate', |
||||
|
// width: 100, |
||||
|
// title: '停用時間', |
||||
|
// templet: function (d) { |
||||
|
// return layui.util.toDateString(d.bulletinTime, "yyyy-MM-dd"); |
||||
|
// } |
||||
|
// }, |
||||
|
// { |
||||
|
// 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.classID) { |
||||
|
// hg.open('修改班別', '/BAS/BAS005U/' + obj.data.classID, 480,480); |
||||
|
// } |
||||
|
//} |
||||
|
|
||||
|
////通过行tool删除,lay-event="del" |
||||
|
//function del(obj) { |
||||
|
// if (obj.data.classID) { |
||||
|
// hg.confirm("系統:" + obj.data.classNo + ",确定要删除吗?", function () { |
||||
|
// $.ajax({ |
||||
|
// url: '/BAS/BAS005D', |
||||
|
// data: { id: obj.data.classID }, |
||||
|
// 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('新增班別', '/BAS/BAS005C', 480, 480); |
||||
|
// |
||||
|
// } |
||||
|
//} |
||||
|
//]; |
||||
|
////基本数据表格 |
||||
|
//var table = hg.table.datatable('test', '班別資料維護', '/BAS/GetClassInfoByUnit/' + unitId.value, {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
|
||||
|
|
||||
|
|
||||
|
//1026 |
||||
|
var treeTable; |
||||
|
layui.config({ |
||||
|
base: '../lib/layui_ext/' |
||||
|
}).extend({ |
||||
|
treeTable: 'treetable/treeTable' |
||||
|
}).use(['treeTable'], function () { |
||||
|
treeTable = layui.treeTable; |
||||
|
treeTable.on('tool(test)', function (obj) { |
||||
|
//if (obj.event == 'add') { |
||||
|
// hg.open('新增班別', '/BAS/BAS005C', 480, 480); |
||||
|
//} |
||||
|
if (obj.event == 'edit') { |
||||
|
//alert(obj.data); |
||||
|
if (obj.data.classID) { |
||||
|
hg.open('修改班別', '/BAS/BAS005U/' + obj.data.classID, 480, 480); |
||||
|
} |
||||
|
} |
||||
|
if (obj.data.statusNo == "A") |
||||
|
str = "停用"; |
||||
|
else |
||||
|
str = "啟用"; |
||||
|
if (obj.event == 'del') { |
||||
|
hg.confirm("系統:" + obj.data.classNo + ",确定要" + str + "吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS005D', |
||||
|
data: { id: obj.data.classID }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
obj.del(); //只删本地数据 |
||||
|
hg.msghide(str + "成功!"); |
||||
|
init(data); |
||||
|
request($("#selectunit").val()); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
form.on('select(unit)', function (data) { |
||||
|
//alert("select yessss!!"); |
||||
|
$("#unitId").val(data.value); |
||||
|
$('#btnSearch').click(); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
}); |
||||
|
|
||||
|
//通过行tool编辑,lay-event="edit" |
||||
|
//function selectunit2(obj) { |
||||
|
// alert("select yes!!"); |
||||
|
// $("#unitId").val(data.value); |
||||
|
// $('#btnSearch').click(); |
||||
|
|
||||
|
//} |
||||
|
var data = []; |
||||
|
$(document).ready(function () { |
||||
|
var aa = $("#unitId").val(); |
||||
|
request(aa); |
||||
|
}); |
||||
|
//通过table定义reload刷新列表,update本地填充一条数据 |
||||
|
var TABLE = function () { |
||||
|
return { |
||||
|
reload: function () { |
||||
|
var aa = $("#unitId").val(); |
||||
|
request(aa); |
||||
|
}, |
||||
|
update: function (d) { |
||||
|
var model = $.parseJSON(d); |
||||
|
var up = false; |
||||
|
layui.each(data, function (i, d) { |
||||
|
if (d.id == model.id) { |
||||
|
data[i] = model; |
||||
|
up = true; |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
up || data.push(model); |
||||
|
init(data); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
function request(Unitstr) { |
||||
|
hg.request('/BAS/GetClassInfoByUnit/' + Unitstr, function (result) { |
||||
|
data = result.data; |
||||
|
init(data); |
||||
|
}); |
||||
|
} |
||||
|
var insTb; |
||||
|
function init(data) { |
||||
|
insTb = treeTable.render({ |
||||
|
elem: '#test', |
||||
|
height: 'full-180', |
||||
|
text: { |
||||
|
none: '<div style="padding: 18px 0;">暂无数据</div>' |
||||
|
}, |
||||
|
data: data, |
||||
|
tree: { |
||||
|
iconIndex: -1, |
||||
|
isPidData: false, |
||||
|
idName: 'classID' |
||||
|
}, |
||||
|
cols: [ |
||||
|
{ |
||||
|
field: 'classID', |
||||
|
width: 90, |
||||
|
title: '#', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'classNo', |
||||
|
width: 90, |
||||
|
title: '班別代碼' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'beginTime', |
||||
|
title: '上班時間' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'endTime', |
||||
|
title: '下班時間' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'breakTime', |
||||
|
width: 100, |
||||
|
title: '休息時間(分)' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'statusNo', |
||||
|
title: '狀態' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'sartDate', |
||||
|
width: 100, |
||||
|
title: '起用時間', |
||||
|
templet: function (d) { |
||||
|
return layui.util.toDateString(d.sartDate, "yyyy-MM-dd"); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'stopDate', |
||||
|
width: 100, |
||||
|
title: '停用時間', |
||||
|
templet: function (d) { |
||||
|
return layui.util.toDateString(d.stopDate, "yyyy-MM-dd"); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
field: 'unit', |
||||
|
width: 100, |
||||
|
title: '製程單位', |
||||
|
templet: function (item) { |
||||
|
return item.unit["unitName"]; |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
align: 'center', title: '操作', |
||||
|
templet: function (item) { |
||||
|
var btns = ''; |
||||
|
btns = btns + '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>'; |
||||
|
if (item.statusNo == "A") |
||||
|
btns = btns + '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">停用</a>'; |
||||
|
else if (item.statusNo == "S") |
||||
|
btns = btns + '<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="del">啟用</a>'; |
||||
|
|
||||
|
return btns; |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
style: 'margin-top:0;', |
||||
|
done: function () { |
||||
|
} |
||||
|
}); |
||||
|
insTb.expandAll(); |
||||
|
} |
||||
|
var table = new TABLE(); |
||||
|
//搜索 |
||||
|
$('#btnSearch').click(function () { |
||||
|
|
||||
|
hg.msghide("刷新数据!"); |
||||
|
var aa = $("#unit").val(); |
||||
|
//alert(aa); |
||||
|
|
||||
|
request(aa); |
||||
|
}) |
||||
|
|
||||
|
$('#btnAdd').click(function () { |
||||
|
hg.open('新增班別', '/BAS/BAS005C', 480, 480); |
||||
|
}); |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,364 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.ClassInfo |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS005C"; |
||||
|
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="BAS005Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="ClassID" value="0" /> |
||||
|
<input type="hidden" asp-for="ClassDesc" value="N/A" /> |
||||
|
<input type="hidden" asp-for="Section" value="1" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" value="0" /> |
||||
|
<input type="hidden" asp-for="CreateDate" value="@System.DateTime.Now" /> |
||||
|
<input type="hidden" asp-for="CreateDate" value="@System.DateTime.Now" /> |
||||
|
|
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="UnitNo" asp-items="@ViewBag.FactoryUnit" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="ClassNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="ClassNo" class="form-control col-sm-9" placeholder="請輸入班別代碼" /> |
||||
|
<span asp-validation-for="ClassNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="BeginTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="BeginTime" class="form-control col-sm-9" placeholder="ex 08:00" /> |
||||
|
<span asp-validation-for="BeginTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="EndTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="EndTime" class="form-control col-sm-9" placeholder="ex 08:00" /> |
||||
|
<span asp-validation-for="EndTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="BreakTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="BreakTime" class="form-control col-sm-9" placeholder="請輸入休息時間(分)" /> |
||||
|
<span asp-validation-for="BreakTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="SartDate" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="SartDate" class="form-control col-sm-9" id="test5" placeholder="請輸入啟用日期" /> |
||||
|
<span asp-validation-for="SartDate" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StopDate" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="StopDate" class="form-control col-sm-9" id="test1-1"placeholder="請輸入停用日期" /> |
||||
|
<span asp-validation-for="StopDate" 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"> |
||||
|
$('#bdt').val(''); |
||||
|
layui.use('laydate', function () { |
||||
|
var laydate = layui.laydate; |
||||
|
|
||||
|
//常规用法 |
||||
|
laydate.render({ |
||||
|
elem: '#test1' |
||||
|
}); |
||||
|
|
||||
|
//国际版 |
||||
|
laydate.render({ |
||||
|
elem: '#test1-1' |
||||
|
, lang: 'en' |
||||
|
}); |
||||
|
|
||||
|
//年选择器 |
||||
|
laydate.render({ |
||||
|
elem: '#test2' |
||||
|
, type: 'year' |
||||
|
}); |
||||
|
|
||||
|
//年月选择器 |
||||
|
laydate.render({ |
||||
|
elem: '#test3' |
||||
|
, type: 'month' |
||||
|
}); |
||||
|
|
||||
|
//时间选择器 |
||||
|
laydate.render({ |
||||
|
elem: '#test4' |
||||
|
, type: 'time' |
||||
|
}); |
||||
|
|
||||
|
//日期时间选择器 |
||||
|
laydate.render({ |
||||
|
elem: '#test5' |
||||
|
, type: 'datetime' |
||||
|
, lang: 'en' |
||||
|
}); |
||||
|
|
||||
|
//日期范围 |
||||
|
laydate.render({ |
||||
|
elem: '#test6' |
||||
|
//设置开始日期、日期日期的 input 选择器 |
||||
|
//数组格式为 2.6.6 开始新增,之前版本直接配置 true 或任意分割字符即可 |
||||
|
, range: ['#test-startDate-1', '#test-endDate-1'] |
||||
|
}); |
||||
|
|
||||
|
//年范围 |
||||
|
laydate.render({ |
||||
|
elem: '#test7' |
||||
|
, type: 'year' |
||||
|
, range: true |
||||
|
}); |
||||
|
|
||||
|
//年月范围 |
||||
|
laydate.render({ |
||||
|
elem: '#test8' |
||||
|
, type: 'month' |
||||
|
, range: true |
||||
|
}); |
||||
|
|
||||
|
//时间范围 |
||||
|
laydate.render({ |
||||
|
elem: '#test9' |
||||
|
, type: 'time' |
||||
|
, range: true |
||||
|
}); |
||||
|
|
||||
|
//日期时间范围 |
||||
|
laydate.render({ |
||||
|
elem: '#test10' |
||||
|
, type: 'datetime' |
||||
|
, range: true |
||||
|
}); |
||||
|
|
||||
|
//自定义格式 |
||||
|
laydate.render({ |
||||
|
elem: '#test11' |
||||
|
, format: 'yyyy年MM月dd日' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test12' |
||||
|
, format: 'dd/MM/yyyy' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test13' |
||||
|
, format: 'yyyyMMdd' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test14' |
||||
|
, type: 'time' |
||||
|
, format: 'H点m分' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test15' |
||||
|
, type: 'month' |
||||
|
, range: '~' |
||||
|
, format: 'yyyy-MM' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test16' |
||||
|
, type: 'datetime' |
||||
|
, range: '到' |
||||
|
, format: 'yyyy年M月d日H时m分s秒' |
||||
|
}); |
||||
|
|
||||
|
//开启公历节日 |
||||
|
laydate.render({ |
||||
|
elem: '#test17' |
||||
|
, calendar: true |
||||
|
}); |
||||
|
|
||||
|
//自定义重要日 |
||||
|
laydate.render({ |
||||
|
elem: '#test18' |
||||
|
, mark: { |
||||
|
'0-10-14': '生日' |
||||
|
, '0-12-31': '跨年' //每年的日期 |
||||
|
, '0-0-10': '工资' //每月某天 |
||||
|
, '0-0-15': '月中' |
||||
|
, '2017-8-15': '' //如果为空字符,则默认显示数字+徽章 |
||||
|
, '2099-10-14': '呵呵' |
||||
|
} |
||||
|
, done: function (value, date) { |
||||
|
if (date.year === 2017 && date.month === 8 && date.date === 15) { //点击2017年8月15日,弹出提示语 |
||||
|
layer.msg('这一天是:中国人民抗日战争胜利72周年'); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//限定可选日期 |
||||
|
var ins22 = laydate.render({ |
||||
|
elem: '#test-limit1' |
||||
|
, min: '2016-10-14' |
||||
|
, max: '2080-10-14' |
||||
|
, ready: function () { |
||||
|
ins22.hint('日期可选值设定在 <br> 2016-10-14 到 2080-10-14'); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//前后若干天可选,这里以7天为例 |
||||
|
laydate.render({ |
||||
|
elem: '#test-limit2' |
||||
|
, min: -7 |
||||
|
, max: 7 |
||||
|
}); |
||||
|
|
||||
|
//限定可选时间 |
||||
|
laydate.render({ |
||||
|
elem: '#test-limit3' |
||||
|
, type: 'time' |
||||
|
, min: '09:30:00' |
||||
|
, max: '17:30:00' |
||||
|
, btns: ['clear', 'confirm'] |
||||
|
}); |
||||
|
|
||||
|
//同时绑定多个 |
||||
|
lay('.test-item').each(function () { |
||||
|
laydate.render({ |
||||
|
elem: this |
||||
|
, trigger: 'click' |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
//初始赋值 |
||||
|
laydate.render({ |
||||
|
elem: '#test19' |
||||
|
, value: '1989-10-14' |
||||
|
, isInitValue: true |
||||
|
}); |
||||
|
|
||||
|
//选中后的回调 |
||||
|
laydate.render({ |
||||
|
elem: '#test20' |
||||
|
, done: function (value, date) { |
||||
|
layer.alert('你选择的日期是:' + value + '<br>获得的对象是' + JSON.stringify(date)); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//日期切换的回调 |
||||
|
laydate.render({ |
||||
|
elem: '#test21' |
||||
|
, change: function (value, date) { |
||||
|
layer.msg('你选择的日期是:' + value + '<br><br>获得的对象是' + JSON.stringify(date)); |
||||
|
} |
||||
|
}); |
||||
|
//不出现底部栏 |
||||
|
laydate.render({ |
||||
|
elem: '#test22' |
||||
|
, showBottom: false |
||||
|
}); |
||||
|
|
||||
|
//只出现确定按钮 |
||||
|
laydate.render({ |
||||
|
elem: '#test23' |
||||
|
, btns: ['confirm'] |
||||
|
}); |
||||
|
|
||||
|
//自定义事件 |
||||
|
laydate.render({ |
||||
|
elem: '#test24' |
||||
|
, trigger: 'mousedown' |
||||
|
}); |
||||
|
|
||||
|
//点我触发 |
||||
|
laydate.render({ |
||||
|
elem: '#test25' |
||||
|
, eventElem: '#test25-1' |
||||
|
, trigger: 'click' |
||||
|
}); |
||||
|
|
||||
|
//双击我触发 |
||||
|
lay('#test26-1').on('dblclick', function () { |
||||
|
laydate.render({ |
||||
|
elem: '#test26' |
||||
|
, show: true |
||||
|
, closeStop: '#test26-1' |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
//日期只读 |
||||
|
laydate.render({ |
||||
|
elem: '#test27' |
||||
|
, trigger: 'click' |
||||
|
}); |
||||
|
|
||||
|
//非input元素 |
||||
|
laydate.render({ |
||||
|
elem: '#test28' |
||||
|
}); |
||||
|
|
||||
|
//墨绿主题 |
||||
|
laydate.render({ |
||||
|
elem: '#test29' |
||||
|
, theme: 'molv' |
||||
|
}); |
||||
|
|
||||
|
//自定义颜色 |
||||
|
laydate.render({ |
||||
|
elem: '#test30' |
||||
|
, theme: '#393D49' |
||||
|
}); |
||||
|
|
||||
|
//格子主题 |
||||
|
laydate.render({ |
||||
|
elem: '#test31' |
||||
|
, theme: 'grid' |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
//直接嵌套显示 |
||||
|
laydate.render({ |
||||
|
elem: '#test-n1' |
||||
|
, position: 'static' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test-n2' |
||||
|
, position: 'static' |
||||
|
, lang: 'en' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test-n3' |
||||
|
, type: 'month' |
||||
|
, position: 'static' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#test-n4' |
||||
|
, type: 'time' |
||||
|
, position: 'static' |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
$(document).ready(function () { |
||||
|
var error = '@Html.ValidationMessage("error")'; |
||||
|
if ($(error).text() != '') { |
||||
|
parent.hg.msg(error); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,84 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.ClassInfo |
||||
|
|
||||
|
@{ |
||||
|
ViewData["Title"] = "BAS005U"; |
||||
|
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="BAS005Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="ClassID" /> |
||||
|
<input type="hidden" asp-for="ClassDesc" /> |
||||
|
<input type="hidden" asp-for="Section" /> |
||||
|
<input type="hidden" asp-for="CreateUserId" /> |
||||
|
<input type="hidden" asp-for="CreateDate"/> |
||||
|
<input type="hidden" asp-for="CreateDate" value="@System.DateTime.Now" /> |
||||
|
|
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="UnitNo" class="control-label col-sm-3"></label> |
||||
|
<select asp-for="UnitNo" asp-items="@ViewBag.FactoryUnit" class="custom-select col-sm-9"></select> |
||||
|
<span asp-validation-for="UnitNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="ClassNo" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="ClassNo" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="ClassNo" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="BeginTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="BeginTime" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="BeginTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="EndTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="EndTime" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="EndTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="BreakTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="BreakTime" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="BreakTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="SartDate" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="SartDate" class="form-control col-sm-9"/> |
||||
|
<span asp-validation-for="SartDate" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StopDate" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="StopDate" class="form-control col-sm-9"/> |
||||
|
<span asp-validation-for="StopDate" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
|
||||
|
<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,228 @@ |
|||||
|
@{ |
||||
|
ViewData["Title"] = "生產時段資料維護"; |
||||
|
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-inline"> |
||||
|
<button type="button" id="btnAdd" class="layui-btn layui-btn-normal layui-btn-sm"><i class="layui-icon"></i>新增</button> |
||||
|
</div> |
||||
|
<table class="layui-hide" id="test" lay-filter="test"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
@section Scripts{ |
||||
|
<script type="text/javascript"> |
||||
|
|
||||
|
layui.use('table', function () { |
||||
|
var table = layui.table; |
||||
|
table.render({ |
||||
|
elem: '#test' |
||||
|
, url: "@Url.Action("GetTimeSegments", "BAS")" |
||||
|
//,title: '积分操作记录表' |
||||
|
, cellMinwidth: 80//全局定义常规单元格的最小宽度,1ayui 2.2.1 新增 |
||||
|
, cols: [[ |
||||
|
{ |
||||
|
field: 'segmentID', |
||||
|
width: 80, |
||||
|
title: '#', |
||||
|
sort: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'startTime', |
||||
|
|
||||
|
title: '生產時段' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'endTime', |
||||
|
|
||||
|
title: '生產時段' |
||||
|
}, |
||||
|
{ |
||||
|
align: 'center', |
||||
|
title: '操作', |
||||
|
width: 160, |
||||
|
templet: function (item) { |
||||
|
var btns = ''; |
||||
|
btns = btns + '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>'; |
||||
|
btns = btns + '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">刪除</a>'; |
||||
|
|
||||
|
return btns; |
||||
|
} |
||||
|
} |
||||
|
]] |
||||
|
, page: true |
||||
|
, limits: [3, 5, 10]//一页选择显示3,5或10条数据 |
||||
|
, limit: 10 //一页显示10条数据 |
||||
|
, parseData: function (res) { //将原始数据解析成tabe组件所规定的数据,res光 |
||||
|
var result; |
||||
|
console.log(this); |
||||
|
console.log(JSON.stringify(res)); |
||||
|
if (this.page.curr) { |
||||
|
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr) |
||||
|
} |
||||
|
else { |
||||
|
result = res.data.slice(0, this.limit); |
||||
|
} |
||||
|
return { |
||||
|
"code": res.code,//解析接口状态 |
||||
|
"msg": res.msg,//解析提示文本 |
||||
|
"count": res.count,//解析数据长度 |
||||
|
"data": result//解析数据列表 |
||||
|
}; |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
table.on('tool(test)', function (obj) { |
||||
|
if (obj.event == 'edit') { |
||||
|
if (obj.data.segmentID) { |
||||
|
hg.open('修改生產時段', '/BAS/BAS006U/' + obj.data.segmentID, 480, 480); |
||||
|
} |
||||
|
} |
||||
|
if (obj.event == 'del') { |
||||
|
if (obj.data.segmentID) { |
||||
|
/* |
||||
|
var str; |
||||
|
if (obj.data.statusNo == "A") |
||||
|
str = "停用"; |
||||
|
else |
||||
|
str = "啟用"; |
||||
|
*/ |
||||
|
hg.confirm("系統:" + obj.data.segmentID + ",确定要刪除吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS006D', |
||||
|
data: { id: obj.data.segmentID }, |
||||
|
type: 'POST', |
||||
|
success: function (data) { |
||||
|
if (data.success) { |
||||
|
obj.del(); //只删本地数据 |
||||
|
hg.msghide("刪除成功!"); |
||||
|
} |
||||
|
else { |
||||
|
hg.msg(data.msg); |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
hg.msg("网络请求失败!"); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
$('#btnAdd').click(function () { |
||||
|
hg.open('新增生產時段', '/BAS/BAS006C', 480, 480); |
||||
|
}); |
||||
|
|
||||
|
////监听表单提交事件 |
||||
|
//hg.form.onsubmit('querysubmit', function (data) { |
||||
|
// table && table.reload(data); |
||||
|
//}); |
||||
|
//var tableCols = [[ |
||||
|
// { |
||||
|
// field: 'segmentID', |
||||
|
// width: 80, |
||||
|
// title: '#', |
||||
|
// sort: true |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'startTime', |
||||
|
|
||||
|
// title: '生產時段' |
||||
|
// }, |
||||
|
// { |
||||
|
// field: 'endTime', |
||||
|
|
||||
|
// 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.segmentID) { |
||||
|
// hg.open('修改生產時段', '/BAS/BAS006U/' + obj.data.segmentID, 480,480); |
||||
|
// } |
||||
|
//} |
||||
|
|
||||
|
////通过行tool删除,lay-event="del" |
||||
|
//function del(obj) { |
||||
|
// alert(obj); |
||||
|
// if (obj.data.segmentID) { |
||||
|
// hg.confirm("系統:" + obj.data.segmentID + ",确定要删除吗?", function () { |
||||
|
// $.ajax({ |
||||
|
// url: '/BAS/BAS006D', |
||||
|
// data: { id: obj.data.segmentID }, |
||||
|
// 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('新增生產時段', '/BAS/BAS006C', 480, 480); |
||||
|
|
||||
|
// } |
||||
|
//} |
||||
|
//]; |
||||
|
////基本数据表格 |
||||
|
//var table = hg.table.datatable('test', '生產時段資料維護', '/BAS/GetTimeSegments', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.TimeSegment |
||||
|
|
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS006C"; |
||||
|
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="BAS006Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="SegmentID" value="0" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StartTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="StartTime" class="form-control col-sm-9" placeholder="ex:08:00" /> |
||||
|
<span asp-validation-for="StartTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="EndTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="EndTime" class="form-control col-sm-9" placeholder="ex:08:00" /> |
||||
|
<span asp-validation-for="EndTime" 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,95 @@ |
|||||
|
@model AMESCoreStudio.WebApi.Models.BAS.TimeSegment |
||||
|
|
||||
|
@{ ViewData["Title"] = "BAS006U"; |
||||
|
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="BAS006Save"> |
||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div> |
||||
|
<input type="hidden" asp-for="SegmentID" /> |
||||
|
|
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="StartTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="StartTime" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="StartTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
</div> |
||||
|
<div class="form-group form-inline my-sm-1"> |
||||
|
<label asp-for="EndTime" class="control-label col-sm-3"></label> |
||||
|
<input asp-for="EndTime" class="form-control col-sm-9" /> |
||||
|
<span asp-validation-for="EndTime" class="text-danger offset-sm-3 my-sm-1"></span> |
||||
|
@*<div class="layui-input-inline"> |
||||
|
<input asp-for="EndTime" type="text" class="layui-input" id="test14" placeholder="HH:mm"> |
||||
|
</div>*@ |
||||
|
</div> |
||||
|
|
||||
|
<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> |
||||
|
layui.use(['form', 'layedit', 'laydate'], function () { |
||||
|
var form = layui.form |
||||
|
, layer = layui.layer |
||||
|
, layedit = layui.layedit |
||||
|
, laydate = layui.laydate; |
||||
|
|
||||
|
//日期 |
||||
|
laydate.render({ |
||||
|
elem: '#date' |
||||
|
}); |
||||
|
laydate.render({ |
||||
|
elem: '#date1' |
||||
|
}); |
||||
|
|
||||
|
laydate.render({ |
||||
|
elem: '#test14' |
||||
|
, type: 'time' |
||||
|
, format: 'HH:mm' |
||||
|
}); |
||||
|
|
||||
|
//创建一个编辑器 |
||||
|
var editIndex = layedit.build('LAY_demo_editor'); |
||||
|
|
||||
|
//自定义验证规则 |
||||
|
form.verify({ |
||||
|
time1: function (value) { |
||||
|
if (value.length > 5) { |
||||
|
return '需少5個字'; |
||||
|
} |
||||
|
} |
||||
|
, time2: [ |
||||
|
/[0-9]{2}:{1}[0-9]{2}$/ |
||||
|
, '密码必须6到12位,且不能出现空格' |
||||
|
] |
||||
|
, content: function (value) { |
||||
|
layedit.sync(editIndex); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<script type="text/javascript"> |
||||
|
$(document).ready(function () { |
||||
|
var error = '@Html.ValidationMessage("error")'; |
||||
|
if ($(error).text() != '') { |
||||
|
parent.hg.msg(error); |
||||
|
} |
||||
|
}); |
||||
|
</script> |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
@{ |
||||
|
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: 'typeNo', |
||||
|
width: 100, |
||||
|
title: '類別代碼' |
||||
|
}, |
||||
|
{ |
||||
|
field: 'typeDesc', |
||||
|
minWidth: 100, |
||||
|
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.typeNo) { |
||||
|
hg.open('修改站别類別', '/BAS/BAS007U/' + obj.data.typeNo, 480,480); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//通过行tool删除,lay-event="del" |
||||
|
function del(obj) { |
||||
|
if (obj.data.typeNo) { |
||||
|
hg.confirm("系統:" + obj.data.typeDesc + ",确定要删除吗?", function () { |
||||
|
$.ajax({ |
||||
|
url: '/BAS/BAS007D', |
||||
|
data: { id: obj.data.typeNo }, |
||||
|
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('新增站别類別', '/BAS/BAS007C', 480, 480); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
]; |
||||
|
//基本数据表格 |
||||
|
var table = hg.table.datatable('test', '站别類別維護', '/BAS/GetStationTypes', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); |
||||
|
</script> |
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue