|
@ -5,20 +5,17 @@
|
|
*******************************************************************************/
|
|
*******************************************************************************/
|
|
package com.yihu.wlyy.repository.patient;
|
|
package com.yihu.wlyy.repository.patient;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
import com.yihu.wlyy.entity.patient.SignFamilyRenew;
|
|
|
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.Page;
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
import org.springframework.data.jpa.repository.Modifying;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
import org.springframework.data.repository.PagingAndSortingRepository;
|
|
|
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Long>, JpaSpecificationExecutor<SignFamily> {
|
|
public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Long>, JpaSpecificationExecutor<SignFamily> {
|
|
|
|
|
|
@ -431,7 +428,8 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
@Query(value = "SELECT f.* FROM wlyy_sign_family f WHERE f.idcard = ?1 and f.`status` = -4 ORDER BY sign_year desc LIMIT 0,1 ",nativeQuery = true)
|
|
@Query(value = "SELECT f.* FROM wlyy_sign_family f WHERE f.idcard = ?1 and f.`status` = -4 ORDER BY sign_year desc LIMIT 0,1 ",nativeQuery = true)
|
|
SignFamily findLatelyRenew(String idcard);
|
|
SignFamily findLatelyRenew(String idcard);
|
|
|
|
|
|
//根据签约类型、签约状态、扣费状态查找居民身份证信息
|
|
|
|
@Query("select a.idcard from SignFamily a where (a.type = 2 or a.type = 1) and a.status = 1 and a.expensesStatus = 1 ")
|
|
|
|
List<String> findIdcardByStatus();
|
|
|
|
|
|
//查询wlyy_sign_family有效签约且居民的医疗保险号为空的数据
|
|
|
|
@Query(value = "select a.idcard from wlyy_sign_family a left join wlyy_patient b on a.idcard = b.idcard where a.hospital = ?1 and (a.type = 2 or a.type = 1) " +
|
|
|
|
"and a.status = 1 and a.expenses_status = 1 and (b.medicare_number is null or b.medicare_number = '')", nativeQuery = true)
|
|
|
|
List<String> findIdcardByStatus(String hospital);
|
|
}
|
|
}
|