zhaowc
2024-09-18 bdd84cc48ba7b2527584c44d174da8e7d20c5375
Wms/Wms/Controllers/BllAsnController.cs
@@ -14,13 +14,14 @@
using System.Threading.Tasks;
using SqlSugar;
using System.Diagnostics;
using Model.ModelDto.SysDto;
using static System.Reflection.Metadata.BlobBuilder;
namespace Wms.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    public class BllAsnController : ControllerBase
    {
        #region 依赖注入
@@ -33,10 +34,11 @@
        private readonly IAuditLogServer _auditLog;                                 // 审核记录
        private readonly IBllLabelBoxNoServer _labelBox;                            // 箱码标签
        private readonly IProcurePlanServer _procurePlanSvc;                            // 箱码标签
        private readonly IPalletUpShelfServer _palletUpShelfSvc;                            // 上架记录
        #endregion
        #region 构造函数
        public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc, IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc, IOperationASNServer logSvc, IPalletUnbindServer palletUnbind, IAuditLogServer auditLog, IBllLabelBoxNoServer labelBox, IProcurePlanServer procurePlanSvc)
        public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc, IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc, IOperationASNServer logSvc, IPalletUnbindServer palletUnbind, IAuditLogServer auditLog, IBllLabelBoxNoServer labelBox, IProcurePlanServer procurePlanSvc, IPalletUpShelfServer palletUpShelfSvc)
        {
            _arrivalNoticeSvc = arrivalNoticeSvc;
            _PalletBindSvc = palletBindSvc;
@@ -47,6 +49,7 @@
            _auditLog = auditLog;
            _labelBox = labelBox;
            _procurePlanSvc = procurePlanSvc;
            _palletUpShelfSvc = palletUpShelfSvc;
        }
        #endregion
@@ -167,6 +170,10 @@
                if (string.IsNullOrWhiteSpace(UserId))
                {
                    throw new Exception("未获取到用户信息");
                }
                if (string.IsNullOrWhiteSpace(model.ASNNo))
                {
                    throw new Exception("单据号不可为null!");
                }
                model.CreateUser = int.Parse(UserId);
@@ -328,7 +335,7 @@
        }
        #endregion
        #region 托盘绑定
        #region 组托收货
        [HttpPost]
        public IActionResult GetPalletBindList(PalletBindVm model)
        {
@@ -506,7 +513,8 @@
        {
            try
            {
                var models = _PalletBindSvc.GetLocateList("W01", model.RoadwayNo, model.Row, model.Column, model.Layer, model.LocateNo, model.StockDetailId, model.Page, model.Limit, out int count);
                var models = _PalletBindSvc.GetLocateList("W01", model.RoadwayNo, model.Row, model.Column, model.Layer, model.LocateNo,
                    model.StockDetailId, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "获取指定储位信息", data = models });
            }
@@ -1253,6 +1261,23 @@
            }
        }
        #endregion
        #region 上架任务记录
        /// <summary>
        /// 获取上架任务记录信息分页集合
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList> GetPalletUpShelfList(PalletUpShelfVm model)
        {
            RefAsync<int> count = new RefAsync<int>();
            var data = await _palletUpShelfSvc.GetPalletUpShelfList(model.TraceNo, model.TaskNo,model.PalletNo,model.SkuNo,model.SkuName,model.LotNo,model.Status,model.Page,model.Limit, count);
            return new SqlSugarPagedList() { Items = data, Total = count };
        }
        #endregion
    }
}