TrackDeployController.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Microsoft.AspNetCore.Mvc;
  2. using System.Threading.Tasks;
  3. using XYY.Common.Standard;
  4. using XYY.Core.Standard.Mvc;
  5. using XYY.Service.Standard.First;
  6. using XYY.Service.Standard.First.Model;
  7. namespace XYY.Api.First.Controllers
  8. {
  9. [Route("api/[controller]/[action]")]
  10. [ApiController]
  11. public class TrackDeployController : ApiControllerBase
  12. {
  13. private ILadingTrackingService _trackingService;
  14. public TrackDeployController(ILadingTrackingService trackingService)
  15. {
  16. _trackingService = trackingService;
  17. }
  18. public async Task<IActionResult> AddFirstTrackMatchRule(Logistics_FirstTrackMatch dto)
  19. {
  20. await _trackingService.AddFirstTrackMatchRule(dto);
  21. return Ok();
  22. }
  23. public async Task<IActionResult> UpdateFirstTrackMatchRule(Logistics_FirstTrackMatch dto)
  24. {
  25. await _trackingService.UpdateFirstTrackMatchRule(dto);
  26. return Ok();
  27. }
  28. public async Task<IActionResult> DeleteRule(int Id)
  29. {
  30. await _trackingService.DeleteFirstTrackMatchRule(Id);
  31. return Ok();
  32. }
  33. public async Task<IActionResult> GetFirstTrackMatchRulesPage(QueryModel model)
  34. {
  35. var data = await _trackingService.GetFirstTrackMatchRules(model);
  36. return Ok(data);
  37. }
  38. /// <summary>
  39. /// 查询51轨迹节点完整时间
  40. /// </summary>
  41. /// <returns></returns>
  42. public async Task<IActionResult> GetNodeTime(NodeTimeData data)
  43. {
  44. var result = await _trackingService.GetNodeTime(data);
  45. return Ok(result);
  46. }
  47. }
  48. }