终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

36 行
1.1 KiB

  1. using BPA.Helper;
  2. using BPA.Message;
  3. using BPASmartClient.DosingSystem.Model.Dto;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPASmartClient.DosingSystem.Service
  10. {
  11. public class APIServer : IAPIServer
  12. {
  13. /// <summary>
  14. /// 设置业务插件状态
  15. /// </summary>
  16. /// <param name="state"></param>
  17. /// <returns></returns>
  18. public APIResult<bool> PlugInstatusSet(bool state)
  19. {
  20. var data = new { state = state };
  21. var res = APIHelper.GetInstance.PostRequest($"{ApiRoute.SetStatus}{state}", data.ToJson());
  22. return new FromT<bool>(res).Result;
  23. }
  24. public APIResult<List<WorkOrderPusht>> GetWorkOrder(string workOrderId)
  25. {
  26. var data = new { workOrderId = workOrderId, startTime = "", endTime = "" };
  27. var res = APIHelper.GetInstance.PostRequest(ApiRoute.WorkOrderData, data.ToJson());
  28. return new FromT<List<WorkOrderPusht>>(res).Result;
  29. }
  30. }
  31. }