hwh
2024-07-15 9c247fc802c8a9b48dae041bf5de53defaa68a39
Wms/Wms/Controllers/BllAsnController.cs
@@ -13,6 +13,7 @@
using Model.ModelDto.BllAsnDto;
using System.Threading.Tasks;
using SqlSugar;
using System.Diagnostics;
namespace Wms.Controllers
{
@@ -56,33 +57,23 @@
        /// <param name="model">查询条件</param>
        /// <returns>入库单信息</returns>
        [HttpPost]
        public IActionResult GetArrivalNoticeList(ArrivalNoticeVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetArrivalNoticeList(ArrivalNoticeVm model)
        {
            try
            {
                var models = _arrivalNoticeSvc.GetArrivalNoticeList(model, out int count);
                return Ok(new { code = 0, count, msg = "入库单信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _arrivalNoticeSvc.GetArrivalNoticeList(model, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        } 
        [HttpPost]
        public IActionResult GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model)
        {
            try
            {
                var models = _arrivalNoticeSvc.GetArrivalNoticeDetailList(model, out int count);
                return Ok(new { code = 0, count, msg = "入库单明细信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetArrivalNoticeDetailList(ArrivalNoticeDetailVm model)
        {
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _arrivalNoticeSvc.GetArrivalNoticeDetailList(model, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
@@ -689,12 +680,13 @@
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetArrivalTaskList(GetTaskVm model)
        public async Task<IActionResult> GetArrivalTaskList(GetTaskVm model)
        {
            try
            {
                var type = new List<string>() { "0" };
                var bolls = _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, out int count);
                RefAsync<int> count = new RefAsync<int>();
                var bolls = await _taskSvc.GetTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, count);
                return Ok(new { code = 0, count, msg = "入库任务信息", data = bolls });
            }
@@ -1172,31 +1164,33 @@
        /// <returns>采购单信息</returns>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList<ProcurePlanNoticeDto>>  GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        public async Task<SqlSugarPagedList>  GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        {
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _procurePlanSvc.GetProcurePlanNoticeList(model, count);
            return new SqlSugarPagedList<ProcurePlanNoticeDto>() { Items = bolls, Total = count };
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
        /// 获取采购单明细信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public IActionResult GetProcurePlanNoticeDetailList(ProcurePlanNoticeDetailVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetProcurePlanNoticeDetailList(ProcurePlanNoticeDetailVm model)
        {
            try
            {
                var models = _procurePlanSvc.GetProcurePlanNoticeDetailList(model, out int count);
            Stopwatch stopwatch = new Stopwatch();
            stopwatch.Start();
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _procurePlanSvc.GetProcurePlanNoticeDetailList(model, count);
            stopwatch.Stop();
                return Ok(new { code = 0, count, msg = "入库单明细信息", data = models });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
            var time = stopwatch.ElapsedMilliseconds;
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        /// <summary>
        /// 通过采购单生成入库单据
        /// </summary>