| | |
| | | public async Task<WebResponseContent> GroupPalletAsync(StockDTO stock) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var now = DateTime.Now; |
| | | var details = stock.Details.Select(item => new Dt_StockInfoDetail |
| | | { |
| | |
| | | return result ? content.OK("组盘成功") : content.Error("组盘失败"); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"组盘失败: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 换盘 |
| | |
| | | public async Task<WebResponseContent> ChangePalletAsync(StockDTO stock) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (stock == null || |
| | | string.IsNullOrWhiteSpace(stock.TargetPalletNo) || |
| | | string.IsNullOrWhiteSpace(stock.SourcePalletNo) || |
| | |
| | | return content.OK("换盘成功"); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"换盘失败: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 拆盘 |
| | |
| | | public async Task<WebResponseContent> SplitPalletAsync(StockDTO stock) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (stock == null || string.IsNullOrWhiteSpace(stock.SourcePalletNo)) |
| | | return content.Error("源托盘号不能为空"); |
| | | |
| | |
| | | return content.OK("拆盘成功"); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error($"拆盘失败: {ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 堆垛机换盘后更新库存信息(清空库位信息) |