|
|
@@ -13,11 +13,9 @@ import java.util.List;
|
|
|
@Mapper
|
|
|
public interface PatientCardsDao {
|
|
|
@Select("select a.name,a.patient_id,a.phone,a.social_no,a.is_default, " +
|
|
|
- "cardType=isnull(b.visit_type,-1),convert(varchar(10), b.lv_date, 21) lvDate, " +
|
|
|
- "rtrim(b.ic_card_no) as icCardNo from " +
|
|
|
- "t_wechat_patient_bind a with(nolock),mz_patient_mi b with(nolock) " +
|
|
|
- "where a.openid=#{openid} and a.del_flag=0 " +
|
|
|
- "and a.patient_id=b.patient_id")
|
|
|
+ "cardType=(select isnull(visit_type, -1) from zd_visit_type_user d " +
|
|
|
+ "where d.patient_id=a.patient_id) " +
|
|
|
+ "from t_wechat_patient_bind a with(nolock) where a.openid=#{openid} and a.del_flag=0 ")
|
|
|
List<OutpatientCard> getBindPatientCard(@Param("openid") String openid);
|
|
|
|
|
|
@Update("update mz_patient_mi set social_no=#{socialNo} where ${tColumn}=#{cardNo} ")
|