From 501f6b3237d172afa11d2e2320ee6ab602c00f00 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 30 May 2023 12:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E4=BC=A0=E5=85=A5=E7=9A=84=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=20=E6=95=B0=E5=80=BC=E6=83=85=E5=86=B5=E4=B8=8B?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=B8=BA=EF=BC=9A0.0000=20=E9=9D=9E=E6=95=B0?= =?UTF-8?q?=E5=80=BC=E6=83=85=E5=86=B5=E4=B8=8B=E4=BF=9D=E7=95=99=E5=8E=9F?= =?UTF-8?q?=E6=A0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FactorySystemApi/Controllers/FormulaController.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/FactorySystemApi/Controllers/FormulaController.cs b/FactorySystemApi/Controllers/FormulaController.cs index f98849b..e7d1187 100644 --- a/FactorySystemApi/Controllers/FormulaController.cs +++ b/FactorySystemApi/Controllers/FormulaController.cs @@ -102,7 +102,20 @@ namespace FactorySystemApi.Controllers if (inParam.ContainsKey("SP_VERSION")&& !inParam.ContainsKey("FVersionCode")) { - inParam.Add("FVersionCode", inParam["SP_VERSION"].ToString()); + //inParam.Add("FVersionCode", inParam["SP_VERSION"].ToString()); + + // 20230530 格式化传入的版本号 + string sVersion = inParam["SP_VERSION"].ToString(); + double dVersion; + + bool isVersionNum = double.TryParse(sVersion, out dVersion); + + if (isVersionNum) + { + sVersion = string.Format("{0:F4}", dVersion); + } + + inParam.Add("FVersionCode", sVersion); } if (inParam.ContainsKey("SP_VALUE")&&!inParam.ContainsKey("FTestCode"))