zhaowc
2024-06-25 e34f379c22862982c20376c952ab56f9c4ccb163
Wms/Wms/Controllers/UpApiController.cs
@@ -14,6 +14,8 @@
using Model.ModelVm.BllCheckVm;
using WMS.DAL;
using Microsoft.AspNetCore.Authorization;
using WMS.IBLL.IBllTransServer;
using static Model.InterFaceModel.RCSModel;
namespace Wms.Controllers
{
@@ -30,13 +32,18 @@
        private readonly IArrivalNoticeServer _arrivalNoticeSvc;
        private readonly IStockCheckServer _stockCheckSvc;//盘点单Svc 
        private readonly IProcurePlanServer _procurePlanSvc;//采购单Svs
        public UpApiController(IOptions<ApiUrlConfig> setting,IExportNoticeServer exNoticeSvc,IArrivalNoticeServer arrivalNoticeServer,IStockCheckServer stockCheckSvc, IProcurePlanServer procurePlanSvc)
        private readonly IRcsServer _rcsserver;//RCS相关任务
        private readonly INoticeServer _noticeSvc;//二楼单据相关
        public UpApiController(IOptions<ApiUrlConfig> setting,IExportNoticeServer exNoticeSvc,IArrivalNoticeServer arrivalNoticeServer,IStockCheckServer stockCheckSvc, IProcurePlanServer procurePlanSvc,IRcsServer rcsserver, INoticeServer noticeSvc)
        {
            _config = setting.Value;
            _exNoticeSvc = exNoticeSvc;
            _arrivalNoticeSvc = arrivalNoticeServer;
            _stockCheckSvc = stockCheckSvc;
            _procurePlanSvc = procurePlanSvc;
            _rcsserver = rcsserver;
            _noticeSvc = noticeSvc;
        }
        #endregion
@@ -396,6 +403,57 @@
                return Ok(result);
            }
        }
        //RCS叫桶
        [HttpPost]
        public IActionResult GetPalletNo(Pallnetmsg pallmsg)
        {
            var result = new ErpModel { Success = -1, Message = "",};
            try
            {
                if (string.IsNullOrWhiteSpace(pallmsg.Location))
                {
                    result.Message = "叫料位置为空!";
                    return Ok(result);
                }
                _rcsserver.GetPalletNo(pallmsg);
                result.Success = 0;
                result.Message = "叫桶成功!";
                return Ok(result);
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                return Ok(result);
            }
        }
        //RCS申请储位
        [HttpPost]
        public IActionResult ApplyLocatNo(Pallnetmsg pallmsg)
        {
            var result = new ErpModel { Success = -1, Message = "" };
            try
            {
                _rcsserver.ApplyLocatNo(pallmsg);
                result.Success = 0;
                result.Message = "申请储位成功!";
                return Ok(result);
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                return Ok(result);
            }
        }
                result.Message = e.Message;
                return Ok(result);
            }
        }
        //箱码信息 手持组托用 (赋码或追溯下发到wms)
        //质检结果下发接口