2
This commit is contained in:
parent
ea17e5398a
commit
64ad6de795
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -18,3 +18,5 @@ Test/obj
|
|||
SqlSugarTest/bin
|
||||
SqlSugarTest/obj
|
||||
DeviceManager_20240529.zip
|
||||
TsSFCDeivceClient/bin
|
||||
Intend/bin
|
||||
|
|
|
@ -4,12 +4,15 @@ using DeviceRepair.DataAccess;
|
|||
using DeviceRepair.Models;
|
||||
using DeviceRepair.Models.Common;
|
||||
using DeviceRepair.Utils;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web.Http;
|
||||
using System.Xml;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DeviceRepair.Api.Controllers
|
||||
{
|
||||
|
@ -233,7 +236,7 @@ namespace DeviceRepair.Api.Controllers
|
|||
isSuccess = ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0;
|
||||
|
||||
if (isSuccess)
|
||||
return new APIResponseData { Code = 1, Data = ds };
|
||||
return new APIResponseData { Code = 1, Data = ds.Tables[0] };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -251,6 +254,99 @@ namespace DeviceRepair.Api.Controllers
|
|||
return apiResponseData;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 获取PE QE 信息
|
||||
///// </summary>
|
||||
///// <param name="Batch"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost, HttpAuthorize, Route("ProductResourceAllocationsGet")]
|
||||
//public APIResponseData ProductResourceAllocationsGet(SfcParams Params)
|
||||
//{
|
||||
// APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "获取失败!" };
|
||||
// try
|
||||
// {
|
||||
// string SFCWebServiceUrl = Utils.Config.Configurations.Properties.SFCWebServiceUrl;
|
||||
// bool isSuccess = false;
|
||||
// byte[] password = Encoding.Unicode.GetBytes(Params.LoginCode);
|
||||
// Array.Reverse(password);
|
||||
// string pass64 = Convert.ToBase64String(password);
|
||||
// if (pass64.Length < 10)
|
||||
// pass64 += "YeT+=fue";
|
||||
|
||||
// StringBuilder builder = new StringBuilder();
|
||||
// builder.AppendLine($"<?xml version=\"1.0\" encoding=\"utf-8\"?>");
|
||||
// builder.AppendLine($"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">");
|
||||
// builder.AppendLine($" <soap:Header>");
|
||||
// builder.AppendLine($" <SvcAuthentication xmlns=\"http://www.TechScan.cn/\">");
|
||||
// builder.AppendLine($" <Password>{pass64}</Password>");
|
||||
// builder.AppendLine($" <Username>{Params.LoginCode}</Username>");
|
||||
// builder.AppendLine($" </SvcAuthentication>");
|
||||
// builder.AppendLine($" </soap:Header>");
|
||||
// builder.AppendLine($" <soap:Body>");
|
||||
// builder.AppendLine($" <ProductResourceAllocationsGet xmlns=\"http://www.TechScan.cn/\">");
|
||||
// builder.AppendLine($" <inParams>{Params.inParams}</inParams>");
|
||||
// builder.AppendLine($" </ProductResourceAllocationsGet>");
|
||||
// builder.AppendLine($" </soap:Body>");
|
||||
// builder.AppendLine($"</soap:Envelope>");
|
||||
|
||||
// using (var client = new HttpClient())
|
||||
// {
|
||||
// var content = new StringContent(builder.ToString(), Encoding.UTF8, "text/xml");
|
||||
// var request = new HttpRequestMessage(HttpMethod.Post, $"{SFCWebServiceUrl}/SfcAddon.asmx");
|
||||
// request.Content = content;
|
||||
|
||||
// var response = client.SendAsync(request).Result;
|
||||
// if (response.IsSuccessStatusCode)
|
||||
// {
|
||||
// string stringRtn = response.Content.ReadAsStringAsync().Result;
|
||||
|
||||
// XmlDocument doc = new XmlDocument();
|
||||
// doc.LoadXml(stringRtn);
|
||||
// XmlNode Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["ProductResourceAllocationsGetResult"]["Code"].LastChild;
|
||||
|
||||
// if (Node.Value == "0")
|
||||
// {
|
||||
// Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["btResults"].LastChild;
|
||||
// byte[] bytes = Convert.FromBase64String(Node.Value);
|
||||
// DataSet ds = bytes.ExactDataSet();
|
||||
// isSuccess = ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0;
|
||||
|
||||
// if (isSuccess)
|
||||
// {
|
||||
// APIResponseData s = StaffsDatasGet(Params);
|
||||
// if (s.IsSuccess)
|
||||
// {
|
||||
// DataTable t2 = s.Data as DataTable;
|
||||
// Guid[] staffs = ds.Tables[0].AsEnumerable().Select(x => x.Field<Guid>("Staff")).ToArray();
|
||||
// var query = from row in t2.AsEnumerable()
|
||||
// where staffs.Contains(row.Field<Guid>("GUID"))
|
||||
// select row.Field<string>("EMail");
|
||||
|
||||
// //t2.AsEnumerable().Where(x=>x.Field<"">)
|
||||
|
||||
// return new APIResponseData { Code = 1, Data = ds };
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return new APIResponseData { Code = -1, Message = s.Message };
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["ProductResourceAllocationsGetResult"]["Msg"].LastChild;
|
||||
// return new APIResponseData { Code = -1, Message = Node.Value };
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// apiResponseData.Message = ex.Message;
|
||||
// }
|
||||
// return apiResponseData;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取PE QE 信息
|
||||
/// </summary>
|
||||
|
@ -262,6 +358,11 @@ namespace DeviceRepair.Api.Controllers
|
|||
APIResponseData apiResponseData = new APIResponseData { Code = -1, Message = "获取失败!" };
|
||||
try
|
||||
{
|
||||
JObject js = JObject.Parse(Params.inParams);
|
||||
js.Add("UserCode", "");
|
||||
js.Add("UserName", "");
|
||||
js.Add("Post", "");
|
||||
|
||||
string SFCWebServiceUrl = Utils.Config.Configurations.Properties.SFCWebServiceUrl;
|
||||
bool isSuccess = false;
|
||||
byte[] password = Encoding.Unicode.GetBytes(Params.LoginCode);
|
||||
|
@ -280,9 +381,9 @@ namespace DeviceRepair.Api.Controllers
|
|||
builder.AppendLine($" </SvcAuthentication>");
|
||||
builder.AppendLine($" </soap:Header>");
|
||||
builder.AppendLine($" <soap:Body>");
|
||||
builder.AppendLine($" <ProductResourceAllocationsGet xmlns=\"http://www.TechScan.cn/\">");
|
||||
builder.AppendLine($" <inParams>{Params.inParams}</inParams>");
|
||||
builder.AppendLine($" </ProductResourceAllocationsGet>");
|
||||
builder.AppendLine($" <StaffsDatasGet xmlns=\"http://www.TechScan.cn/\">");
|
||||
builder.AppendLine($" <inParams>{js.ToString()}</inParams>");
|
||||
builder.AppendLine($" </StaffsDatasGet>");
|
||||
builder.AppendLine($" </soap:Body>");
|
||||
builder.AppendLine($"</soap:Envelope>");
|
||||
|
||||
|
@ -299,21 +400,21 @@ namespace DeviceRepair.Api.Controllers
|
|||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.LoadXml(stringRtn);
|
||||
XmlNode Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["ProductResourceAllocationsGetResult"]["Code"].LastChild;
|
||||
XmlNode Node = doc.DocumentElement["soap:Body"]["StaffsDatasGetResponse"]["StaffsDatasGetResult"]["Code"].LastChild;
|
||||
|
||||
if (Node.Value == "0")
|
||||
{
|
||||
Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["btResults"].LastChild;
|
||||
Node = doc.DocumentElement["soap:Body"]["StaffsDatasGetResponse"]["btResults"].LastChild;
|
||||
byte[] bytes = Convert.FromBase64String(Node.Value);
|
||||
DataSet ds = bytes.ExactDataSet();
|
||||
isSuccess = ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0;
|
||||
|
||||
if (isSuccess)
|
||||
return new APIResponseData { Code = 1, Data = ds };
|
||||
return new APIResponseData { Code = 1, Data = ds.Tables[0] };
|
||||
}
|
||||
else
|
||||
{
|
||||
Node = doc.DocumentElement["soap:Body"]["ProductResourceAllocationsGetResponse"]["ProductResourceAllocationsGetResult"]["Msg"].LastChild;
|
||||
Node = doc.DocumentElement["soap:Body"]["StaffsDatasGetResponse"]["StaffsDatasGetResult"]["Msg"].LastChild;
|
||||
return new APIResponseData { Code = -1, Message = Node.Value };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
|
||||
<WebStackScaffolding_LayoutPageFile />
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
<NameOfLastUsedPublishProfile>D:\WorkStation\设备维护管理软件2\DeviceRepair.Api\Properties\PublishProfiles\1.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>D:\UGit\DeviceManager\DeviceRepair.Api\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -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>C:\Users\Clove\Desktop\WebSite</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,408 @@
|
|||
<?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>C:\Users\Clove\Desktop\WebSite</_PublishTargetUrl>
|
||||
<History>True|2024-05-29T05:43:17.4797209Z;</History>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<File Include="Areas/HelpPage/HelpPage.css">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/Api.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/CollectionModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/ComplexTypeModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/DictionaryModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/EnumTypeModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/KeyValuePairModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/ModelDescriptionLink.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/SimpleTypeModelDescription.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/Index.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Help/ResourceModel.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Shared/_Layout.cshtml">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/Web.config">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Areas/HelpPage/Views/_ViewStart.cshtml">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Antlr3.Runtime.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Antlr3.Runtime.pdb">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Api.dll">
|
||||
<publishTime>05/29/2024 13:43:16</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Api.pdb">
|
||||
<publishTime>05/29/2024 13:43:16</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.DataAccess.dll">
|
||||
<publishTime>05/29/2024 13:43:15</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.DataAccess.dll.config">
|
||||
<publishTime>05/21/2024 00:58:04</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.DataAccess.pdb">
|
||||
<publishTime>05/29/2024 13:43:15</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Models.dll">
|
||||
<publishTime>05/29/2024 10:07:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Models.dll.config">
|
||||
<publishTime>04/16/2024 11:52:33</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Models.pdb">
|
||||
<publishTime>05/29/2024 10:07:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Utils.dll">
|
||||
<publishTime>05/29/2024 13:43:15</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Utils.dll.config">
|
||||
<publishTime>05/21/2024 00:58:03</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DeviceRepair.Utils.pdb">
|
||||
<publishTime>05/29/2024 13:43:15</publishTime>
|
||||
</File>
|
||||
<File Include="bin/EntityFramework.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/EntityFramework.SqlServer.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/ICSharpCode.SharpZipLib.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/ICSharpCode.SharpZipLib.pdb">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/JWT.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.AspNet.Identity.Core.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.AspNet.Identity.EntityFramework.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.AspNet.Identity.Owin.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Host.SystemWeb.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.Cookies.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.Facebook.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.Google.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.MicrosoftAccount.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.OAuth.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Owin.Security.Twitter.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Microsoft.Web.Infrastructure.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Newtonsoft.Json.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Owin.dll">
|
||||
<publishTime>05/28/2024 22:39:58</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/csc.exe">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.CSharp.Core.targets">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/Microsoft.VisualBasic.Core.targets">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/System.Collections.Immutable.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/System.Reflection.Metadata.dll">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/vbc.exe">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/VBCSCompiler.exe">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/roslyn/VBCSCompiler.exe.config">
|
||||
<publishTime>05/28/2024 22:39:57</publishTime>
|
||||
</File>
|
||||
<File Include="bin/SqlSugar.dll">
|
||||
<publishTime>05/28/2024 22:39:54</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Net.Http.Formatting.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Helpers.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Http.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Http.Owin.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Http.WebHost.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Mvc.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Optimization.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.Razor.dll">
|
||||
<publishTime>05/28/2024 22:39:55</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.WebPages.Deployment.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.WebPages.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/System.Web.WebPages.Razor.dll">
|
||||
<publishTime>05/28/2024 22:39:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebGrease.dll">
|
||||
<publishTime>05/28/2024 22:39:58</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/EntityFramework.resources.dll">
|
||||
<publishTime>03/02/2015 17:32:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/EntityFramework.SqlServer.resources.dll">
|
||||
<publishTime>03/02/2015 17:32:38</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.AspNet.Identity.Core.resources.dll">
|
||||
<publishTime>04/04/2015 01:09:32</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.AspNet.Identity.EntityFramework.resources.dll">
|
||||
<publishTime>04/04/2015 01:09:34</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.AspNet.Identity.Owin.resources.dll">
|
||||
<publishTime>04/04/2015 01:09:34</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Host.SystemWeb.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Security.Facebook.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Security.Google.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Security.MicrosoftAccount.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Security.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/Microsoft.Owin.Security.Twitter.resources.dll">
|
||||
<publishTime>02/13/2015 21:23:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Net.Http.Formatting.resources.dll">
|
||||
<publishTime>01/28/2015 12:02:44</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Helpers.resources.dll">
|
||||
<publishTime>01/28/2015 12:04:32</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Http.Owin.resources.dll">
|
||||
<publishTime>01/28/2015 12:03:18</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Http.resources.dll">
|
||||
<publishTime>01/28/2015 12:02:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Http.WebHost.resources.dll">
|
||||
<publishTime>01/28/2015 12:03:48</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Mvc.resources.dll">
|
||||
<publishTime>01/28/2015 12:02:22</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Optimization.resources.dll">
|
||||
<publishTime>02/11/2014 23:28:40</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.Razor.resources.dll">
|
||||
<publishTime>01/28/2015 12:02:34</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.WebPages.Deployment.resources.dll">
|
||||
<publishTime>01/28/2015 12:04:32</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.WebPages.Razor.resources.dll">
|
||||
<publishTime>01/28/2015 12:04:32</publishTime>
|
||||
</File>
|
||||
<File Include="bin/zh-Hans/System.Web.WebPages.resources.dll">
|
||||
<publishTime>01/28/2015 12:04:32</publishTime>
|
||||
</File>
|
||||
<File Include="Content/bootstrap.css">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="Content/bootstrap.min.css">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="Content/Site.css">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="favicon.ico">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="fonts/glyphicons-halflings-regular.eot">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="fonts/glyphicons-halflings-regular.svg">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="fonts/glyphicons-halflings-regular.ttf">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="fonts/glyphicons-halflings-regular.woff">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="Global.asax">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="packages.config">
|
||||
<publishTime>04/16/2024 10:35:55</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/bootstrap.js">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/bootstrap.min.js">
|
||||
<publishTime>04/16/2024 09:58:39</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery-1.10.2.js">
|
||||
<publishTime>04/16/2024 09:58:40</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery-1.10.2.min.js">
|
||||
<publishTime>04/16/2024 09:58:40</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery-1.10.2.min.map">
|
||||
<publishTime>04/16/2024 09:58:40</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery.validate.js">
|
||||
<publishTime>04/16/2024 09:58:44</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery.validate.min.js">
|
||||
<publishTime>04/16/2024 09:58:44</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery.validate.unobtrusive.js">
|
||||
<publishTime>04/16/2024 09:58:44</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/jquery.validate.unobtrusive.min.js">
|
||||
<publishTime>04/16/2024 09:58:44</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/modernizr-2.6.2.js">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/respond.js">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/respond.min.js">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/_references.js">
|
||||
<publishTime>04/16/2024 09:58:41</publishTime>
|
||||
</File>
|
||||
<File Include="Views/Home/Index.cshtml">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="Views/Shared/Error.cshtml">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="Views/Shared/_Layout.cshtml">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="Views/Web.config">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="Views/_ViewStart.cshtml">
|
||||
<publishTime>04/16/2024 09:58:38</publishTime>
|
||||
</File>
|
||||
<File Include="Web.config">
|
||||
<publishTime>05/29/2024 13:43:16</publishTime>
|
||||
</File>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -234,11 +234,13 @@ namespace DeviceRepair.DataAccess
|
|||
Form.CreatorName = Operation.OperatorName;
|
||||
Form.CreatOn = CurrentTime;
|
||||
|
||||
if (db.Saveable(Form).ExecuteCommand() > 0)
|
||||
int AutoID = db.Saveable(Form).ExecuteReturnEntity()?.AutoID ?? 0;
|
||||
if (AutoID > 0)
|
||||
{
|
||||
db.CommitTran();
|
||||
apiResponseData.Code = 1;
|
||||
apiResponseData.Message = string.Empty;
|
||||
apiResponseData.Data = AutoID;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -87,6 +87,9 @@ namespace DeviceRepairAndOptimization.Pages.CustomField
|
|||
|
||||
GridViewInitialize(gridView1);
|
||||
InitializeGridDatas();
|
||||
|
||||
gridView1.OptionsMenu.EnableColumnMenu = false;
|
||||
|
||||
gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
|
||||
gridView1.OptionsSelection.ShowCheckBoxSelectorInColumnHeader = DevExpress.Utils.DefaultBoolean.False;
|
||||
gridView1.CustomDrawColumnHeader += GridView1_CustomDrawColumnHeader;
|
||||
|
@ -362,6 +365,13 @@ namespace DeviceRepairAndOptimization.Pages.CustomField
|
|||
return;
|
||||
}
|
||||
|
||||
if (result.Length > 200)
|
||||
{
|
||||
if (XtraMessageBoxHelper.AskYesNo("原因描述超出长度,最大长度为200!") == DialogResult.Yes)
|
||||
goto getRemark;
|
||||
return;
|
||||
}
|
||||
|
||||
bool BeStatus = !CurrentFieldInfo.Status;
|
||||
string Description = result;
|
||||
|
||||
|
|
|
@ -247,7 +247,16 @@ namespace DeviceRepairAndOptimization.Pages.DriveMaintenance
|
|||
{
|
||||
foreach (TreeListNode root in tvDevices.Nodes)
|
||||
{
|
||||
GetCheckedAuthorizatioId(root);
|
||||
if (root.Nodes.Count == 0 && root.CheckState == CheckState.Checked)
|
||||
{
|
||||
var drv = tvDevices.GetDataRecordByNode(root) as DeviceInformationInfoTree;
|
||||
if (drv != null && drv.AutoID != 0)
|
||||
deviceLst.Add(drv);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetCheckedAuthorizatioId(root);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -179,6 +179,9 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
CurrentAccessories.Remove(CurrentAccessoriesInfoModel);
|
||||
gridControl1.DataSource = CurrentAccessories;
|
||||
gridView1.BestFitColumns();
|
||||
|
||||
if ((CurrentAccessories?.Count ?? 0) > 0)
|
||||
CurrentAccessoriesInfoModel = gridView1.GetRow(0) as DeviceWarrantyRequestAccessoriesInfo;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -199,8 +199,22 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
try
|
||||
{
|
||||
CurrentAccessories = null;
|
||||
int result = XtraInputBox.Show<int>("请输入配件的数量:", "配件添加", 0);
|
||||
if (result > 0)
|
||||
|
||||
XtraInputBoxArgs args = new XtraInputBoxArgs { Prompt = "请输入配件的数量:", Caption = "配件添加", DefaultResponse = 0 };
|
||||
args.Buttons = new DialogResult[] { DialogResult.OK, DialogResult.Cancel };
|
||||
args.DefaultButtonIndex = (int)DialogResult.Cancel;
|
||||
DialogResult DiaResult = DialogResult.None;
|
||||
args.Showing += (a, b) =>
|
||||
{
|
||||
b.Buttons[DialogResult.OK].Click += (c, d) => { DiaResult = DialogResult.OK; };
|
||||
};
|
||||
|
||||
int result = XtraInputBox.Show<int>(args);
|
||||
if (DiaResult == DialogResult.None)
|
||||
return;
|
||||
else
|
||||
//int result = XtraInputBox.Show<int>("请输入配件的数量:", "配件添加", 0);
|
||||
//if (result > 0)
|
||||
{
|
||||
CurrentAccessories = new DeviceWarrantyRequestAccessoriesInfo
|
||||
{
|
||||
|
|
|
@ -265,12 +265,14 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
//
|
||||
// txtNo
|
||||
//
|
||||
this.txtNo.EditValue = "N/A";
|
||||
this.txtNo.Location = new System.Drawing.Point(144, 584);
|
||||
this.txtNo.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txtNo.MenuManager = this.toolbarFormManager1;
|
||||
this.txtNo.Name = "txtNo";
|
||||
this.txtNo.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
|
||||
this.txtNo.Properties.Appearance.Options.UseFont = true;
|
||||
this.txtNo.Properties.MaxLength = 50;
|
||||
this.txtNo.Size = new System.Drawing.Size(710, 26);
|
||||
this.txtNo.StyleController = this.layoutControl1;
|
||||
this.txtNo.TabIndex = 12;
|
||||
|
@ -283,6 +285,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
this.txtReason.Name = "txtReason";
|
||||
this.txtReason.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
|
||||
this.txtReason.Properties.Appearance.Options.UseFont = true;
|
||||
this.txtReason.Properties.MaxLength = 3800;
|
||||
this.txtReason.Size = new System.Drawing.Size(710, 26);
|
||||
this.txtReason.StyleController = this.layoutControl1;
|
||||
this.txtReason.TabIndex = 11;
|
||||
|
@ -313,6 +316,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
this.txtContent.Name = "txtContent";
|
||||
this.txtContent.Properties.Appearance.Font = new System.Drawing.Font("Microsoft YaHei UI", 11.25F);
|
||||
this.txtContent.Properties.Appearance.Options.UseFont = true;
|
||||
this.txtContent.Properties.MaxLength = 3800;
|
||||
this.txtContent.Size = new System.Drawing.Size(842, 98);
|
||||
this.txtContent.StyleController = this.layoutControl1;
|
||||
this.txtContent.TabIndex = 8;
|
||||
|
|
|
@ -213,8 +213,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
/// <param name="view"></param>
|
||||
void GridViewInitialize(DevExpress.XtraGrid.Views.Grid.GridView view)
|
||||
{
|
||||
view.OptionsBehavior.Editable = false;
|
||||
view.OptionsBehavior.ReadOnly = true;
|
||||
gridView1.OptionsMenu.EnableColumnMenu = false;
|
||||
|
||||
view.OptionsSelection.EnableAppearanceFocusedCell = false;
|
||||
view.OptionsScrollAnnotations.ShowSelectedRows = DevExpress.Utils.DefaultBoolean.False;
|
||||
|
@ -327,7 +326,7 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
btn_Validate.Enabled = true;
|
||||
btn_Validate.Tag = "1";
|
||||
}//&& CurrentObjectInfo.MaintaionItems.ValidateBy != GlobalInfo.CurrentUser.AutoID
|
||||
else if (CurrentObjectInfo.MaintaionItems.ValidateBy > 0 && (GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM2") || GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM3")))
|
||||
else if (CurrentObjectInfo.MaintaionItems.ValidateBy > 0 && CurrentObjectInfo.MaintaionItems.ValidateBy != GlobalInfo.CurrentUser.AutoID && (GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM2") || GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM3")))
|
||||
{
|
||||
if (CurrentObjectInfo.MaintaionItems.Validate2By == 0)
|
||||
{
|
||||
|
@ -387,6 +386,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
/// <param name="e"></param>
|
||||
private void btn_Query_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_VIEW"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
LoadingGridviewDatas();
|
||||
}
|
||||
|
||||
|
@ -410,6 +415,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_EDIT"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrentObjectInfo == null)
|
||||
{
|
||||
throw new Exception($"请选择要维修的停机单!");
|
||||
|
@ -440,6 +451,13 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM1") && !GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM2") && !GlobalInfo.HasRole("BIZ_FIELD_MAINTENANCE_COMFIRM3"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (CurrentObjectInfo == null)
|
||||
{
|
||||
throw new Exception($"请选择要操作的停机单!");
|
||||
|
@ -475,6 +493,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_EDIT"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrentObjectInfo == null)
|
||||
{
|
||||
throw new Exception($"请选择要维修的停机单!");
|
||||
|
@ -504,6 +528,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_PRINT"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrentObjectInfo == null)
|
||||
{
|
||||
throw new Exception("获取对象失败,请重试!");
|
||||
|
@ -679,6 +709,12 @@ namespace DeviceRepairAndOptimization.Pages.Maintain
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_EXPORT"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
using (FolderBrowserDialog folderDialog = new FolderBrowserDialog())
|
||||
{
|
||||
folderDialog.Description = "请选择保存文件的路径:";
|
||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.1.7")]
|
||||
[assembly: AssemblyFileVersion("2.0.1.7")]
|
||||
[assembly: AssemblyVersion("2.0.1.8")]
|
||||
[assembly: AssemblyFileVersion("2.0.1.8")]
|
||||
|
|
|
@ -492,11 +492,11 @@ namespace DeviceRepairAndOptimization
|
|||
{
|
||||
try
|
||||
{
|
||||
//if (!GlobalInfo.HasRole("BASE_ROLE_VIEW"))
|
||||
//{
|
||||
// XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
// return;
|
||||
//}
|
||||
if (!GlobalInfo.HasRole("BIZ_REPAIRRECORD_VIEW"))
|
||||
{
|
||||
XtraMessageBoxHelper.Error($"当前账号缺少此操作的权限");
|
||||
return;
|
||||
}
|
||||
|
||||
Pages.Maintain.pageMaintainView view = new Pages.Maintain.pageMaintainView();
|
||||
view.ShowDialog();
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace TsSFCDeivceClient
|
|||
if (!apiResponseData2.IsSuccess)
|
||||
throw new Exception(apiResponseData2.Message);
|
||||
|
||||
dtRtn = (DataTable)apiResponseData2.Data;
|
||||
dtRtn = apiResponseData2.ToDeserializeObject<DataTable>();
|
||||
}
|
||||
|
||||
DeviceWarrantyRequestForm deviceWarrantyRequestForm = new DeviceWarrantyRequestForm
|
||||
|
@ -241,51 +241,61 @@ namespace TsSFCDeivceClient
|
|||
if (!apiResponseData.IsSuccess)
|
||||
throw new Exception(apiResponseData.Message);
|
||||
|
||||
List<string> EmailList = new List<string>();
|
||||
if (dtRtn != null && dtRtn.Rows.Count > 0 && dtRtn.Columns.Contains("Product") && dtRtn.Columns.Contains("Technology"))
|
||||
int MaintenanceAutoID = Convert.ToInt32(apiResponseData.Data);
|
||||
try
|
||||
{
|
||||
string Product = dtRtn.Rows[0]["Product"] + "";
|
||||
string Technology = dtRtn.Rows[0]["Technology"] + "";
|
||||
|
||||
apiResponseData = Biz.HttpHelper.Instance.Post($"{ServiceUrl}{DeviceApiUrlConstValue.ProductResourceAllocationsGet}", deviceWarrantyRequestForm.toJson());
|
||||
if (!apiResponseData.IsSuccess)
|
||||
throw new Exception(apiResponseData.Message);
|
||||
|
||||
List<dynamic> staffResourceAllocations = apiResponseData.ToDeserializeObject<List<dynamic>>();
|
||||
//IList<StaffResourceAllocations> staffResourceAllocations = p_InspRespos.ProductResourceAllocationsGet(Product, Technology);
|
||||
if (staffResourceAllocations != null && staffResourceAllocations.Count > 0)
|
||||
List<string> EmailList = new List<string>();
|
||||
if (dtRtn != null && dtRtn.Rows.Count > 0 && dtRtn.Columns.Contains("Product") && dtRtn.Columns.Contains("Technology"))
|
||||
{
|
||||
foreach (var item in staffResourceAllocations)
|
||||
{
|
||||
if ((int)item.StaffPost == 0 || (int)item.StaffPost == 1)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(item.StaffEMail) && Regex.IsMatch(item.StaffEMail, emailPattern))
|
||||
{
|
||||
EmailList.Add(item.StaffEMail);
|
||||
}
|
||||
string Product = dtRtn.Rows[0]["Product"] + "";
|
||||
string Technology = dtRtn.Rows[0]["Technology"] + "";
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(item.StaffResource?.EMail ?? ""))
|
||||
JObject js = JObject.Parse(Runtime.inParams);
|
||||
js.Add("Product", Product);
|
||||
js.Add("Technology", Technology);
|
||||
|
||||
apiResponseData = Biz.HttpHelper.Instance.Post($"{ServiceUrl}{DeviceApiUrlConstValue.ProductResourceAllocationsGet}", JsonConvert.SerializeObject(new { LoginCode = Runtime.CurrentUser.UserCode, Password = Runtime.CurrentUser.Password, inParams = js.ToString() }));
|
||||
if (!apiResponseData.IsSuccess)
|
||||
throw new Exception(apiResponseData.Message);
|
||||
|
||||
DataTable staffResourceAllocations = apiResponseData.ToDeserializeObject<DataTable>();
|
||||
//IList<StaffResourceAllocations> staffResourceAllocations = p_InspRespos.ProductResourceAllocationsGet(Product, Technology);
|
||||
if (staffResourceAllocations != null && (staffResourceAllocations.Rows?.Count ?? 0) > 0)
|
||||
{
|
||||
foreach (DataRow item in staffResourceAllocations.Rows)
|
||||
{
|
||||
if ((item["Post"]?.ToString() ?? "-1") == "0" || (item["Post"]?.ToString() ?? "-1") == "1")
|
||||
{
|
||||
EmailList.Add(item.StaffResource.EMail);
|
||||
string eml = item["EMail"]?.ToString() ?? "";
|
||||
if (!string.IsNullOrWhiteSpace(eml) && Regex.IsMatch(eml, emailPattern))
|
||||
{
|
||||
EmailList.Add(eml);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (EmailList.Count > 0 && InitializeMail())
|
||||
{
|
||||
mail.Title = $"有在生产的设备出现故障,请您尽快评估故障状态!";
|
||||
mail.IsBodyHtml = true;
|
||||
System.Text.StringBuilder builder = new System.Text.StringBuilder();
|
||||
builder.AppendLine($"<p>在 {ddlWhereFailureOccurred.Text} 发起的编号为:{MaintenanceAutoID} 的保修单,设备 {CurrentDeviceInfo.EquipmentName}({CurrentDeviceInfo.EquipmentID}) 发生故障,{(deviceWarrantyRequestForm.InProduction ? "存有产品在加工中,产品批次号:" + deviceWarrantyRequestForm.Batch : "")} ,请您尽快评估故障情况。</p>");
|
||||
builder.AppendLine($"<p>发起人:生产部 - {Runtime.CurrentUser.UserName}</p>");
|
||||
mail.Body = builder.ToString();
|
||||
string msgResult = "";
|
||||
//收件人
|
||||
mail.ToMailAddress = EmailList.ToArray();
|
||||
MailKitHelp.SendStatus ss = mail.Send(out msgResult);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
XtraMessageBoxHelper.Warn($"新增数据成功,邮件发送失败,失败原因:{ex.Message}");
|
||||
}
|
||||
|
||||
if (EmailList.Count > 0 && InitializeMail())
|
||||
{
|
||||
mail.Title = $"有在生产的设备出现故障,请您尽快评估故障状态!";
|
||||
mail.IsBodyHtml = true;
|
||||
System.Text.StringBuilder builder = new System.Text.StringBuilder();
|
||||
builder.AppendLine($"<p>在 {ddlWhereFailureOccurred.Text} 的 {CurrentDeviceInfo.EquipmentName}({CurrentDeviceInfo.EquipmentID}) 发生故障,{(deviceWarrantyRequestForm.InProduction ? "存有产品在加工中,产品批次号:" + deviceWarrantyRequestForm.Batch : "")} ,请您尽快评估故障情况。</p>");
|
||||
builder.AppendLine($"<p>发起人:生产部 - {Runtime.CurrentUser.UserName}</p>");
|
||||
mail.Body = builder.ToString();
|
||||
string msgResult = "";
|
||||
//收件人
|
||||
mail.ToMailAddress = EmailList.ToArray();
|
||||
MailKitHelp.SendStatus ss = mail.Send(out msgResult);
|
||||
}
|
||||
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
|
|
@ -211,6 +211,8 @@ namespace TsSFCDeivceClient
|
|||
/// </summary>
|
||||
void InitializeGridViewStyle()
|
||||
{
|
||||
gridView1.OptionsMenu.EnableColumnMenu = false;
|
||||
gridView1.OptionsSelection.ShowCheckBoxSelectorInColumnHeader = DevExpress.Utils.DefaultBoolean.False;
|
||||
/// 自增长行号
|
||||
gridView1.CustomDrawRowIndicator += (s, e) =>
|
||||
{
|
||||
|
@ -464,13 +466,11 @@ namespace TsSFCDeivceClient
|
|||
}
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Info("操作成功!");
|
||||
InitializeGridDatas();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Error(ex.Message);
|
||||
InitializeGridDatas();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,13 +527,11 @@ namespace TsSFCDeivceClient
|
|||
}
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Info("操作成功!");
|
||||
InitializeGridDatas();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Error(ex.Message);
|
||||
InitializeGridDatas();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -579,7 +577,6 @@ namespace TsSFCDeivceClient
|
|||
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Info("操作成功!");
|
||||
InitializeGridDatas();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -596,7 +593,6 @@ namespace TsSFCDeivceClient
|
|||
{
|
||||
CloseWaitForm();
|
||||
XtraMessageBoxHelper.Error(ex.Message);
|
||||
InitializeGridDatas();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user