diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSoft.DataProject.csproj b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSoft.DataProject.csproj index ce06b11..8065527 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSoft.DataProject.csproj +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSoft.DataProject.csproj @@ -68,6 +68,7 @@ + diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index b701f8b..1f6fe43 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -3997,7 +3997,7 @@ namespace ICSSoft.DataProject string sql = @"select cnValue AS Name,Code from Sys_Language where 1=1"; if (!string.IsNullOrWhiteSpace(JsonData.Code)) { - sql += " and Code='{0}'"; + sql += " and Code LIKE '%{0}%'"; } sql = string.Format(sql, JsonData.Code); DataTable data = DBHelper.SQlReturnData(sql, cmd); diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/LanguageHelper.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/LanguageHelper.cs new file mode 100644 index 0000000..feb3c26 --- /dev/null +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/LanguageHelper.cs @@ -0,0 +1,32 @@ +using ICSSoft.Entity; +using System; +using System.Collections.Generic; +using System.Data; + +namespace ICSSoft.DataProject +{ + public static class LanguageHelper + { + public static Dictionary GetName(string Code) + { + WMSBarCoreModel model = new WMSBarCoreModel(); + model.Code = Code; + var resultStr = ICSSubmitService.PromptInformationGet(model); + Dictionary dic = new Dictionary(); + foreach (DataRow dr in resultStr.Rows) + { + dic.Add(dr["Code"].ToString(), dr["Name"].ToString()); + } + return dic; + } + public static string GetNameSingle(string Code) + { + WMSBarCoreModel model = new WMSBarCoreModel(); + model.Code = Code; + var resultStr = ICSSubmitService.PromptInformationGet(model); + if (resultStr == null || resultStr.Rows.Count <= 0) + throw new Exception(string.Format("未查询到编码:{0} 对应的信息!",Code)); + return resultStr.Rows[0]["Name"].ToString(); + } + } +}