人证对照表、学分查询、培训记录 部门/岗位 新增可多选查询,查询优化

master
xiaochanghai 11 months ago
parent 33b5013828
commit d2e25cf1ac
  1. 40
      Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs

@ -63,45 +63,7 @@ public class Ghre_CertificateServices : BaseServices<Ghre_Certificate, Ghre_Cert
continue;
}
if (!string.IsNullOrWhiteSpace(value))
{
var jsonParam = JsonConvert.DeserializeObject<JsonParam>(value);
switch (jsonParam.operationKey)
{
case "Include":
conditions += $" AND {name} LIKE '%{jsonParam.columnValue}%'";
break;
case "NotInclude":
conditions += $" AND {name} NOT LIKE '%{jsonParam.columnValue}%'";
break;
case "IsNull":
conditions += $" AND {name} IS NULL";
break;
case "NotNull":
conditions += $" AND {name} IS NOT NULL";
break;
case "Equal":
conditions += $" AND {name} ='{jsonParam.columnValue}'";
break;
case "NotEqual":
conditions += $" AND {name} !='{jsonParam.columnValue}'";
break;
case "GreaterOrEqual"://大于等于
conditions += $" AND {name} >='{jsonParam.columnValue}'";
break;
case "Greater"://大于
conditions += $" AND {name} >'{jsonParam.columnValue}'";
break;
case "LessOrEqual"://小于等于
conditions += $" AND {name} <='{jsonParam.columnValue}'";
break;
case "Less"://小于
conditions += $" AND {name} <'{jsonParam.columnValue}'";
break;
default:
break;
}
}
conditions = DealConditions(conditions, name, value);
}
sql += conditions;

Loading…
Cancel
Save