| | |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.common.utils.StringUtils; |
| | | import com.gkhy.exam.system.domain.ItemReview; |
| | | import com.gkhy.exam.system.domain.ItemReviewUser; |
| | | import com.gkhy.exam.system.domain.ProductItem; |
| | | import com.gkhy.exam.system.domain.*; |
| | | import com.gkhy.exam.system.domain.vo.ItemReviewUserVo; |
| | | import com.gkhy.exam.system.mapper.ItemReviewMapper; |
| | | import com.gkhy.exam.system.mapper.ItemReviewUserMapper; |
| | | import com.gkhy.exam.system.mapper.ProductItemMapper; |
| | | import com.gkhy.exam.system.service.ItemReviewService; |
| | | import com.gkhy.exam.system.service.ProcessInspectionService; |
| | | import com.gkhy.exam.system.service.ProjectDocumentService; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private ProductItemMapper productItemMapper; |
| | | |
| | | @Autowired |
| | | private ProjectDocumentService projectDocumentService; |
| | | |
| | | @Autowired |
| | | private ProcessInspectionService processInspectionService; |
| | | |
| | | |
| | | @Override |
| | | public CommonPage selectItemList(ItemReview itemReview) { |
| | |
| | | List<ItemReviewUser> itemReviewUsers = itemReviewUserMapper.selectByReviewId(review.getId()); |
| | | review.setReviewUsers(itemReviewUsers); |
| | | } |
| | | List<String> list = Arrays.asList(review.getProductItemIds().split(",")); |
| | | List<ProductItem> productItems = productItemMapper.selectBatchIds(list); |
| | | review.setProductItems(productItems); |
| | | if (!StringUtils.isEmpty(review.getProductItemIds())){ |
| | | List<String> list = Arrays.asList(review.getProductItemIds().split(",")); |
| | | List<ProjectDocument> projectDocuments = projectDocumentService.listByIds(list); |
| | | review.setProjectDocuments(projectDocuments); |
| | | } |
| | | if (StringUtils.isNotBlank(review.getProcessItemIds())){ |
| | | List<String> list2 = Arrays.asList(review.getProcessItemIds().split(",")); |
| | | List<ProcessInspection> processInspections = processInspectionService.listByIds(list2); |
| | | review.setProcessInspections(processInspections); |
| | | } |
| | | } |
| | | return CommonPage.restPage(itemReviews); |
| | | } |
| | |
| | | public CommonResult approvalList(Integer userId) { |
| | | List<ItemReviewUserVo> itemReviewUserVos = itemReviewUserMapper.selectByUserId(userId); |
| | | for (ItemReviewUserVo itemReviewUserVo : itemReviewUserVos) { |
| | | List<String> list = Arrays.asList(itemReviewUserVo.getProductItemIds().split(",")); |
| | | List<ProductItem> productItems = productItemMapper.selectBatchIds(list); |
| | | itemReviewUserVo.setProductItems(productItems); |
| | | if (!StringUtils.isEmpty(itemReviewUserVo.getProductItemIds())){ |
| | | List<String> list = Arrays.asList(itemReviewUserVo.getProductItemIds().split(",")); |
| | | List<ProjectDocument> projectDocuments = projectDocumentService.listByIds(list); |
| | | itemReviewUserVo.setProjectDocuments(projectDocuments); |
| | | } |
| | | if (StringUtils.isNotBlank(itemReviewUserVo.getProcessItemIds())){ |
| | | List<String> list2 = Arrays.asList(itemReviewUserVo.getProcessItemIds().split(",")); |
| | | List<ProcessInspection> processInspections = processInspectionService.listByIds(list2); |
| | | itemReviewUserVo.setProcessInspections(processInspections); |
| | | } |
| | | } |
| | | return CommonResult.success(itemReviewUserVos); |
| | | } |