using CoreCms.Net.Auth.HttpContextUser; using CoreCms.Net.Caching.AutoMate.RedisCache; using CoreCms.Net.Configuration; using CoreCms.Net.DTO.ComponentsDTO; using CoreCms.Net.IRepository.UnitOfWork; using CoreCms.Net.IServices; using CoreCms.Net.IServices.CYOAServices; using CoreCms.Net.Model.Entities.Expression; using CoreCms.Net.Model.FromBody; using CoreCms.Net.Model.ViewModels.UI; using CoreCms.Net.Repository.UnitOfWork; using CoreCms.Net.Services; using CoreCms.Net.Services.CYOAServices; using EC_SeckillInfo; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Nest; using Newtonsoft.Json; using SqlSugar; using SqlSugar.Extensions; using System; using System.Linq; using System.Threading.Tasks; namespace CoreCms.Net.Web.WebApi.Controllers.CyinOsAPI { /// /// 川印司机页面 /// [Route("api/[controller]/[action]")] [ApiController] [Authorize] public class CyDriverController : ControllerBase { private readonly ICyinOAService _cyinOAService; /// /// /// public CyDriverController(ICyinOAService cyinOAService) { _cyinOAService = cyinOAService; } /// /// 获取是否是司机的标志 /// /// [HttpGet] public async Task GetIsDrive() { return new WebApiCallBack { status = true, data = await _cyinOAService.IsDrive() }; } /// /// 获取送货任务 /// /// /// [HttpPost] public async Task GetDeliverOderList(FMPageByWhereOrder entity) { return await _cyinOAService.GetDeliverOderListOfDrver(entity); } /// /// 送货单历史 /// /// /// [HttpPost] public async Task ManageDeliverOderListOfDrver(FMPageByWhereOrder entity) { return await _cyinOAService.ManageDeliverOderListOfDrver(entity); } /// /// 获取送货任务详情 /// /// /// [HttpPost] public async Task GetDeliverOderInfo(FMStringId entity) { return new WebApiCallBack { status = true, data = await _cyinOAService.GetDeliverInfoOfDrver(entity) }; } /// /// 设置完 /// /// /// [HttpPost] public async Task SetDeliverOderInfo(DeliveryOrderDto entity) { return new WebApiCallBack { status = true, data = await _cyinOAService.SetDeliverOrdeOfDrver(entity) }; } /// /// 开始配送 /// /// /// [HttpPost] public async Task StartDeliverOrder(FMStringId entity) { return new WebApiCallBack { status = true, data = await _cyinOAService.StartDeliverOrderOfDrver(entity) }; } /// /// 完成订单 /// /// /// [HttpPost] public async Task FinishDeliverOrder(FMStringId entity) { return await _cyinOAService.FinishDeliverOrdeOfDrver(entity); } /// /// 保存坐标 /// /// /// [HttpPost] public async Task SetTarcks(TracksDto entity) { return new WebApiCallBack { status = true, data = await _cyinOAService.SetTarcks(entity) }; } ///// ///// ///// ///// ///// //[HttpPost] //[AllowAnonymous] //public bool CreatModeFile([FromServices] IUnitOfWork unitOfWork) //{ // var _CyDbClient = unitOfWork.GetDbClient().GetConnection(AppSettingsConstVars.CYDbDbID); // _CyDbClient.DbFirst.IsCreateAttribute().StringNullable().CreateClassFile("c:\\Demo", "EC_SeckillInfo"); // return true; //} } }