From 3b3e5ca0fc0addf20cb5f7308b7636562746fe4c Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期一, 01 九月 2025 14:53:52 +0800
Subject: [PATCH] 基础资料更新
---
MES.Service/Modes/MesDepots.cs | 288 +++++++++++++++++++++++++++++------------------
MES.Service/service/BasicData/MesDepotsManager.cs | 18 +-
2 files changed, 184 insertions(+), 122 deletions(-)
diff --git a/MES.Service/Modes/MesDepots.cs b/MES.Service/Modes/MesDepots.cs
index da16258..ab5e2cf 100644
--- a/MES.Service/Modes/MesDepots.cs
+++ b/MES.Service/Modes/MesDepots.cs
@@ -15,195 +15,257 @@
public Guid Guid { get; set; }
/// <summary>
- /// ID(SEQ_INV_ID)
- ///</summary>
- [SugarColumn(ColumnName = "DEPOT_ID")]
+ /// 浠撳簱ID
+ /// </summary>
+ [SugarColumn(ColumnName = "depot_id", IsNullable = false)]
public long DepotId { get; set; }
/// <summary>
- /// 浠撳簱绫诲埆缂栫爜
- ///</summary>
- [SugarColumn(ColumnName = "DEPOT_CODE")]
+ /// 浠撳簱缂栫爜
+ /// </summary>
+ [SugarColumn(ColumnName = "depot_code", Length = 50, IsNullable = true)]
public string? DepotCode { get; set; }
/// <summary>
- /// 浠撳簱绫诲埆鍚嶇О
- ///</summary>
- [SugarColumn(ColumnName = "DEPOT_NAME")]
+ /// 浠撳簱鍚嶇О
+ /// </summary>
+ [SugarColumn(ColumnName = "depot_name", Length = 100, IsNullable = true)]
public string? DepotName { get; set; }
/// <summary>
- /// 澶囨敞
- ///</summary>
- [SugarColumn(ColumnName = "DESCRIPTION")]
+ /// 澶囨敞
+ /// </summary>
+ [SugarColumn(ColumnName = "description", Length = 255, IsNullable = true)]
public string? Description { get; set; }
/// <summary>
- /// 浠撳簱璐熻矗浜�
- ///</summary>
- [SugarColumn(ColumnName = "CREATE_BY")]
+ /// 浠撳簱璐熻矗浜�
+ /// </summary>
+ [SugarColumn(ColumnName = "create_by", Length = 20, IsNullable = true)]
public string? CreateBy { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
- ///</summary>
- [SugarColumn(ColumnName = "CREATE_DATE")]
- public string? CreateDate { get; set; }
+ /// 鍒涘缓鏃堕棿
+ /// </summary>
+ [SugarColumn(ColumnName = "create_date", IsNullable = true)]
+ public DateTime? CreateDate { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂颁汉
- ///</summary>
- [SugarColumn(ColumnName = "LASTUPDATE_BY")]
+ /// 鏈�鍚庢洿鏂颁汉
+ /// </summary>
+ [SugarColumn(ColumnName = "lastupdate_by", Length = 20, IsNullable = true)]
public string? LastupdateBy { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂版椂闂�
- ///</summary>
- [SugarColumn(ColumnName = "LASTUPDATE_DATE")]
- public string? LastupdateDate { get; set; }
+ /// 鏈�鍚庢洿鏂版椂闂�
+ /// </summary>
+ [SugarColumn(ColumnName = "lastupdate_date", IsNullable = true)]
+ public DateTime? LastupdateDate { get; set; }
/// <summary>
- /// 浠撳簱绫诲瀷
- ///</summary>
- [SugarColumn(ColumnName = "DEPOTTYPE")]
+ /// 浠撳簱绫诲瀷
+ /// </summary>
+ [SugarColumn(ColumnName = "depottype", Length = 30, IsNullable = true)]
public string? Depottype { get; set; }
/// <summary>
- /// 鍒嗗巶缂栫爜
- ///</summary>
- [SugarColumn(ColumnName = "FACTORY")]
+ /// 鍒嗗巶缂栫爜
+ /// </summary>
+ [SugarColumn(ColumnName = "factory", Length = 20, IsNullable = true)]
public string? Factory { get; set; }
/// <summary>
- /// 鐗╂枡浣跨敤
- /// 榛樿鍊�: ((0))
- ///</summary>
- [SugarColumn(ColumnName = "TYPE_1")]
- public long? Type1 { get; set; }
+ /// 鐗╂枡浣跨敤 (榛樿 0)
+ /// </summary>
+ [SugarColumn(ColumnName = "type_1", IsNullable = true)]
+ public int? Type1 { get; set; }
/// <summary>
- /// 鎴愬搧浣跨敤
- /// 榛樿鍊�: ((0))
- ///</summary>
- [SugarColumn(ColumnName = "TYPE_2")]
- public long? Type2 { get; set; }
+ /// 鎴愬搧浣跨敤 (榛樿 0)
+ /// </summary>
+ [SugarColumn(ColumnName = "type_2", IsNullable = true)]
+ public int? Type2 { get; set; }
/// <summary>
- /// 浠撳簱绫诲瀷缂栫爜
- ///</summary>
- [SugarColumn(ColumnName = "DEPOTTYPECODE")]
- public long? Depottypecode { get; set; }
+ /// 浠撳簱绫诲瀷缂栫爜
+ /// </summary>
+ [SugarColumn(ColumnName = "depottypecode", IsNullable = true)]
+ public int? Depottypecode { get; set; }
/// <summary>
- /// 鍏徃浠g爜
- ///</summary>
- [SugarColumn(ColumnName = "COMPANY")]
+ /// 鍏徃浠g爜
+ /// </summary>
+ [SugarColumn(ColumnName = "company", Length = 20, IsNullable = true)]
public string? Company { get; set; }
/// <summary>
- /// 鐪嬫澘鍥炬爣鏍峰紡
- ///</summary>
- [SugarColumn(ColumnName = "ICON_TYPE")]
- public long? IconType { get; set; }
+ /// 鐪嬫澘鍥炬爣鏍峰紡
+ /// </summary>
+ [SugarColumn(ColumnName = "icon_type", IsNullable = true)]
+ public int? IconType { get; set; }
/// <summary>
- /// 鏄惁濮斿浠撳簱
- /// 榛樿鍊�: ((0))
- ///</summary>
- [SugarColumn(ColumnName = "IS_WY")]
- public long? IsWy { get; set; }
+ /// 鏄惁濮斿浠撳簱 (榛樿 0)
+ /// </summary>
+ [SugarColumn(ColumnName = "is_wy", IsNullable = true)]
+ public int? IsWy { get; set; }
/// <summary>
- /// 鏄惁涓嶈壇鍝佷粨
- /// 榛樿鍊�: ('0')
- ///</summary>
- [SugarColumn(ColumnName = "IS_NG")]
+ /// 绂佺敤鐘舵�� (榛樿 0) 娉ㄦ剰锛氬師琛ㄤ负 nvarchar(10) 涓旈粯璁� '0'
+ /// </summary>
+ [SugarColumn(ColumnName = "is_ng", Length = 10, IsNullable = true)]
public string? IsNg { get; set; }
/// <summary>
- /// 浠撳簱鍦板潃
- ///</summary>
- [SugarColumn(ColumnName = "CWHADDRESS")]
+ /// 浠撳簱鍦板潃
+ /// </summary>
+ [SugarColumn(ColumnName = "cwhaddress", Length = 200, IsNullable = true)]
public string? Cwhaddress { get; set; }
/// <summary>
- /// 鐪嬫澘鏄剧ず鍖哄煙缂栧彿
- /// 榛樿鍊�: ('1')
- ///</summary>
- [SugarColumn(ColumnName = "PI_TYPE")]
+ /// 鐪嬫澘鏄剧ず鍖哄煙缂栧彿 (榛樿 1)
+ /// </summary>
+ [SugarColumn(ColumnName = "pi_type", Length = 10, IsNullable = true)]
public string? PiType { get; set; }
/// <summary>
- /// 鍒嗙粍
- ///</summary>
- [SugarColumn(ColumnName = "ZUID")]
+ /// 鍒嗙粍
+ /// </summary>
+ [SugarColumn(ColumnName = "zuid", Length = 20, IsNullable = true)]
public string? Zuid { get; set; }
/// <summary>
- /// 鍏佽鍗虫椂搴撳瓨璐熷簱瀛�
- ///</summary>
- [SugarColumn(ColumnName = "IS_FKC")]
+ /// 鍏佽鍗虫椂搴撳瓨璐熷簱瀛�
+ /// </summary>
+ [SugarColumn(ColumnName = "is_fkc", Length = 30, IsNullable = true)]
public string? IsFkc { get; set; }
/// <summary>
- /// 鐢熶骇杞﹂棿
- ///</summary>
- [SugarColumn(ColumnName = "PRODUCTION_WORKSHOP")]
+ /// 鐢熶骇杞﹂棿
+ /// </summary>
+ [SugarColumn(ColumnName = "production_workshop", Length = 32,
+ IsNullable = true)]
public string? ProductionWorkshop { get; set; }
/// <summary>
- /// 0=鏅�氫粨,1=闇插ぉ浠�,2=瀵勫浠�,3=澶栧瘎浠�,4=鍦ㄥ埗鍝侊紝5=鎶ュ簾
- ///</summary>
- [SugarColumn(ColumnName = "MATERIAL_PROPERTI")]
+ /// 鐗╂枡灞炴��
+ /// </summary>
+ [SugarColumn(ColumnName = "material_properti", Length = 32,
+ IsNullable = true)]
public string? MaterialProperti { get; set; }
/// <summary>
- /// 鍒涘缓缁勭粐
- ///</summary>
- [SugarColumn(ColumnName = "CREATE_ORG")]
- public long? CreateOrg { get; set; }
-
- /// <summary>
- /// 浣跨敤缁勭粐
- ///</summary>
- [SugarColumn(ColumnName = "USE_ORG")]
- public long? UseOrg { get; set; }
-
- /// <summary>
- /// 鑷畾涔夊瓧娈�3
- ///</summary>
- [SugarColumn(ColumnName = "REMARK3")]
+ /// 鑷畾涔夊瓧娈�3
+ /// </summary>
+ [SugarColumn(ColumnName = "remark3", Length = 32, IsNullable = true)]
public string? Remark3 { get; set; }
/// <summary>
- /// 鑷畾涔夊瓧娈�4
- ///</summary>
- [SugarColumn(ColumnName = "REMARK4")]
+ /// 鑷畾涔夊瓧娈�4
+ /// </summary>
+ [SugarColumn(ColumnName = "remark4", Length = 32, IsNullable = true)]
public string? Remark4 { get; set; }
/// <summary>
- /// 鑷畾涔夊瓧娈�5
- ///</summary>
- [SugarColumn(ColumnName = "REMARK5")]
+ /// 鑷畾涔夊瓧娈�5
+ /// </summary>
+ [SugarColumn(ColumnName = "remark5", Length = 32, IsNullable = true)]
public string? Remark5 { get; set; }
/// <summary>
- /// 0 =涓嶇敓鏁堬紝 1=鐢熸晥
- ///</summary>
- [SugarColumn(ColumnName = "FORBID_STATUS")]
- public string? ForbidStatus { get; set; }
+ /// 鐐规鏃堕棿
+ /// </summary>
+ [SugarColumn(ColumnName = "check_date", IsNullable = true)]
+ public DateTime? CheckDate { get; set; }
/// <summary>
- /// 鍗曟嵁鐘舵��
- ///</summary>
- [SugarColumn(ColumnName = "DOCUMENT_STATUS")]
+ /// 鐐规浜�
+ /// </summary>
+ [SugarColumn(ColumnName = "check_by", Length = 50, IsNullable = true)]
+ public string? CheckBy { get; set; }
+
+ /// <summary>
+ /// 鐐规鐘舵�� (榛樿 0)
+ /// </summary>
+ [SugarColumn(ColumnName = "check_status", IsNullable = true)]
+ public bool? CheckStatus { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓缁勭粐
+ /// </summary>
+ [SugarColumn(ColumnName = "Fumbrella", Length = 32, IsNullable = true)]
+ public string? Fumbrella { get; set; }
+
+ /// <summary>
+ /// 浣跨敤缁勭粐
+ /// </summary>
+ [SugarColumn(ColumnName = "FSubsidiary", Length = 32, IsNullable = true)]
+ public string? FSubsidiary { get; set; }
+
+ /// <summary>
+ /// 渚涘簲鍟�
+ /// </summary>
+ [SugarColumn(ColumnName = "SUPPLIER_ID", Length = 50, IsNullable = true)]
+ public string? SupplierId { get; set; }
+
+ /// <summary>
+ /// 瀹㈡埛
+ /// </summary>
+ [SugarColumn(ColumnName = "Client_Id", Length = 50, IsNullable = true)]
+ public string? ClientId { get; set; }
+
+ /// <summary>
+ /// 閮ㄩ棬
+ /// </summary>
+ [SugarColumn(ColumnName = "department", Length = 50, IsNullable = true)]
+ public string? Department { get; set; }
+
+ /// <summary>
+ /// 鑱旂郴鐢佃瘽
+ /// </summary>
+ [SugarColumn(ColumnName = "Phone", Length = 50, IsNullable = true)]
+ public string? Phone { get; set; }
+
+ /// <summary>
+ /// Z=鏆傚瓨,A=鍒涘缓,B=瀹℃牳涓�,C=宸插鏍�,D=閲嶆柊瀹℃牳
+ /// </summary>
+ [SugarColumn(ColumnName = "DOCUMENT_STATUS", Length = 10,
+ IsNullable = true)]
public string? DocumentStatus { get; set; }
/// <summary>
- /// 鎵瑰彿绠$悊
- ///</summary>
- [SugarColumn(ColumnName = "IS_LOT")]
- public string? IsLot { get; set; }
+ /// 0=鍙敤,4=鍦ㄩ��,6=搴熷搧,2=鍐荤粨,5=鏀惰揣鍐荤粨,1=寰呮,8=涓嶅弬涓庢牳绠�,3=閫�鍥炲喕缁�,7=涓嶈壇
+ /// </summary>
+ [SugarColumn(ColumnName = "STOCK_STATUS_TYPE", Length = 50,
+ IsNullable = true)]
+ public string? StockStatusType { get; set; }
+
+ /// <summary>
+ /// 鏁版嵁鐘舵��
+ /// </summary>
+ [SugarColumn(ColumnName = "FDocumentStatus", Length = 100,
+ IsNullable = true)]
+ public string? FDocumentStatus { get; set; }
+
+ /// <summary>
+ /// 瀹㈡埛 (鏁存暟)
+ /// </summary>
+ [SugarColumn(ColumnName = "FCustomerId", IsNullable = true)]
+ public int? FCustomerId { get; set; }
+
+ /// <summary>
+ /// 搴撳瓨鐘舵�佺被鍨�
+ /// </summary>
+ [SugarColumn(ColumnName = "FStockStatusType", Length = 50,
+ IsNullable = true)]
+ public string? FStockStatusType { get; set; }
+
+ /// <summary>
+ /// 鍚敤浠撲綅绠$悊
+ /// </summary>
+ [SugarColumn(ColumnName = "FISOPENLOCATION", Length = 5, IsNullable = true)]
+ public string? FIsOpenLocation { get; set; }
+
[SugarColumn(IsIgnore = true)] public string? Type { get; set; }
}
\ No newline at end of file
diff --git a/MES.Service/service/BasicData/MesDepotsManager.cs b/MES.Service/service/BasicData/MesDepotsManager.cs
index 1c5745a..e18f558 100644
--- a/MES.Service/service/BasicData/MesDepotsManager.cs
+++ b/MES.Service/service/BasicData/MesDepotsManager.cs
@@ -95,7 +95,7 @@
DepotName = depots.FName,
DepotId = string.IsNullOrEmpty(depots.Id)
? DateTimeOffset.UtcNow.ToUnixTimeSeconds()
- : long.Parse(depots.Id),
+ : Convert.ToInt32(depots.Id),
IsFkc = depots.FAllowMinusQty,
CreateBy = depots.FPrincipal,
Depottype = depots.FStockProperty,
@@ -103,14 +103,14 @@
Zuid = depots.FGroup,
DocumentStatus = depots.FDocumentStatus,
- UseOrg = string.IsNullOrEmpty(depots.FUseOrgId)
- ? 1
- : long.Parse(depots.FUseOrgId),
- CreateOrg = string.IsNullOrEmpty(depots.FCreateOrgId)
- ? 1
- : long.Parse(depots.FCreateOrgId),
- CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
- LastupdateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
+ FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
+ ? "1"
+ : depots.FUseOrgId,
+ Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
+ ? "1"
+ : depots.FCreateOrgId,
+ CreateDate = DateTime.Now,
+ LastupdateDate = DateTime.Now,
Company = "1000",
Factory = "1000"
};
--
Gitblit v1.9.3