hwh
2024-07-15 f0645a00da146f469f0c3cf448f3e651b123b4f4
Wms/Wms/Controllers/DownApiController.cs
@@ -174,31 +174,25 @@
        /// <returns></returns>
        [Authorize]
        [HttpGet]
        [UnitOfWork]
        public async Task<IActionResult> CheckOutHouse(string crNo, string outMode)
        {
            try
            //获取当前登录的用户ID
            var claimsIdentity = this.User.Identity as ClaimsIdentity;
            if (claimsIdentity == null)
            {
                //获取当前登录的用户ID
                var claimsIdentity = this.User.Identity as ClaimsIdentity;
                if (claimsIdentity == null)
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
                if (string.IsNullOrWhiteSpace(userId))
                {
                    return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
                }
                string str = "";
                var list = await _crCheckSvc.CheckOutHouse(crNo, outMode, _config.WcsHost + _config.IssueComApiUrl, str);
                return Ok(new { code = 0, msg = str, data = list });
                return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
            }
            catch (Exception e)
            var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
            if (string.IsNullOrWhiteSpace(userId))
            {
                return Ok(new { code = 1, msg = e.Message });
                return Ok(new { code = 1, msg = "未获取到当前操作人信息" });
            }
            string str = "";
            var list = await _crCheckSvc.CheckOutHouse(crNo, outMode, _config.WcsHost + _config.IssueComApiUrl, str);
            return Ok(new { code = 0, msg = str, data = list });
        }
        /// <summary>