| | |
| | | return rows > 0 ? R.ok("检验单提交成功") : R.fail("检验单提交失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R batchQuickInspect(List<Long> ids) { |
| | | if (ids == null || ids.isEmpty()) { |
| | | return R.fail("请选择至少一条检验单"); |
| | | } |
| | | int success = 0; |
| | | int fail = 0; |
| | | for (Long id : ids) { |
| | | R result = autoSubmit(id); |
| | | if (R.isSuccess(result)) { |
| | | success++; |
| | | } else { |
| | | fail++; |
| | | } |
| | | } |
| | | return R.ok(String.format("快速检验完成:成功 %d 条,失败 %d 条", success, fail)); |
| | | } |
| | | |
| | | private String resolveProductionBatchNo(Long productionProductMainId, |
| | | Long qualityInspectId, |
| | | Long productModelId) { |