|
@ -22,6 +22,7 @@ import com.yihu.wlyy.entity.zydict.ZyIvPhysicDict;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamDoctorDao;
|
|
|
import com.yihu.wlyy.repository.consult.ConsultTeamLogDao;
|
|
|
import com.yihu.wlyy.repository.dict.SystemDictDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorPatientDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorTeamDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorTeamMemberDao;
|
|
@ -152,6 +153,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
private PatientHealthIndexService healthIndexService;
|
|
|
@Autowired
|
|
|
private MessageService messageService;
|
|
|
@Autowired
|
|
|
private SystemDictDao systemDictDao;
|
|
|
//健康问题 高血压
|
|
|
private static final String gxy = "HP0093";
|
|
|
//健康问题 糖尿病
|
|
@ -2718,4 +2721,25 @@ public class ConsultTeamService extends ConsultService {
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据居民code获取剩余家庭咨询次数
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public int countRemainConsult(String patient) throws Exception{
|
|
|
int count = 10;
|
|
|
try {
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String versionTime = systemDictDao.findByDictNameAndCode("VERSION_TIME","1.4.2");
|
|
|
int amount = consultTeamDao.countRemainConsult(patient,2,format.parse(versionTime));
|
|
|
count -= amount;
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
count = -1;
|
|
|
}
|
|
|
return count;
|
|
|
}
|
|
|
|
|
|
}
|