diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs index 3909eab..89ad108 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSDefiniteLanguageService.cs @@ -42,9 +42,11 @@ namespace ICSSoft.DataProject DataTable table = DBHelper.SQlReturnData(sql, cmd); string json = JsonConvert.SerializeObject(table); - LanguageModel model = JsonConvert.DeserializeObject(json); + List modelList = JsonConvert.DeserializeObject>(json); +// LanguageModel model = JsonConvert.DeserializeObject(json); cmd.Transaction.Commit(); - return model.DefineCode; + return modelList[0].DefineCode; +// return model.DefineCode; } catch(Exception ex) { diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 5e6eda7..2ef2f57 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -5076,7 +5076,8 @@ namespace ICSSoft.DataProject cmd.Connection = conn; try { - string sql = @"select cnValue AS Name,Code from Sys_Language where 1=1"; + string DefiniteLanguage = ICSDefiniteLanguageService.GetLanguage(); + string sql = @"select " + DefiniteLanguage + " AS Name,Code from Sys_Language where 1=1"; if (!string.IsNullOrWhiteSpace(JsonData.Code)) { sql += " and Code LIKE '%{0}%'"; diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs index 56f6eac..ca26028 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/VersionsController.cs @@ -132,8 +132,8 @@ namespace ICSSoft.WebAPI.Controllers //log.Info("站点传入值" + JsonData.ToString()); try { - LanguageModel mode = new LanguageModel(); - mode = JsonConvert.DeserializeObject(JsonData.ToString()); + //LanguageModel mode = new LanguageModel(); + //mode = JsonConvert.DeserializeObject(JsonData.ToString()); string resultStr = ICSDefiniteLanguageService.GetLanguage(); res.Success = true; res.Message = LanguageHelper.GetNameSingle("WMSAPI001");// "接口调用成功!";