heheng
2024-11-07 3ca43826a747fda1447b2501901f84fc1a9019dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.gkhy.labRiskManage.domain.riskReport.repository.jpa;
 
import com.gkhy.labRiskManage.domain.riskReport.entity.RiskAssessPlanIdentificationJha;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
 
import java.time.LocalDateTime;
import java.util.List;
 
/**
 * 辨识方法-Jha
 */
@Repository
public interface RiskAssessPlanIdentificationJhaRepository extends JpaRepository<RiskAssessPlanIdentificationJha, Long>, JpaSpecificationExecutor<RiskAssessPlanIdentificationJha> {
 
    /**
     * 辨识方法-Jha - 查询 by id
     */
    @Query(value = "select t from RiskAssessPlanIdentificationJha t where t.id = :id and t.deleteStatus = 0")
    RiskAssessPlanIdentificationJha getJhaById(Long id);
    /**
     * 辨识方法-Jha -- 删除
     */
    @Query(value = "update RiskAssessPlanIdentificationJha set delete_status = 1,update_time = :date where id = :id and delete_status = 0", nativeQuery = true)
    RiskAssessPlanIdentificationJha deleteJhaByPlanId(Long id, LocalDateTime date);
    /**
     * 辨识方法-Jha -- list
     */
    @Query(value = "select t from RiskAssessPlanIdentificationJha t where t.assessPlanId = :id and t.deleteStatus = 0")
    List<RiskAssessPlanIdentificationJha> listJhaByPlanId(Long id);
}