终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

36 rindas
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. }