bklLiudl
2024-07-17 5d03e942416d07962409f7d3230097463fee63fa
Wms/Wms/Controllers/BllAsnController.cs
@@ -20,7 +20,7 @@
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    public class BllAsnController : ControllerBase
    {
        #region 依赖注入
@@ -36,7 +36,7 @@
        #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)
        {
            _arrivalNoticeSvc = arrivalNoticeSvc;
            _PalletBindSvc = palletBindSvc;
@@ -64,7 +64,7 @@
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _arrivalNoticeSvc.GetArrivalNoticeList(model, count);
            return new SqlSugarPagedList() { Items = bolls, Total = count };
        }
        }
        [HttpPost]
@@ -182,7 +182,7 @@
                }
                if (strMesage.Contains("-1"))
                {
                    return Ok(new { code = 0, msg = "部分成功 "+ strMesage });
                    return Ok(new { code = 0, msg = "部分成功 " + strMesage });
                }
                else
                {
@@ -270,7 +270,7 @@
        /// <param name="reason"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult CancelOrder(int id,string reason)
        public IActionResult CancelOrder(int id, string reason)
        {
            try
            {
@@ -284,12 +284,12 @@
                {
                    throw new Exception("未获取到用户信息");
                }
                _arrivalNoticeSvc.CancelOrder(id,reason,int.Parse(userId));
                _arrivalNoticeSvc.CancelOrder(id, reason, int.Parse(userId));
                return Ok(new { code = 0, msg = "入库单撤销申请成功" });
            }
            catch (Exception e)
            {
@@ -364,13 +364,13 @@
        }
        [HttpGet]
        public IActionResult GetBoxInfoByBoxNo(string boxNo, string boxNo3,int bindNo=0)
        public IActionResult GetBoxInfoByBoxNo(string boxNo, string boxNo3, int bindNo = 0)
        {
            try
            {
                var models = _PalletBindSvc.GetBoxInfoByBoxNo(boxNo, boxNo3,bindNo);
                var models = _PalletBindSvc.GetBoxInfoByBoxNo(boxNo, boxNo3, bindNo);
                return Ok(new { code = 0, count= models.Count, msg = "箱支明细信息", data = models });
                return Ok(new { code = 0, count = models.Count, msg = "箱支明细信息", data = models });
            }
            catch (Exception e)
            {
@@ -428,7 +428,7 @@
                {
                    throw new Exception("未获取到用户信息");
                }
                _PalletBindSvc.DelBindBoxInfo(boxNo,int.Parse(userId));
                _PalletBindSvc.DelBindBoxInfo(boxNo, int.Parse(userId));
                return Ok(new { code = 0, count = 0, msg = "删除成功", data = "" });
            }
@@ -460,7 +460,7 @@
                {
                    throw new Exception("未获取到用户信息");
                }
                _PalletBindSvc.CancelPalletBind(id, reason,int.Parse(userId));
                _PalletBindSvc.CancelPalletBind(id, reason, int.Parse(userId));
                return Ok(new { code = 0, count = 0, msg = "托盘绑定撤销申请成功", data = "" });
            }
@@ -484,7 +484,7 @@
            {
                var list = _BoxInfoSvc.GetBoxInfoList(boxNo, isContinue, boxNo2);
                var num = 0;
                if (list!=null)
                if (list != null)
                {
                    num = list.Count;
                }
@@ -510,7 +510,7 @@
        {
            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 });
            }
@@ -540,7 +540,7 @@
                {
                    throw new Exception("未获取到用户信息");
                }
                _PalletBindSvc.SaveAppointSlot(model.BindId,model.LocateId,int.Parse(userId));
                _PalletBindSvc.SaveAppointSlot(model.BindId, model.LocateId, int.Parse(userId));
                return Ok(new { code = 0, count = 0, msg = "指定储位成功", data = "" });
            }
@@ -692,7 +692,7 @@
                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 });
                return Ok(new { code = 0, count = count.Value, msg = "入库任务信息", data = bolls });
            }
            catch (Exception e)
            {
@@ -861,9 +861,9 @@
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                _auditLog.EditAudit(model.Id,model.Status,model.Opinion, int.Parse(userId));
                _auditLog.EditAudit(model.Id, model.Status, model.Opinion, int.Parse(userId));
                return Ok(new { code = 0, count=0, msg = "审核记录列表", data = "" });
                return Ok(new { code = 0, count = 0, msg = "审核记录列表", data = "" });
            }
            catch (Exception e)
            {
@@ -920,7 +920,7 @@
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                var list = _BoxInfoSvc.AddLabelBox(model.Id, model.IsReset, decimal.Parse(model.ArriveQty), model.ProductionTime, model.ExpirationTime, model.StoreTime, model.SupplierLot, int.Parse(userId));
                return Ok(new { code = 0,  msg = "生成箱码标签成功", data = list });
                return Ok(new { code = 0, msg = "生成箱码标签成功", data = list });
            }
            catch (Exception e)
            {
@@ -945,7 +945,7 @@
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                var list = _BoxInfoSvc.GetBuDaLabelList(model.BoxNo, model.EndBoxNo, model.BoxNo2, model.EndBoxNo2,model.Type,int.Parse(userId));
                var list = _BoxInfoSvc.GetBuDaLabelList(model.BoxNo, model.EndBoxNo, model.BoxNo2, model.EndBoxNo2, model.Type, int.Parse(userId));
                return Ok(new { code = 0, msg = "获取补打箱码标签信息", data = list });
            }
            catch (Exception e)
@@ -986,7 +986,7 @@
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                _BoxInfoSvc.DelLabelByAsnNo(model.AsnNo,model.LotNo,int.Parse(userId));
                _BoxInfoSvc.DelLabelByAsnNo(model.AsnNo, model.LotNo, int.Parse(userId));
                return Ok(new { code = 0, msg = "删除成功", data = "" });
            }
            catch (Exception e)
@@ -1128,7 +1128,7 @@
        {
            try
            {
                var type = new List<string>() { "0","1","2" };
                var type = new List<string>() { "0", "1", "2" };
                var bolls = _taskSvc.GetArchivingTaskList(type, model.Type, model.Status, model.TaskNo, model.IsSuccess, model.PalletNo, model.Msg, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "任务信息", data = bolls });
@@ -1149,7 +1149,7 @@
        {
            try
            {
                var bolls = _logSvc.GetArchivingLogOperationList(model.ComeFrom,model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, out int count);
                var bolls = _logSvc.GetArchivingLogOperationList(model.ComeFrom, model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, out int count);
                return Ok(new { code = 0, count, msg = "入库操作日志信息", data = bolls });
            }
@@ -1168,7 +1168,7 @@
        /// <returns>采购单信息</returns>
        [HttpPost]
        [ServiceFilter(typeof(ApiResponseActionFilter))]
        public async Task<SqlSugarPagedList>  GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        public async Task<SqlSugarPagedList> GetProcurePlanNoticeList(ProcurePlanNoticeVm model)
        {
            RefAsync<int> count = new RefAsync<int>();
            var bolls = await _procurePlanSvc.GetProcurePlanNoticeList(model, count);
@@ -1215,7 +1215,7 @@
                {
                    throw new Exception("未获取到用户信息");
                }
                _procurePlanSvc.CreateAsnByProcurePlan(Convert.ToInt32(model.Id), int.Parse(UserId));
                return Ok(new { code = 0, msg = "添加成功" });