bklLiudl
2024-07-12 a541742fd68adfd5d4a77d1f7f0fc69045c72ac2
Wms/Wms/Controllers/BllAsnController.cs
@@ -9,12 +9,18 @@
using WMS.IBLL.IBllAsnServer;
using WMS.IBLL.ILogServer;
using Model.ModelVm.BllAsnVm;
using Utility;
using Model.ModelDto.BllAsnDto;
using System.Threading.Tasks;
using SqlSugar;
using System.Diagnostics;
namespace Wms.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    public class BllAsnController : ControllerBase
    {
        #region 依赖注入
@@ -1164,40 +1170,36 @@
        /// 获取采购单信息
        /// </summary>
        /// <param name="model">查询条件</param>
        /// <returns>入库单信息</returns>
        /// <returns>采购单信息</returns>
        [HttpPost]
        public IActionResult GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList>  GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        {
            try
            {
                var models = _procurePlanSvc.GetProcurePlanNoticeList(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 _procurePlanSvc.GetProcurePlanNoticeList(model, 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>