终端一体化运控平台
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.
 
 
 

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