| | |
| | | import com.gkhy.labRiskManage.domain.riskReport.entity.RiskAssessPlan; |
| | | import com.gkhy.labRiskManage.domain.riskReport.model.bo.ExecStatusSubmitBO; |
| | | import com.gkhy.labRiskManage.domain.riskReport.model.dto.AssessPlanQueryDTO; |
| | | import org.springframework.data.jpa.domain.Specification; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; |
| | | import org.springframework.data.jpa.repository.Query; |
| | |
| | | |
| | | @Query(value = "select t from RiskAssessPlan t where t.deleteStatus = 0 and t.riskUnitId = :basicId and riskType = 1") |
| | | List<RiskAssessPlan> getAssessPlanByInherentUnit(Long basicId); |
| | | |
| | | |
| | | @Query("SELECT COUNT(DISTINCT p.id) FROM RiskAssessPlan p " + |
| | | "WHERE p.deleteStatus = 0 " + |
| | | "AND (:assessPlanName IS NULL OR p.assessPlanName LIKE %:assessPlanName%) " + |
| | | "AND (:experimentId IS NULL OR p.experimentId = :experimentId) " + |
| | | "AND (:planUserId IS NULL OR p.planUserId = :planUserId) " + |
| | | "and(coalesce(:riskUnitIds,null) is null or p.riskUnitId in :riskUnitIds)") |
| | | Long countDynamic( |
| | | String assessPlanName, |
| | | Long experimentId, |
| | | Long planUserId, |
| | | List<Long> riskUnitIds); |
| | | |
| | | |
| | | } |
| | | |