| | |
| | | |
| | | #endregion |
| | | |
| | | #region 调拨入库业务 |
| | | |
| | | /// <summary> |
| | | /// 扫描条码进行调拨入库处理 |
| | | /// </summary> |
| | | /// <param name="query">查询参数</param> |
| | | /// <returns>处理结果和待处理明细</returns> |
| | | /// <remarks> |
| | | /// 请求示例: |
| | | /// POST /api/TransferOut/ScanReceiveBarcode |
| | | /// { |
| | | /// "billNo": "DB202401010001", // 调拨单号(必填) |
| | | /// "userName": "admin", // 用户名(必填) |
| | | /// "barcode": "BC001" // 条码号(必填) |
| | | /// } |
| | | /// 业务处理: |
| | | /// - 验证调拨单状态 |
| | | /// - 验证条码库存信息 |
| | | /// - 验证仓库一致性 |
| | | /// - 验证数量是否超出未扫数量 |
| | | /// - 执行调拨入库事务处理 |
| | | /// 返回数据包含: |
| | | /// - form: 处理结果表单 |
| | | /// - items: 待处理明细列表 |
| | | /// </remarks> |
| | | /// <response code="200">扫描成功</response> |
| | | /// <response code="400">扫描失败,返回具体错误信息</response> |
| | | [HttpPost("ScanReceiveBarcode")] |
| | | public ResponseResult ScanReceiveBarcode([FromBody] WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var (form, items) = _manager.ScanReceiveBarcode(query); |
| | | resultInfos.form = form; |
| | | resultInfos.items = items; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 调拨出库业务 |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分割条码进行调拨出库处理 |
| | | /// </summary> |
| | | /// <param name="query">查询参数</param> |
| | | /// <returns>处理结果和待处理明细</returns> |
| | | /// <remarks> |
| | | /// 请求示例: |
| | | /// POST /api/TransferOut/SplitBarcode |
| | | /// { |
| | | /// "billNo": "DB202401010001", // 调拨单号(必填) |
| | | /// "userName": "admin", // 用户名(必填) |
| | | /// "barcode": "BC001" // 条码号(必填) |
| | | /// "fum": "1" // 拆分数(必填) |
| | | /// } |
| | | /// 业务处理: |
| | | /// - 验证调拨单状态 |
| | | /// - 验证条码库存信息 |
| | | /// - 验证仓库一致性 |
| | | /// - 验证数量是否超出未扫数量 |
| | | /// - 执行分割条码的调拨出库事务处理 |
| | | /// </remarks> |
| | | /// <response code="200">分割成功</response> |
| | | /// <response code="400">分割失败,返回具体错误信息</response> |
| | | [HttpPost("SplitBarcode")] |
| | | public ResponseResult SplitBarcode([FromBody] WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var message = _manager.SplitBarcode(query); |
| | | resultInfos.tbBillList = message; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |