diff --git a/IDIS_Models.csproj b/IDIS_Models.csproj
index 1a2e6dc..92c68e7 100644
--- a/IDIS_Models.csproj
+++ b/IDIS_Models.csproj
@@ -34,6 +34,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Models/IDIS_Code.cs b/src/Models/IDIS_Code.cs
index a837344..d3c3239 100644
--- a/src/Models/IDIS_Code.cs
+++ b/src/Models/IDIS_Code.cs
@@ -11,4 +11,69 @@ namespace IDIS.Models
public const string AddressRegex = @"^\d{1,3}\.\d{1,3}\.\d{1,3}/[A-Za-z0-9]{1,32}$";
public const string Prefix = @"^\d{1,3}\.\d{1,3}\.\d{1,3}$";
}
+ public enum MajorIndustryCode
+ {
+ A = 1, // 农、林、牧、渔业
+ B = 2, // 采矿业
+ C = 3, // 制造业
+ D = 4, // 电力、热力、燃气及水生产和供应业
+ E = 5, // 建筑业
+ F = 6, // 批发和零售业
+ G = 7, // 交通运输、仓储和邮政业
+ H = 8, // 住宿和餐饮业
+ I = 9, // 信息传输、软件和信息技术服务业
+ J = 10, // 金融业
+ K = 11, // 房地产业
+ L = 12, // 租赁和商务服务业
+ M = 13, // 科学研究和技术服务业
+ N = 14, // 水利、环境和公共设施管理业
+ O = 15, // 居民服务、修理和其他服务业
+ P = 16, // 教育
+ Q = 17, // 卫生和社会工作
+ R = 18, // 文化、体育和娱乐业
+ S = 19, // 公共管理、社会保障和社会组织
+ T = 20 // 国际组织
+ }
+
+ public enum MinorIndustryCode
+ {
+ Agriculture = 1, // 农业
+ Forestry = 2, // 林业
+ AnimalHusbandry = 3, // 畜牧业
+ Fishery = 4, // 渔业
+ // ... Add similar entries for other codes
+ }
+
+ public enum EnterpriseTypeCode
+ {
+ GovernmentAgency = 1, // 政府机关
+ ResearchInstitution = 2, // 研究机构
+ SocialOrganization = 3, // 社会团体
+ EnterpriseUnit = 4 // 企业事业单位
+ }
+
+ public enum BusinessLicenseCode
+ {
+ BusinessLicense = 1, // 营业执照
+ TaxCertificate = 2, // 税务证
+ OrganizationCodeCertificate = 3, // 组织机构代码证
+ SafetyProductionLicense = 4, // 安全生产许可证
+ IndustrialProductProductionLicense = 5 // 工业产品生产许可证或许可证
+ }
+
+ public enum CreditType
+ {
+ UnifiedSocialCreditCode = 1, // 统一社会信用代码
+ Other = 3 // 其他
+ }
+
+ public enum DocumentTypeCode
+ {
+ ChineseResidentIDCard = 1, // 中国居民身份证
+ HongKongMacaoResidentsMainlandTravelPermit = 2, // 港澳居民往来内地通行证
+ TaiwanResidentsMainlandTravelPermit = 3, // 台湾居民往来大陆通行证
+ ForeignPermanentResidentIDCard = 4, // 外国人永久居留身份证
+ HongKongMacaoTaiwanResidentsResidencePermit = 5, // 港澳台居民居住证
+ Passport = 6 // 护照
+ }
}
diff --git a/src/Models/IDIS_Enterprise.cs b/src/Models/IDIS_Enterprise.cs
new file mode 100644
index 0000000..1f4d54a
--- /dev/null
+++ b/src/Models/IDIS_Enterprise.cs
@@ -0,0 +1,271 @@
+using System.ComponentModel.DataAnnotations;
+using Newtonsoft.Json;
+using System;
+namespace IDIS.Models
+{
+ ///
+ /// IDIS 查询企业的结果
+ ///
+ public record IDIS_EnterpriseData
+ {
+ ///
+ /// 前缀名称
+ ///
+ [JsonProperty("prefix")]
+ public string Prefix { get; set; }
+
+ ///
+ /// 前缀创建时间
+ ///
+ [JsonProperty("createDate")]
+ public DateTime CreateDate { get; set; }
+
+ ///
+ /// 前缀注册服务机构
+ ///
+ [JsonProperty("ghrName")]
+ public string GhrName { get; set; }
+
+ ///
+ /// 前缀状态
+ ///
+ [JsonProperty("status")]
+ public int Status { get; set; }
+
+ ///
+ /// 企业中文名称
+ ///
+ [JsonProperty("entNameCn")]
+ public string EntNameCn { get; set; }
+
+ ///
+ /// 企业官方地址
+ ///
+ [JsonProperty("entSite")]
+ public string EntSite { get; set; }
+
+ ///
+ /// 企业所属行业
+ ///
+ [JsonProperty("entIndustry")]
+ public string EntIndustry { get; set; }
+
+ ///
+ /// 企业中文地址
+ ///
+ [JsonProperty("entAddrCn")]
+ public string EntAddrCn { get; set; }
+
+ ///
+ /// 企业简介
+ ///
+ [JsonProperty("entDesc")]
+ public string EntDesc { get; set; }
+ }
+
+ ///
+ /// IDIS Enterprise class
+ ///
+ public record IDIS_Enterprise
+ {
+ ///
+ /// System user information
+ ///
+ public record SystemUserInfo
+ {
+ ///
+ /// User name
+ ///
+ [JsonProperty("userName")]
+#if NET5_0_OR_GREATER
+ [Key]
+#endif
+ public string UserName { get; set; }
+ ///
+ /// User email
+ ///
+ [JsonProperty("email")]
+ public string EMail { get; set; }
+
+ ///
+ /// User mobile
+ ///
+ [JsonProperty("mobile")]
+ public string Mobile { get; set; }
+
+ ///
+ /// User password
+ ///
+ [JsonProperty("password")]
+ public string Password { get; set; }
+
+ ///
+ /// User remarks
+ ///
+ [JsonProperty("remarks")]
+ public string Remark { get; set; }
+
+
+ }
+
+ ///
+ /// Enterprise qualification information
+ ///
+ public record EnterpriseInfo
+ {
+ ///
+ /// Enterprise email
+ ///
+ [JsonProperty("email")]
+ public string EMail { get; set; }
+
+ ///
+ /// Enterprise detailed address
+ ///
+ [JsonProperty("entAddrCn")]
+ public string AddressCN { get; set; }
+
+ ///
+ /// City code
+ ///
+ [JsonProperty("entCityCode")]
+ public string CityCode { get; set; }
+
+
+ ///
+ /// County code
+ ///
+ [JsonProperty("entCountyCode")]
+ public string CountyCode { get; set; }
+
+ ///
+ /// Credit code
+ ///
+#if NET5_0_OR_GREATER
+ [Key]
+#endif
+ [JsonProperty("entCrtCode")]
+ public string CreditCode { get; set; }
+
+ ///
+ /// Business license image Base64 encoding
+ ///
+ [JsonProperty("entCrtImgContent")]
+ public string CreditImageContent { get; set; }
+
+ ///
+ /// Business license type code
+ ///
+ [JsonProperty("entCrtType")]
+ public CreditType CreditType { get; set; }
+
+ ///
+ /// Enterprise remarks
+ ///
+ [JsonProperty("entDesc")]
+ public string Descption { get; set; }
+
+ ///
+ /// Major industry code
+ ///
+ [JsonProperty("entIndustry")]
+ public MajorIndustryCode Industry { get; set; }
+
+ ///
+ /// Enterprise name
+ ///
+ [JsonProperty("entNameCn")]
+ public string NameCN { get; set; }
+
+ ///
+ /// Province code
+ ///
+ [JsonProperty("entProvinceCode")]
+ public string ProvinceCode { get; set; }
+
+ ///
+ /// Minor industry code
+ ///
+ [JsonProperty("entTrade")]
+ public MinorIndustryCode Trade { get; set; }
+
+ ///
+ /// Enterprise type code
+ ///
+ [JsonProperty("entType")]
+ public EnterpriseTypeCode Type { get; set; }
+
+ ///
+ /// Enterprise website
+ ///
+ [JsonProperty("entWebSite")]
+ public string WebSite { get; set; }
+
+ ///
+ /// Legal person ID card attachment back image Base64 encoding
+ ///
+ [JsonProperty("legalpIdImgBackContent")]
+ public string LegalPersonIdImageBackContent { get; set; }
+
+ ///
+ /// Legal person ID card attachment front image Base64 encoding
+ ///
+ [JsonProperty("legalpIdImgFrontContent")]
+ public string LegalPersonIdImageFrontContent { get; set; }
+
+ ///
+ /// Legal person ID number
+ ///
+ [JsonProperty("legalpIdno")]
+ public string LegalPersonIdNumber { get; set; }
+
+ ///
+ /// Legal person ID type code
+ ///
+ [JsonProperty("legalpIdtype")]
+ public DocumentTypeCode LegalPersonIdType { get; set; }
+
+ ///
+ /// Legal person name
+ ///
+ [JsonProperty("legalpName")]
+ public string LegalPersonIdName { get; set; }
+
+ ///
+ /// Contact mobile
+ ///
+ [JsonProperty("mobile")]
+ public string Mobile { get; set; }
+
+ ///
+ /// Enterprise remarks
+ ///
+ [JsonProperty("remarks")]
+ public string Remarks { get; set; }
+
+ ///
+ /// Enterprise prefix
+ ///
+ [JsonProperty("entPrefix")]
+ public string Prefix { get; set; }
+
+ ///
+ /// Contact name
+ ///
+ [JsonProperty("contactName")]
+ public string ContactName { get; set; }
+ }
+
+ ///
+ /// 用户信息
+ ///
+ [JsonProperty("sysUser")]
+ public SystemUserInfo SystemUser { get; set; } = new();
+
+ ///
+ /// 企业资质信息
+ ///
+ [JsonProperty("entApply")]
+ public EnterpriseInfo EnterpriseApply { get; set; } = new();
+ }
+}
\ No newline at end of file
diff --git a/src/Models/IDIS_Enterprise.cs.meta b/src/Models/IDIS_Enterprise.cs.meta
new file mode 100644
index 0000000..4703f17
--- /dev/null
+++ b/src/Models/IDIS_Enterprise.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 443bc48d302bbc74b8fd1383e434d69d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Models/IDIS_Model.cs b/src/Models/IDIS_Model.cs
index f0ee736..93a46d6 100644
--- a/src/Models/IDIS_Model.cs
+++ b/src/Models/IDIS_Model.cs
@@ -1,4 +1,7 @@
+using System;
+using System.Collections.Generic;
using System.ComponentModel;
+using System.Linq;
using System.Reflection;
using IDIS.Models;
using Newtonsoft.Json;
diff --git a/src/Models/IDIS_Model.cs.meta b/src/Models/IDIS_Model.cs.meta
new file mode 100644
index 0000000..ffb193a
--- /dev/null
+++ b/src/Models/IDIS_Model.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cfb3d4d85704cd84999361bc352942c3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Models/IDIS_Query_Data.cs b/src/Models/IDIS_Query_Data.cs
index f641afa..832d110 100644
--- a/src/Models/IDIS_Query_Data.cs
+++ b/src/Models/IDIS_Query_Data.cs
@@ -1,35 +1,39 @@
+using System;
using Newtonsoft.Json;
-namespace IDIS.Models;
-[Serializable]
-public record IDIS_Query_Data
+namespace IDIS.Models
{
- public record QueryData
+ [Serializable]
+ public record IDIS_Query_Data
{
- [JsonProperty("format")]
- public string Format;
+
+ public record QueryData
+ {
+ [JsonProperty("format")]
+ public string Format;
+ [JsonProperty("value")]
+ public string Value;
+ }
+ public record QueryInfo
+ {
+ [JsonProperty("data")]
+ public QueryData Data;
+ [JsonProperty("auth")]
+ public string Auth;
+ [JsonProperty("index")]
+ public int Index;
+ [JsonProperty("type")]
+ public string Type;
+ }
+ [JsonProperty("code")]
+ public int Code;
+ [JsonProperty("prefix")]
+ public string Prefix;
+ [JsonProperty("handle")]
+ public string Handle;
+ [JsonProperty("templateVersion")]
+ public string TemplateVersion;
[JsonProperty("value")]
- public string Value;
+ public QueryInfo[] Value=Array.Empty();
}
- public record QueryInfo
- {
- [JsonProperty("data")]
- public QueryData Data;
- [JsonProperty("auth")]
- public string Auth;
- [JsonProperty("index")]
- public int Index;
- [JsonProperty("type")]
- public string Type;
- }
- [JsonProperty("code")]
- public int Code;
- [JsonProperty("prefix")]
- public string Prefix;
- [JsonProperty("handle")]
- public string Handle;
- [JsonProperty("templateVersion")]
- public string TemplateVersion;
- [JsonProperty("value")]
- public QueryInfo[] Value=Array.Empty();
}
\ No newline at end of file
diff --git a/src/Models/IDIS_Query_Data.cs.meta b/src/Models/IDIS_Query_Data.cs.meta
new file mode 100644
index 0000000..b5fb2b2
--- /dev/null
+++ b/src/Models/IDIS_Query_Data.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 764c221188a49bb4688c8741d85f1b91
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Models/IDIS_Register_Data.cs b/src/Models/IDIS_Register_Data.cs
index ae04baf..131ca71 100644
--- a/src/Models/IDIS_Register_Data.cs
+++ b/src/Models/IDIS_Register_Data.cs
@@ -1,36 +1,37 @@
using Newtonsoft.Json;
-namespace IDIS.Models;
-
-///
-/// 用于序列化的注册数据结构
-///
-public class IDIS_Register_Data
+namespace IDIS.Models
{
- public record ValueData
+ ///
+ /// 用于序列化的注册数据结构
+ ///
+ public class IDIS_Register_Data
{
- [JsonProperty("format")]
- public string Format;
- [JsonProperty("value")]
- public string Value;
+ public record ValueData
+ {
+ [JsonProperty("format")]
+ public string Format;
+ [JsonProperty("value")]
+ public string Value;
- }
- public record ValueInfo
- {
- [JsonProperty("auth")]
- public string Auth;
- [JsonProperty("index")]
- public int Index;
- [JsonProperty("data")]
- public ValueData Data;
- [JsonProperty("type")]
- public string Type;
- }
+ }
+ public record ValueInfo
+ {
+ [JsonProperty("auth")]
+ public string Auth;
+ [JsonProperty("index")]
+ public int Index;
+ [JsonProperty("data")]
+ public ValueData Data=new();
+ [JsonProperty("type")]
+ public string Type;
+ }
- [JsonProperty("handle")]
- public required string Handle;
- [JsonProperty("templateVersion")]
- public required string TemplateVersion;
- [JsonProperty("value")]
- public required ValueInfo[] Value;
+ [JsonProperty("handle")]
+ public string Handle;
+ [JsonProperty("templateVersion")]
+ public string TemplateVersion;
+ [JsonProperty("value")]
+ public ValueInfo[] Value;
+ }
}
\ No newline at end of file
diff --git a/src/Models/IDIS_Register_Data.cs.meta b/src/Models/IDIS_Register_Data.cs.meta
new file mode 100644
index 0000000..146e11b
--- /dev/null
+++ b/src/Models/IDIS_Register_Data.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bc081ed7411fa8c47b8cf9b0b03e4678
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Models/IDIS_Template_Item.cs b/src/Models/IDIS_Template_Item.cs
index 7c14443..6a185a6 100644
--- a/src/Models/IDIS_Template_Item.cs
+++ b/src/Models/IDIS_Template_Item.cs
@@ -18,7 +18,7 @@ namespace IDIS.Models
public string Name { get; set; } = string.Empty;
[JsonProperty("idType")]
public string IdType { get; set; } = string.Empty;
- [JsonProperty("metaData")]
- public IDIS_Template_Item_MetaData MetaData { get; set; }
+
+ [JsonProperty("metaData")] public IDIS_Template_Item_MetaData MetaData { get; set; } = new();
}
}
\ No newline at end of file
diff --git a/src/Models/IDIS_Template_Item_MetaData.cs b/src/Models/IDIS_Template_Item_MetaData.cs
index 7a2c305..52dc1f1 100644
--- a/src/Models/IDIS_Template_Item_MetaData.cs
+++ b/src/Models/IDIS_Template_Item_MetaData.cs
@@ -14,10 +14,9 @@ namespace IDIS
{
Type = type;
}
- [JsonProperty("type")] public string Type { get; set; } = nameof(String);
+ [JsonProperty("type")] public string Type { get; set; } = "string";
[JsonProperty("minLength")]
public int MinLength { get; set; }
- [JsonProperty("maxLength")]
- public int MaxLength { get; set; }
+ [JsonProperty("maxLength")] public int MaxLength { get; set; } = 255;
}
}
\ No newline at end of file
diff --git a/src/Services/IDIS_EnterpriseService.cs b/src/Services/IDIS_EnterpriseService.cs
new file mode 100644
index 0000000..2ee4921
--- /dev/null
+++ b/src/Services/IDIS_EnterpriseService.cs
@@ -0,0 +1,13 @@
+using Cysharp.Threading.Tasks;
+
+namespace IDIS.Models
+{
+ public interface IDIS_EnterpriseService
+ {
+ public UniTask RegisterAsync(IDIS_Enterprise.SystemUserInfo userInfo, IDIS_Enterprise.EnterpriseInfo enterpriseInfo);
+ public UniTask GetEnterprisesAsync();
+ public UniTask GetSystemUsersAsync();
+ public UniTask GetEnterpriseAsync(string prefix);
+ public UniTask GetSystemUserAsync(string userName);
+ }
+}
\ No newline at end of file
diff --git a/src/Services/IDIS_EnterpriseService.cs.meta b/src/Services/IDIS_EnterpriseService.cs.meta
new file mode 100644
index 0000000..e94790b
--- /dev/null
+++ b/src/Services/IDIS_EnterpriseService.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 37c8be2177c3a8a44a9f92a944ccab2c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/src/Services/IDIS_Service.cs b/src/Services/IDIS_Service.cs
index 21a9c28..c76bc4e 100644
--- a/src/Services/IDIS_Service.cs
+++ b/src/Services/IDIS_Service.cs
@@ -73,6 +73,12 @@ namespace IDIS.Services
///
UniTask QueryAsync(string code);
+ ///
+ /// 异步获取所有标识
+ ///
+ ///
+ UniTask ToArrayAsync();
+
///
/// 标识码是否已注册
///