|
@ -13,14 +13,16 @@ JpaSpecificationExecutor<DoctorTeam> {
|
|
|
|
|
|
DoctorTeam findByCode(String code);
|
|
|
|
|
|
@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2'")
|
|
|
//@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2'")
|
|
|
@Query("select dtt from DoctorTeam dtt where dtt.id = (select max(dt.id) from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2')")
|
|
|
DoctorTeam findByParientCode(String parientCode);
|
|
|
|
|
|
@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='1'")
|
|
|
DoctorTeam findBySanshiParientCode(String parientCode);
|
|
|
|
|
|
@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2")
|
|
|
DoctorTeam findByParientCodeAndSignType(String parientCode,String type);
|
|
|
//@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2 order by dtm.id limit 1")
|
|
|
@Query("select dtt from DoctorTeam dtt where dtt.id = (select max(dt.id) from DoctorTeam dt,DoctorTeamMember dtm where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2)")
|
|
|
DoctorTeam findByParientCodeAndSignType(String parientCode, String type);
|
|
|
|
|
|
@Modifying
|
|
|
@Query("update DoctorTeam a set a.del =0 where a.code = ?1 and signType='2'")
|