| | |
| | | spotCheckQuarterItemMapper.updateById(spotCheckQuarterItem); |
| | | } |
| | | |
| | | |
| | | // 创建工时暂存 |
| | | // 缓存样品id, 编号map |
| | | // addWorkingHoursTemporary(userId, insSamples, ids, order); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | | * 创建工时暂存 |
| | | * @param userId |
| | | * @param insSamples |
| | | * @param ids |
| | | * @param order |
| | | */ |
| | | private void addWorkingHoursTemporary(Integer userId, List<InsSample> insSamples, List<Integer> ids, InsOrder order) { |
| | | Map<Integer, String> sampleMap = insSamples.stream().collect(Collectors.toMap(InsSample::getId, InsSample::getSampleCode)); |
| | | List<InsProduct> insProductList = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery() |
| | | .in(InsProduct::getInsSampleId, ids) |
| | |
| | | return auxiliaryOutputWorkingHours; |
| | | }).collect(Collectors.toList()); |
| | | auxiliaryOutputWorkingHoursTemporaryService.saveBatch(outputWorkingHours); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | public static String getWeek(String dayStr) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改样品型号 |
| | | * @param insSample |
| | | */ |
| | | @Override |
| | | public void updateSampleModel(InsSample insSample) { |
| | | // 判断当前订单是否生成了报告, 生成了报告不能修改单号 |
| | | Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery() |
| | | .eq(InsReport::getInsOrderId, insSample.getInsOrderId())); |
| | | if (count > 0 ) { |
| | | throw new ErrorException("当前订单已经生成了报告不能修改编号"); |
| | | } |
| | | |
| | | insSampleService.update(Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, insSample.getId()) |
| | | .set(InsSample::getModel, insSample.getModel())); |
| | | } |
| | | |
| | | } |
| | | |
| | | |