二楼料箱下到一楼生成ctu任务和空载具入库单

This commit is contained in:
2024-05-23 00:33:23 +08:00
parent a53623823c
commit af6a562211
7 changed files with 247 additions and 203 deletions

View File

@@ -252,7 +252,7 @@ namespace Tnb.Common.Redis
string data = await GetHash(key, field);
Dictionary<String, String> json = JsonConvert.DeserializeObject<Dictionary<String, String>>(data);
Type type = typeof(T);
if (!type.IsValueType || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)))
if ((!type.IsValueType && type.GetGenericArguments().Length > 0) || (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)))
{
return (T)Convert.ChangeType(json["Value"],type.GetGenericArguments()[0]);
}