From 0fb0f17319ecf71d66b96a6acfd07f754be9443e Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 24 十月 2024 13:44:38 +0800
Subject: [PATCH] WCS添加穿梭车信息表,修改任务信息表
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
index ae82614..d9c8538 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing NetTaste;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
@@ -78,6 +79,10 @@
{
int reval = 0;
if (thisValue == null) return 0;
+ if (thisValue is Enum && thisValue != DBNull.Value && Enum.TryParse(thisValue.GetType(), thisValue.ToString(), out var val))
+ {
+ return Convert.ToInt32(val.ChangeType(typeof(int)));
+ }
if (thisValue != DBNull.Value && int.TryParse(thisValue.ToString(), out reval))
{
return reval;
@@ -126,7 +131,7 @@
return reval;
}
-
+
/// <summary>
///
/// </summary>
@@ -361,6 +366,14 @@
return JsonConvert.SerializeObject(value);
}
+ public static bool IsNumeric(this object value)
+ {
+ if (value == null)
+ return false;
+ bool reslut = decimal.TryParse(value.ToString(), out decimal _number);
+ return reslut;
+ }
+
public static bool IsInt(this object obj)
{
if (obj == null)
@@ -440,7 +453,7 @@
return Math.Round(ObjToDecimal(data), digits);
}
-
+
/// <summary>
/// 鏋氫妇杞琇ist qy 2024-7-15
--
Gitblit v1.9.3