| | |
| | | //获取检验下单数据 |
| | | @Override |
| | | public IPage<SampleOrderDto> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto) { |
| | | //todo: 只看我判断全部,个人,组织的权限 |
| | | String laboratory = null; |
| | | // 判断是否是全部 |
| | | String isOrderAll = null; |
| | |
| | | isOrderAll = "1"; |
| | | sampleOrderDto.setState(null); |
| | | } |
| | | return insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), laboratory, isOrderAll); |
| | | SampleOrderDto otherParam = new SampleOrderDto(); |
| | | otherParam.setLaboratory(laboratory); |
| | | otherParam.setIsOrderAll(isOrderAll); |
| | | otherParam.setCheckUserId(SecurityUtils.getUserId()); |
| | | IPage<SampleOrderDto> sampleOrderDtoIPage = insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), otherParam); |
| | | return sampleOrderDtoIPage; |
| | | } |
| | | |
| | | |
| | |
| | | auxiliaryOutputWorkingHours.setCheck(userId);//检测人 |
| | | auxiliaryOutputWorkingHours.setPrice(insProduct.getPrice());//单价 |
| | | auxiliaryOutputWorkingHours.setSampleId(insProduct.getInsSampleId());//样品id |
| | | auxiliaryOutputWorkingHours.setInsProductId(insProduct.getId());//检验项id |
| | | auxiliaryOutputWorkingHours.setInsProductId(Math.toIntExact(insProduct.getId()));//检验项id |
| | | |
| | | return auxiliaryOutputWorkingHours; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | // 初次分配检验人,各个检验项默认订单的检验人 |
| | | List<Integer> insProductIds = insProductList.stream().map(insproduct -> { |
| | | return insproduct.getId(); |
| | | return Math.toIntExact(insproduct.getId()); |
| | | }).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(insProductIds)){ |
| | | insProductMapper.batchUpdateInsProductCheckUserId(insProductIds, userId); |
| | |
| | | ip2.addAll(insProducts); |
| | | } |
| | | for (InsProduct product : ip2) { |
| | | product.setStandardMethodListId(a.getInsulating().getStandardMethodListId()); |
| | | product.setStandardMethodListId(a.getInsulating().getStandardMethodListIds().toString()); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } |
| | |
| | | ip2.addAll(insProducts); |
| | | } |
| | | for (InsProduct product : ip2) { |
| | | product.setStandardMethodListId(a.getAuxiliaryWireCore().getStandardMethodListId()); |
| | | product.setStandardMethodListId(a.getAuxiliaryWireCore().getStandardMethodListId().toString()); |
| | | } |
| | | addInsProductMethod(a.getId(), ip2); |
| | | } |