chengsc
2025-03-28 e00c9e03eeaffad919cf16c95b2d6048e8abfb9d
Wms/Wms/Controllers/DownApiController.cs
@@ -19,6 +19,7 @@
using Utility;
using System.Threading.Tasks;
using Model.ModelVm.BllCheckVm;
using System.Collections.Generic;
namespace Wms.Controllers
{
@@ -101,7 +102,7 @@
        /// <returns></returns>
        [Authorize]
        [HttpGet]
        public IActionResult IssueOutHouse(string soNo, string unstackingMode, string outMode, string loadingAddre)
        public IActionResult IssueOutHouse(string soNo, string outMode)
        {
            try
            {
@@ -121,11 +122,23 @@
                //{
                //    return Ok(new { code = 1, msg = "请选择出库口" });
                //}
                var house = _exNoticeSvc.GetHouseBySo(soNo);
                if (house == "W01")
                {
                var list = _exNoticeSvc.IssueOutHouse(soNo, unstackingMode, outMode, loadingAddre, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
                    return Ok(new { code = 0, msg = "str" });
                }
                else if (house == "W02")
                {
                    var list = _exNoticeSvc.IssueOutHouseLk(soNo, outMode, int.Parse(userId), _config.WcsHost + _config.IssueComApiUrl, out string str);
                return Ok(new { code = 0, msg = str, data = list });
                    return Ok(new { code = 0, msg = str, data = list });
                }
                else
                {
                    return Ok(new { code = 1, msg = "仓库信息错误,请核实单据信息"});
                }
            }
            catch (Exception e)
            {
@@ -304,12 +317,12 @@
            var claimsIdentity = this.User.Identity as ClaimsIdentity;
            if (claimsIdentity == null)
            {
                return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                return Ok(new HttpReturnModel { Success = "1", Message = "未获取到当前操作人信息" });
            }
            var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
            if (string.IsNullOrWhiteSpace(userId))
            {
                return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                return Ok(new HttpReturnModel { Success = "1", Message = "未获取到当前操作人信息" });
            }
@@ -326,7 +339,7 @@
            {
                new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", model.PalletNo, "申请储位", $"申请储位托盘号:{model.PalletNo}的失败信息", int.Parse(userId));
                return Ok(new ErpModel { Success = -1, Message = e.Message });
                return Ok(new HttpReturnModel { Success = "-1", Message = e.Message });
            }
        }