|
@ -1,6 +1,8 @@
|
|
package com.yihu.wlyy.service.app.healthBank;
|
|
package com.yihu.wlyy.service.app.healthBank;
|
|
|
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
|
|
|
import com.yihu.wlyy.entity.organization.Hospital;
|
|
|
|
import com.yihu.wlyy.repository.organization.HospitalDao;
|
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@ -10,15 +12,18 @@ import org.springframework.transaction.annotation.Transactional;
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public class PatientHealthBankService extends BaseService {
|
|
public class PatientHealthBankService extends BaseService {
|
|
@Autowired
|
|
@Autowired
|
|
private PatientDao patientDao;
|
|
|
|
|
|
private SignFamilyDao signFamilyDao;
|
|
|
|
@Autowired
|
|
|
|
private HospitalDao hospitalDao;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据patient判断居民是否为海沧区
|
|
* 根据patient判断居民是否为海沧区
|
|
* @param patient
|
|
* @param patient
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public boolean distinguish(String patient){
|
|
|
|
String address = patientDao.getAddress(patient);
|
|
|
|
return address.contains("海沧");
|
|
|
|
|
|
public Hospital distinguish(String patient){
|
|
|
|
String hospital = signFamilyDao.getHospital(patient);
|
|
|
|
Hospital h = hospitalDao.findByCode(hospital);
|
|
|
|
return h;
|
|
}
|
|
}
|
|
}
|
|
}
|