| | |
| | | }; |
| | | return ApiResponseHelper.ReturnApiResponse(responseMessage, "importInOrder", ""); |
| | | } |
| | | if (importMaterials.Select(x => x.Code).Distinct().Count() != 1) |
| | | if (importMaterials.GroupBy(x => x.Code).Any(g => g.Count() > 1)) |
| | | { |
| | | responseMessage = new ApiResponse<string>() |
| | | { |
| | |
| | | }; |
| | | return ApiResponseHelper.ReturnApiResponse(responseMessage, "importOutOrder", ""); |
| | | } |
| | | if (inputmaterials.Select(x => x.Code).Distinct().Count() != 1) |
| | | if (inputmaterials.GroupBy(x => x.Code).Any(g => g.Count() > 1)) |
| | | { |
| | | responseMessage = new ApiResponse<string>() |
| | | { |
| | |
| | | if (ids.Count > 0) |
| | | { |
| | | int count = MainTaskService.GetInstance().SaveOutMainTask(ids, out msg); |
| | | var retMsg = msg; |
| | | if (count > 0) |
| | | { |
| | | msg = "出库任务生成成功"; |
| | | //成功不需要写文字 |
| | | //msg = "出库任务生成成功:" + retMsg; |
| | | } |
| | | else if (count == 0) |
| | | { |
| | | msg = "出库任务已在任务队列中"; |
| | | msg = "出库任务已在任务队列中:" + retMsg; |
| | | } |
| | | else |
| | | { |
| | | msg = "出库任务生成失败!"; |
| | | msg = "出库任务生成失败!:" + retMsg; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | msg = "请选择要出库的物料"; |
| | | msg = "要出库的物料没有可用库存"; |
| | | } |
| | | //Alert.Show(msg); |
| | | //WriteLog("库位物料出库" + msg, "库存管理"); |