纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.0 KiB

3 years ago
  1. using NFine.Code;
  2. using NFine.Data.Extensions;
  3. using NFine.Domain.Entity.SystemManage;
  4. using NFine.Repository;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Data.Common;
  9. using System.Linq;
  10. using System.Text;
  11. namespace NFine.Application
  12. {
  13. public class UserWorkPointApp : RepositoryFactory<UserEntity>
  14. {
  15. public DataTable GetWorkPoint(string queryJson)
  16. {
  17. DataTable dt = new DataTable();
  18. var queryParam = queryJson.ToJObject();
  19. List<DbParameter> parameter = new List<DbParameter>();
  20. string sql = @"SELECT WorkPointCode,WorkPointName FROM dbo.Sys_WorkPoint where 1=1 ";
  21. if (!string.IsNullOrWhiteSpace(queryJson))
  22. {
  23. if (!string.IsNullOrWhiteSpace(queryParam["WorkPointCode"].ToString()))
  24. {
  25. sql += " and WorkPointCode = '%" + queryParam["WorkPointCode"].ToString() + "%' ";
  26. }
  27. }
  28. return Repository().FindTableBySql(sql.ToString());
  29. }
  30. }
  31. }