| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 批量生成xml |
| | | /// </summary> |
| | | /// <param name="date">日期,2025-12-16</param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [AllowAnonymous] |
| | | public IActionResult AddExportXmls(string date) |
| | | { |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(date)) |
| | | { |
| | | return Ok(new { code = 1, msg = "参数日期不可为空" }); |
| | | } |
| | | |
| | | //获取当前登录的用户ID |
| | | var claimsIdentity = 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 = "未获取到当前操作人信息" }); |
| | | } |
| | | List<ExportXmlDto> xmlList = _exNoticeSvc.AddExportXmls(date, int.Parse(userId)); |
| | | |
| | | return Ok(new { code = 0, count = 0, msg = "批量生成出库单Xml", data = xmlList }); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return Ok(new { code = 1, msg = "批量生成出库单Xml失败" + e.Message }); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 出库单明细管理 |