NBChangeMeterBLL.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using LeaRun.Util;
  2. using LeaRun.Util.WebControl;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using LeaRun.Application.Service.NBManage;
  9. using System.Data;
  10. using LeaRun.Application.Entity.NBManage;
  11. namespace LeaRun.Application.Busines.NBManage
  12. {
  13. public class NBChangeMeterBLL
  14. {
  15. NBChangeMeterService service = new NBChangeMeterService();
  16. public string GetRecordJson(string commandId ,Pagination pagination, string queryType, string queryValue, string userNo, string imei)
  17. {
  18. var json = "[]";
  19. var watch = CommonHelper.TimerStart();
  20. DataTable dt = service.GetChangeMeterData(pagination, queryType, queryValue, userNo, imei, commandId);
  21. var JsonData = new
  22. {
  23. rows = dt,
  24. total = pagination.total,
  25. page = pagination.page,
  26. records = pagination.records,
  27. costtime = CommonHelper.TimerEnd(watch)
  28. };
  29. return JsonData.ToJson();
  30. }
  31. public bool ChangeMeter(string meterId, ChangeMeterRecordEntity entity)
  32. {
  33. return service.ChangeMeter(meterId, entity);
  34. }
  35. }
  36. }