diff --git a/24Hour.sln b/24Hour.sln index 3191605..a49ca2d 100644 --- a/24Hour.sln +++ b/24Hour.sln @@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elight.Utility", "Elight.Ut EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{BB831806-197B-4508-9AD5-5D3EDB7FCA27}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dto", "Dto\Dto.csproj", "{995583AC-3F9C-46F3-8B9F-4CE62B01044A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,10 @@ Global {BB831806-197B-4508-9AD5-5D3EDB7FCA27}.Debug|Any CPU.Build.0 = Debug|Any CPU {BB831806-197B-4508-9AD5-5D3EDB7FCA27}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB831806-197B-4508-9AD5-5D3EDB7FCA27}.Release|Any CPU.Build.0 = Release|Any CPU + {995583AC-3F9C-46F3-8B9F-4CE62B01044A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {995583AC-3F9C-46F3-8B9F-4CE62B01044A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {995583AC-3F9C-46F3-8B9F-4CE62B01044A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {995583AC-3F9C-46F3-8B9F-4CE62B01044A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Dto/AjgldsrxxDto.cs b/Dto/AjgldsrxxDto.cs new file mode 100644 index 0000000..27f56d9 --- /dev/null +++ b/Dto/AjgldsrxxDto.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Dto +{ + public class AjgldsrxxDto + { + + public int endRow { get; set; } + public int firstPage { get; set; } + public bool hasNextPage { get; set; } + public bool isFirstPage { get; set; } + public bool isLastPage { get; set; } + public int lastPage { get; set; } + + public List list { get; set; } + public int navigateFirstPage { get; set; } + public int navigateLastPage { get; set; } + public int navigatePages { get; set; } + public List navigatepageNums { get; set; } + public int nextPage { get; set; } + public int pageNum { get; set; } + public int pageSize { get; set; } + public int pages { get; set; } + public int prePage { get; set; } + public int size { get; set; } + public int startRow { get; set; } + public int total { get; set; } + } + public class AjglBaseDto + { + /// + /// 部门受案号 + /// + public string bmsah { get; set; } + + /// + /// 国籍代码 + /// + public string gjdm { get; set; } + /// + /// 国籍名称 + /// + public string gjmc { get; set; } + /// + /// 民族代码 + /// + public string mzdm { get; set; } + /// + /// 民族名称 + /// + public string mzmc { get; set; } + /// + /// 性别代码 + /// + public string xbdm { get; set; } + /// + /// / 性别 + /// + public string xbmc { get; set; } + /// + /// 姓名 + /// + public string xm { get; set; } + /// + /// 证件号码 + /// + public string zjhm { get; set; } + + /// + /// 证件类型代码 + /// + public string zjlxdm { get; set; } + /// + /// 证件类型 + /// + public string zjlxmc { get; set; } + /// + /// + /// + public string zrrbm { get; set; } + + /// + /// 当事人类型代码 + /// + public string zrrlxdm { get; set; } + /// + /// 当事人类型 + /// + public string zrrlxmc { get; set; } + } +} diff --git a/Dto/Class1.cs b/Dto/Class1.cs new file mode 100644 index 0000000..0abad22 --- /dev/null +++ b/Dto/Class1.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Dto +{ + internal class Class1 + { + } +} diff --git a/Dto/Dto.csproj b/Dto/Dto.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Dto/Dto.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + diff --git a/Dto/FileResultDto.cs b/Dto/FileResultDto.cs new file mode 100644 index 0000000..de70030 --- /dev/null +++ b/Dto/FileResultDto.cs @@ -0,0 +1,50 @@ +namespace Dto +{ + public class FileResultDto + { + public string code { get; set; } + + + public string message { get; set; } + + + public bool? success { get; set; } + + + + public FileResultBaseDto data { get; set; } + } + + public class FileResultBaseDto + { + + public string dir { get; set; } + + + public string name { get; set; } + + + public int size { get; set; } + + + public object storageDeleteResult { get; set; } + + + + public StorageResultDto storageResult { get; set; } + + } + + public class StorageResultDto + { + + public object length { get; set; } + + + public string md5 { get; set; } + + public bool success { get; set; } + + + } +} diff --git a/Dto/FindBhdlGzblDto.cs b/Dto/FindBhdlGzblDto.cs new file mode 100644 index 0000000..4e81c93 --- /dev/null +++ b/Dto/FindBhdlGzblDto.cs @@ -0,0 +1,55 @@ +namespace Dto +{ + public class FindBhdlGzblDto + { + + public string ajmc { get; set; } + /// + /// 必要参数 + /// + public string bhdlbh { get; set; } + public string bmsah { get; set; } + public string cbbmbm { get; set; } + public string cbbmmc { get; set; } + public string cbdwbm { get; set; } + public string cbdwmc { get; set; } + public string cbjcgbm { get; set; } + public string cbjcgmc { get; set; } + public string clqkbm { get; set; } + public string dsr { get; set; } + public string sfkcz { get; set; } + public string sqrbh { get; set; } + public string sqrq { get; set; } + public string sqrxm { get; set; } + public string sxbh { get; set; } + public string sxlsbh { get; set; } + public string sxlxdm { get; set; } + public string sxlxmc { get; set; } + public int? sxqx { get; set; } + public int? syrq { get; set; } + public string zjhm { get; set; } + public string zt { get; set; } + } + + + + public class ResultGzbl + { + + public bool? success { get; set; } + + public string message { get; set; } + + public string code { get; set; } + + + public GzblDto data { get; set; } + } + + public class GzblDto + { + public int total { get; set; } + + public List coumment { get; set; } + } +} diff --git a/Dto/RegisterDto.cs b/Dto/RegisterDto.cs new file mode 100644 index 0000000..6239db8 --- /dev/null +++ b/Dto/RegisterDto.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Dto +{ + public class RegisterDto + { + /// + /// 部门受案号 + /// + public string Bmsah { get; set; } + + + /// + /// 单位编码 + /// + public string UnitCode { get; set; } + + + /// + /// 单位编码 + /// + public string UnitName { get; set; } + + + /// + /// 当事人身份证 + /// + public string PartyIdCard { get; set; } + + /// + /// 当事人-委托人 + /// + public int PartyConsignor { get; set; } + + + /// + /// 当事人-委托人关系 + /// + public int PartyPrincipalRelationship { get; set; } + + + /// + /// 申请人-身份证 + /// + + public string ProposerIdCard { get; set; } + + /// + /// 申请人类型 + /// + + public string ProposerType { get; set; } + + + /// + /// 申请人-联系电话 + /// + public string ProposerTel { get; set; } + + + /// + /// 律师事务所统一社会信用代码 + /// + public string ProposerSCC { get; set; } + + } +} diff --git a/Dto/SaveBhdlclxxDto.cs b/Dto/SaveBhdlclxxDto.cs new file mode 100644 index 0000000..d24c16f --- /dev/null +++ b/Dto/SaveBhdlclxxDto.cs @@ -0,0 +1,47 @@ +namespace Dto +{ + public class SaveBhdlclxxDto + { + + public List bhdlClxxInputDTOList { get; set; } + + + public string bhdlbh { get; set; } + + + + public string bmsah { get; set; } + + public string cllxdm { get; set; } + + + public string cllxmc { get; set; } + + public string dwbm { get; set; } + + public string dwmc { get; set; } + + public string sxbh { get; set; } + } + + public class BhdlClxxInputDTOList + { + public string clbh { get; set; } + + public string fwqwjmc { get; set; } + + public string md5 { get; set; } + + + public string wjkzm { get; set; } + + + public string wjlj { get; set; } + + + public string wjmc { get; set; } + + public int wjzjs { get; set; } + } + +} diff --git a/Dto/UploadDto.cs b/Dto/UploadDto.cs new file mode 100644 index 0000000..70b660b --- /dev/null +++ b/Dto/UploadDto.cs @@ -0,0 +1,35 @@ +namespace Dto +{ + public class UploadDto + { + /// + /// 部门受案号 + /// + public string Bmsah { get; set; } + + /// + /// base64字符串 + /// + public string ImageStr { get; set; } + + /// + /// 1423000000100-律师执业证书,1423000000200-律师事务所证, 1423000000300- 授权委托书, 1423000000400- 法律援助公函,1423000000500-身份证件 ,1423000000600-关系证明材料, 1423000000700- 其他 + /// + public string Code { get; set; } + + /// + /// 文件名称 + /// + public string FileName { get; set; } + + /// + /// 单位编码 + /// + public string UnitCode { get; set; } + + /// + /// 单位名称 + /// + public string UnitName { get; set; } + } +} diff --git a/Dto/UploadImageDto.cs b/Dto/UploadImageDto.cs new file mode 100644 index 0000000..9f8723f --- /dev/null +++ b/Dto/UploadImageDto.cs @@ -0,0 +1,21 @@ +namespace Dto +{ + public class UploadImageDto + { + /// + /// 0 + /// + public int blzt { get; set; } + public string dwbm { get; set; } // 410503, + public string bmsah { get; set; } + public string ajmc { get; set; } + public string zrrxm { get; set; } + public string sqrxm { get; set; } + public string gjz { get; set; } + public string sxlxdm { get; set; } + public object ksrq { get; set; } + public object jsrq { get; set; } + public int pageNum { get; set; } + public int pageSize { get; set; } + } +} diff --git a/Dto/bin/Debug/net6.0/Dto.deps.json b/Dto/bin/Debug/net6.0/Dto.deps.json new file mode 100644 index 0000000..d369b25 --- /dev/null +++ b/Dto/bin/Debug/net6.0/Dto.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "Dto/1.0.0": { + "runtime": { + "Dto.dll": {} + } + } + } + }, + "libraries": { + "Dto/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/Dto/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs b/Dto/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs new file mode 100644 index 0000000..ed92695 --- /dev/null +++ b/Dto/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] diff --git a/Dto/obj/Debug/net6.0/Dto.AssemblyInfo.cs b/Dto/obj/Debug/net6.0/Dto.AssemblyInfo.cs new file mode 100644 index 0000000..571a848 --- /dev/null +++ b/Dto/obj/Debug/net6.0/Dto.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Dto")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("Dto")] +[assembly: System.Reflection.AssemblyTitleAttribute("Dto")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// 由 MSBuild WriteCodeFragment 类生成。 + diff --git a/Dto/obj/Debug/net6.0/Dto.AssemblyInfoInputs.cache b/Dto/obj/Debug/net6.0/Dto.AssemblyInfoInputs.cache new file mode 100644 index 0000000..682e218 --- /dev/null +++ b/Dto/obj/Debug/net6.0/Dto.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +24467ac260176f765658abbc64d2580ba42c4bc0 diff --git a/Dto/obj/Debug/net6.0/Dto.GeneratedMSBuildEditorConfig.editorconfig b/Dto/obj/Debug/net6.0/Dto.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..df431c4 --- /dev/null +++ b/Dto/obj/Debug/net6.0/Dto.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,11 @@ +is_global = true +build_property.TargetFramework = net6.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = Dto +build_property.ProjectDir = C:\core\24Hour.Service\Dto\ diff --git a/Dto/obj/Debug/net6.0/Dto.GlobalUsings.g.cs b/Dto/obj/Debug/net6.0/Dto.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/Dto/obj/Debug/net6.0/Dto.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +global using global::System; +global using global::System.Collections.Generic; +global using global::System.IO; +global using global::System.Linq; +global using global::System.Net.Http; +global using global::System.Threading; +global using global::System.Threading.Tasks; diff --git a/Dto/obj/Debug/net6.0/Dto.assets.cache b/Dto/obj/Debug/net6.0/Dto.assets.cache new file mode 100644 index 0000000..ad3f561 Binary files /dev/null and b/Dto/obj/Debug/net6.0/Dto.assets.cache differ diff --git a/Dto/obj/Debug/net6.0/Dto.csproj.AssemblyReference.cache b/Dto/obj/Debug/net6.0/Dto.csproj.AssemblyReference.cache new file mode 100644 index 0000000..f0352d1 Binary files /dev/null and b/Dto/obj/Debug/net6.0/Dto.csproj.AssemblyReference.cache differ diff --git a/Dto/obj/Debug/net6.0/Dto.csproj.CoreCompileInputs.cache b/Dto/obj/Debug/net6.0/Dto.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..b2e1945 --- /dev/null +++ b/Dto/obj/Debug/net6.0/Dto.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +ccca575b8362d1b2377ddd7db4c9085ea077e8d3 diff --git a/Dto/obj/Dto.csproj.nuget.dgspec.json b/Dto/obj/Dto.csproj.nuget.dgspec.json new file mode 100644 index 0000000..7917001 --- /dev/null +++ b/Dto/obj/Dto.csproj.nuget.dgspec.json @@ -0,0 +1,64 @@ +{ + "format": 1, + "restore": { + "C:\\core\\24Hour.Service\\Dto\\Dto.csproj": {} + }, + "projects": { + "C:\\core\\24Hour.Service\\Dto\\Dto.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\core\\24Hour.Service\\Dto\\Dto.csproj", + "projectName": "Dto", + "projectPath": "C:\\core\\24Hour.Service\\Dto\\Dto.csproj", + "packagesPath": "C:\\Users\\Administrator\\.nuget\\packages\\", + "outputPath": "C:\\core\\24Hour.Service\\Dto\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Administrator\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\游戏文件夹\\Dll": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/Dto/obj/Dto.csproj.nuget.g.props b/Dto/obj/Dto.csproj.nuget.g.props new file mode 100644 index 0000000..1781920 --- /dev/null +++ b/Dto/obj/Dto.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\Administrator\.nuget\packages\ + PackageReference + 6.6.0 + + + + + \ No newline at end of file diff --git a/Dto/obj/Dto.csproj.nuget.g.targets b/Dto/obj/Dto.csproj.nuget.g.targets new file mode 100644 index 0000000..3dc06ef --- /dev/null +++ b/Dto/obj/Dto.csproj.nuget.g.targets @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Dto/obj/project.assets.json b/Dto/obj/project.assets.json new file mode 100644 index 0000000..40de25d --- /dev/null +++ b/Dto/obj/project.assets.json @@ -0,0 +1,69 @@ +{ + "version": 3, + "targets": { + "net6.0": {} + }, + "libraries": {}, + "projectFileDependencyGroups": { + "net6.0": [] + }, + "packageFolders": { + "C:\\Users\\Administrator\\.nuget\\packages\\": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\core\\24Hour.Service\\Dto\\Dto.csproj", + "projectName": "Dto", + "projectPath": "C:\\core\\24Hour.Service\\Dto\\Dto.csproj", + "packagesPath": "C:\\Users\\Administrator\\.nuget\\packages\\", + "outputPath": "C:\\core\\24Hour.Service\\Dto\\obj\\", + "projectStyle": "PackageReference", + "configFilePaths": [ + "C:\\Users\\Administrator\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "net6.0" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "C:\\游戏文件夹\\Dll": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "net6.0": { + "targetAlias": "net6.0", + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.306\\RuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Dto/obj/project.nuget.cache b/Dto/obj/project.nuget.cache new file mode 100644 index 0000000..de8b953 --- /dev/null +++ b/Dto/obj/project.nuget.cache @@ -0,0 +1,8 @@ +{ + "version": 2, + "dgSpecHash": "aBP4DpXaMgoARxZa7jC+2/OpB8f0apQvutUjpKvCZq5BqhIvN/WzLcvuunyUhHgo503i8NiV6jJvit7a9mkSCQ==", + "success": true, + "projectFilePath": "C:\\core\\24Hour.Service\\Dto\\Dto.csproj", + "expectedPackageFiles": [], + "logs": [] +} \ No newline at end of file diff --git a/WebApplication1/Controllers/TwentySystemController.cs b/WebApplication1/Controllers/TwentySystemController.cs index 0d7a9dc..3716222 100644 --- a/WebApplication1/Controllers/TwentySystemController.cs +++ b/WebApplication1/Controllers/TwentySystemController.cs @@ -1,9 +1,19 @@ +using Dto; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.AspNetCore.Mvc.ViewFeatures; +using Microsoft.Win32; using Newtonsoft.Json; +using System.Collections.Specialized; +using System.Data; +using System.Dynamic; using System.Net.Http; +using System.Net.Http.Headers; +using System.Reflection.Metadata; using System.Runtime; using System.Runtime.Serialization; +using System.Text; +using System.Web; using test; using WebApplication1.Models; @@ -21,7 +31,7 @@ namespace WebApplication1.Controllers ip = configuration.GetSection("Configs:SystemIp").Value; port = configuration.GetSection("Configs:Port").Value; httpClient = httpClientFactory.CreateClient(); - httpClient.BaseAddress = new Uri($"http://{ip}:{port}"); + httpClient.BaseAddress = new Uri("http://143.120.5.116:8080"); // new Uri($"http://{ip}:{port}"); httpClient.DefaultRequestHeaders.Add("Accept", "application/json"); httpClient.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample"); httpClient.DefaultRequestHeaders.ConnectionClose = true; @@ -117,7 +127,7 @@ namespace WebApplication1.Controllers }; return res; } - + } else { @@ -299,8 +309,297 @@ namespace WebApplication1.Controllers } + /// + /// ʸ + /// + /// + [HttpPost("UploadImage")] + public async Task UploadImage([FromBody] UploadDto dto) + { + // var client = new HttpClient(); + Result result = new Result(); + if (dto == null) + { + result.IsSucceed = false; + result.Message = "ʧ"; + return result; + } + if (string.IsNullOrEmpty(dto.Code) || dto.Code == "0") + { + result.IsSucceed = false; + result.Message = "ͱ벻Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.ImageStr) || dto.ImageStr == "0") + { + result.IsSucceed = false; + result.Message = "base64ͼƬΪ"; + return result; + } + if (string.IsNullOrEmpty(dto.Bmsah) || dto.Bmsah == "0") + { + result.IsSucceed = false; + result.Message = "ܰŲΪ"; + return result; + } + if (string.IsNullOrEmpty(dto.UnitCode) || dto.UnitCode == "0") + { + result.IsSucceed = false; + result.Message = "λ벻Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.FileName) || dto.FileName == "0") + { + result.IsSucceed = false; + result.Message = "ļƲΪ"; + return result; + } + if (string.IsNullOrEmpty(dto.UnitName) || dto.UnitName == "0") + { + result.IsSucceed = false; + result.Message = "λƲΪ"; + return result; + } + + UploadImageDto uploadImageDto = new UploadImageDto() + { + pageSize = 10, + pageNum = 1, + blzt = 0, + dwbm = "410503", + bmsah = dto.Bmsah, + ajmc = "", + gjz = "", + jsrq = null, + ksrq = null, + sqrxm = "", + sxlxdm = "", + zrrxm = "", + }; + // Ϣ + var request = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findBhdlGzbl", uploadImageDto); + var findBhdlGzbl = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); + var resultGzbl = JsonConvert.DeserializeObject(findBhdlGzbl); + if (resultGzbl.success == false && resultGzbl.code != "0") + { + result.IsSucceed = false; + result.Message = "ݲ"; + return result; + } + if (resultGzbl.data != null && resultGzbl.data.coumment != null && resultGzbl.data.coumment.Count > 0) + { + foreach (var item in resultGzbl.data.coumment) + { + //ļ + string fileName = dto.FileName.Split('.')[0]; + //׺ + string suffix = dto.FileName.Split('.')[1]; + string id = Guid.NewGuid().ToString().Replace("-", null); + //Ҫ + //item.bhdlbh + string dir = "yxsj/" + dto.UnitCode + "/bhdl-service/cl/" + dto.Bmsah + "/" + item.bhdlbh; + /// + // var base64Iamge = HttpUtility.UrlDecode(dto.ImageStr); + byte[] DocBytes = Convert.FromBase64String(dto.ImageStr); + var memoryStream = new MemoryStream(DocBytes); + System.IO.File.WriteAllBytes(id + "." + suffix, DocBytes); + var content = new MultipartFormDataContent(); + var fileContent = new StreamContent(memoryStream); + content.Add(fileContent, "file", id + "." + suffix); + + + + content.Add(new StringContent(dir), "dir"); + content.Add(new StringContent(id + "." + suffix), "name"); + content.Add(new StringContent("true"), "overrideOnExists"); + + + var responses = await httpClient.PostAsync("/wjfw-service/raw/file/save", content); + var sresponse = await responses.Content.ReadAsStringAsync(); + if (!string.IsNullOrEmpty(sresponse)) + { + var fileResultDto = JsonConvert.DeserializeObject(sresponse); + if (fileResultDto.success == true && fileResultDto.code == "0") + { + SaveBhdlclxxDto saveBhdlclxxDto = new SaveBhdlclxxDto() + { + + bhdlbh = item.bhdlbh, + bmsah = dto.Bmsah, + dwbm = dto.UnitCode, + dwmc = dto.UnitName, + sxbh = "", + }; + if (dto.Code == "1423000000100") + { + saveBhdlclxxDto.cllxdm = "1423000000100"; + saveBhdlclxxDto.cllxmc = "ʦִҵ֤"; + } + else if (dto.Code == "1423000000200") + { + saveBhdlclxxDto.cllxdm = "1423000000200"; + saveBhdlclxxDto.cllxmc = "ʦ֤"; + } + else if (dto.Code == "1423000000300") + { + saveBhdlclxxDto.cllxdm = "1423000000300"; + saveBhdlclxxDto.cllxmc = "Ȩί"; + } + else if (dto.Code == "1423000000400") + { + saveBhdlclxxDto.cllxdm = "1423000000400"; + saveBhdlclxxDto.cllxmc = "Ԯ"; + } + else if (dto.Code == "1423000000500") + { + saveBhdlclxxDto.cllxdm = "1423000000500"; + saveBhdlclxxDto.cllxmc = "֤"; + } + else if (dto.Code == "1423000000600") + { + saveBhdlclxxDto.cllxdm = "1423000000600"; + saveBhdlclxxDto.cllxmc = "ϵ֤"; + } + else if (dto.Code == "1423000000700") + { + saveBhdlclxxDto.cllxdm = "1423000000700"; + saveBhdlclxxDto.cllxmc = ""; + } + List bhdlClxxInputDTOLists = new List(); + bhdlClxxInputDTOLists.Add(new BhdlClxxInputDTOList() + { + clbh = id, + fwqwjmc = id + "." + suffix,// dto.FileName, + md5 = fileResultDto.data.storageResult.md5, + wjkzm = suffix, + wjlj = dir, + wjmc = fileName, + wjzjs = fileResultDto.data.size + }); + saveBhdlclxxDto.bhdlClxxInputDTOList = bhdlClxxInputDTOLists; + + var httpResponse = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlCl/saveBhdlclxx", saveBhdlclxxDto); + var resultDataDto = await httpResponse.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); + var dataDto = JsonConvert.DeserializeObject>(resultDataDto); + if (dataDto.success == true && dataDto.code == "0") + { + result.IsSucceed = true; + result.Message = "ϴɹ"; + } + else + { + result.IsSucceed = false; + result.Message = dataDto.message; + } + + + } + } + } + } + else + { + result.IsSucceed = false; + result.Message = resultGzbl.message; + } + return result; + } + + + /// + /// ȼ + /// + /// + /// + [HttpPost("Register")] + public async Task Register([FromBody] RegisterDto dto) + { + Result result = new Result(); + #region ж + if (dto != null) + { + result.IsSucceed = false; + result.Message = "ʧ"; + return result; + } + if (string.IsNullOrEmpty(dto.UnitName)) + { + result.IsSucceed = false; + result.Message = "λƲΪ"; + return result; + } + if (string.IsNullOrEmpty(dto.UnitCode)) + { + result.IsSucceed = false; + result.Message = "λ벻Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.Bmsah)) + { + result.IsSucceed = false; + result.Message = "ܰŲΪ"; + return result; + } + if (string.IsNullOrEmpty(dto.PartyIdCard)) + { + result.IsSucceed = false; + result.Message = "֤Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.ProposerSCC)) + { + result.IsSucceed = false; + result.Message = "ʦͳһô벻Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.ProposerTel)) + { + result.IsSucceed = false; + result.Message = "ϵ绰Ϊ"; + return result; + } + if (string.IsNullOrEmpty(dto.ProposerIdCard)) + { + result.IsSucceed = false; + result.Message = "֤Ϊ"; + return result; + } + #endregion + var findAjgldsrxx = new + { + bmsah = dto.Bmsah, + dwbm = dto.UnitCode, + gjz = dto.PartyIdCard, + pageNum = 1, + pageSize = 20 + }; + var request = await httpClient.PostAsJsonAsync("/bhdl-service/api/bhdlGl/findAjgldsrxx", findAjgldsrxx); + var findBhdlGzbl = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); + var resultGzbl = JsonConvert.DeserializeObject(findBhdlGzbl); + + + return result; + } + + /// Stream ת byte[] + private static byte[] StreamToBytes(Stream stream) + { + byte[] bytes = new byte[stream.Length]; + stream.Read(bytes, 0, bytes.Length); + // õǰλΪĿʼ + stream.Seek(0, SeekOrigin.Begin); + return bytes; + } + + /// byte[] ת Stream + + private static Stream BytesToStream(byte[] bytes) + { + Stream stream = new MemoryStream(bytes); + return stream; + } } public class Paging diff --git a/WebApplication1/Models/ResultDto.cs b/WebApplication1/Models/ResultDto.cs index 0368845..eeb0d64 100644 --- a/WebApplication1/Models/ResultDto.cs +++ b/WebApplication1/Models/ResultDto.cs @@ -29,4 +29,10 @@ namespace WebApplication1.Models public T Data { get; set; } } + + public class ResultDataDto : ResultDto { + + + public T data { get; set; } + } } diff --git a/WebApplication1/WebApplication1.csproj b/WebApplication1/WebApplication1.csproj index 68eaeec..17d6856 100644 --- a/WebApplication1/WebApplication1.csproj +++ b/WebApplication1/WebApplication1.csproj @@ -16,6 +16,10 @@ + + + + Always diff --git a/WebApplication1/WebApplication1.csproj.user b/WebApplication1/WebApplication1.csproj.user index 555da40..673249c 100644 --- a/WebApplication1/WebApplication1.csproj.user +++ b/WebApplication1/WebApplication1.csproj.user @@ -4,7 +4,7 @@ ProjectDebugger - WebApplication1 + IIS Express C:\Users\callm\source\repos\24Hour.Service\WebApplication1\Properties\PublishProfiles\FolderProfile.pubxml \ No newline at end of file diff --git a/WebApplication1/obj/Debug/net6.0/WebApplication1.csproj.CoreCompileInputs.cache b/WebApplication1/obj/Debug/net6.0/WebApplication1.csproj.CoreCompileInputs.cache index cc0b7bf..7c542f7 100644 --- a/WebApplication1/obj/Debug/net6.0/WebApplication1.csproj.CoreCompileInputs.cache +++ b/WebApplication1/obj/Debug/net6.0/WebApplication1.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -4fbf06549b48e311fd9f932b7cdd22c5126584bd +fc6a57648ae2715e3ffa56ead59576c5c6cfeb81