IPC-610
2024-12-03 2f0120d0c10ac24603936911ee5812d4e71d2740
Wms/Wms/Controllers/DownApiController.cs
@@ -16,6 +16,7 @@
using System.Collections.Generic;
using Model.ModelVm.PdaVm;
using WMS.IBLL.IPdaServer;
using Model.ModelVm;
namespace Wms.Controllers
{
@@ -32,6 +33,7 @@
        private readonly IStockCheckServer _crCheckSvc;//托盘绑定Svc 
        private readonly ITaskServer _taskSvc;//任务Svc 
        private readonly IPdaSoServer _pdaSoSvc;//空托出库Svc
        private readonly IPdaAsnServer _paAsnSvc;//空托跺绑定
        public DownApiController(IOptions<ApiUrlConfig> setting, IExportNoticeServer exNoticeSvc, IPalletBindServer asnPalletBindSvc, IStockCheckServer crCheckSvc, ITaskServer taskSvc, IPdaSoServer pdaSoSvc)
        {
@@ -225,8 +227,8 @@
                    var list = _asnPalletBindSvc.RequestRoadWayModel(model.PalletNo, model.HouseNo);
                    LogFile.SaveLogToFile($"WCS申请巷道返回:( {JsonConvert.SerializeObject(list)} ),", logStr);
                    new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", model.PalletNo.Substring(0, 8),
                        "申请巷道", $"申请巷道托盘号:{model.PalletNo.Substring(0, 8)}的成功信息", 2);
                    new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", model.PalletNo,
                        "申请巷道", $"申请巷道托盘号:{model.PalletNo}的成功信息", 2);
                    return Ok(new { Success = 0, Message = "申请巷道成功", TaskList = list });
                }
@@ -246,8 +248,8 @@
            catch (Exception e)
            {
                LogFile.SaveLogToFile($"WCS申请巷道返回:( {e.Message} ),", logStr);
                new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", model.PalletNo.Substring(0, 8),
                    "申请巷道", $"申请巷道托盘号:{model.PalletNo.Substring(0, 8)}的失败信息", 2);
                new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", model.PalletNo,
                    "申请巷道", $"申请巷道托盘号:{model.PalletNo}的失败信息", 2);
                return Ok(new ErpModel { Success = -1, Message = e.Message });
            }
@@ -538,6 +540,30 @@
        }
        /// <summary>
        /// WCS申请空托跺绑定
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [AllowAnonymous]
        [HttpPost]
        public IActionResult BindPlnInHouseWcs(PalletsBind model)
        {
            var logStr = $@".\log\WCS\WCS申请空托跺绑定" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            try
            {
                var strMsg = _paAsnSvc.BindNullPallets(model);
                return Ok(new { Success = 0, Message = "空托跺绑定成功", TaskList = strMsg });
            }
            catch (Exception e)
            {
                LogFile.SaveLogToFile($"WCS申请空托跺绑定异常返回:( {e.Message} ),", logStr);
                return Ok(new ErpModel { Success = -1, Message = e.Message });
            }
        }
        /// <summary>
        /// WCS申请空托出库
        /// </summary>
        /// <param name="model"></param>