Browse Source

算工资 4.8

leiy 1 year ago
parent
commit
a42fffea98
1 changed files with 2 additions and 41 deletions
  1. 2 41
      OASystem/OASystem.Api/OAMethodLib/JsonConvertOverride.cs

+ 2 - 41
OASystem/OASystem.Api/OAMethodLib/JsonConvertOverride.cs

@@ -1,4 +1,4 @@
-using Newtonsoft.Json.Serialization;
+using Newtonsoft.Json;
 using System.Text.Json;
 using System.Text.Json.Serialization;
 
@@ -61,46 +61,7 @@ namespace OASystem.API.OAMethodLib
 
 
     #region decimal格式化
-
-    ///// <summary>
-    ///// decimal格式化
-    ///// </summary>
-    //public class JsonConverterDecimal : Newtonsoft.Json.JsonConverter
-    //{
-    //    /// <summary>
-    //    /// 是否可以转换
-    //    /// </summary>
-    //    /// <param name="objectType"></param>
-    //    /// <returns></returns>
-    //    public override bool CanConvert(Type objectType)
-    //    {
-    //        return objectType == typeof(decimal) || objectType == typeof(decimal?);
-    //    }
-
-    //    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
-    //    {
-    //        if (reader.ValueType == null && reader.Value == null)
-
-    //        {
-    //            return null;
-    //        }
-    //        else
-    //        {
-    //            decimal.TryParse(reader.Value != null ? reader.Value.ToString() : "", out decimal value);
-    //            return value.ToString("F2");
-    //        }
-
-    //    }
-
-    //    public override void WriteJson(JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
-    //    {
-    //        if (value == null)
-
-    //            writer.WriteValue(value);
-    //        else
-    //            writer.WriteValue(value + "");
-    //    }
-    //}
+   
 
     #endregion