| | |
| | | import com.gkhy.labRiskManage.domain.basic.repository.jpa.BasicExperimentStuffRepository; |
| | | import com.gkhy.labRiskManage.domain.basic.service.BasicExperimentStuffService; |
| | | import com.gkhy.labRiskManage.domain.riskReport.utils.GetRoleTagUtils; |
| | | import com.gkhy.labRiskManage.domain.riskReport.utils.SearchAuthUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | predicateList.add(criteriaBuilder.equal(root.get("stuffType"), queryParam.getStuffType())); |
| | | } |
| | | |
| | | if (roleTag == UserTagEnum.USER_TAG_0.getCode()){ |
| | | predicateList.add(criteriaBuilder.equal(root.get("createByUserId"), currentUserId)); |
| | | if (SearchAuthUtils.basicSearchAuth() == 1){ |
| | | if (roleTag == UserTagEnum.USER_TAG_0.getCode()){ |
| | | predicateList.add(criteriaBuilder.equal(root.get("createByUserId"), currentUserId)); |
| | | } |
| | | } |
| | | predicateList.add(criteriaBuilder.equal(root.get("deleteStatus"),StatusEnum.DELETE_NOT.getCode())); |
| | | return criteriaBuilder.and(predicateList.toArray(new Predicate[0])); |
| | |
| | | |
| | | |
| | | List<BasicExperimentStuff> listResult = new ArrayList<>(); |
| | | if (SearchAuthUtils.basicSearchAuth() == 0){ |
| | | listResult = stuffRepository.listStuff(currentUserId); |
| | | return BeanCopyUtils.copyBeanList(listResult, StuffListDTO.class); |
| | | } |
| | | |
| | | |
| | | if (roleTag != UserTagEnum.USER_TAG_0.getCode()){ |
| | | listResult = stuffRepository.listStuff(currentUserId); |
| | | }else { |