|
@ -22,6 +22,7 @@ import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.restmodel.ResponseContant;
|
|
|
import com.yihu.jw.util.idcard.IdCardUtil;
|
|
|
import com.yihu.jw.utils.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
@ -648,7 +649,7 @@ public class CourseService {
|
|
|
object.put("allCourse","");//课程
|
|
|
}
|
|
|
|
|
|
String sql3 = "SELECT * FROM base_doctor d,base_doctor_hospital dh\n" +
|
|
|
String sql3 = "SELECT *, d.id as doctorCode FROM base_doctor d,base_doctor_hospital dh\n" +
|
|
|
"WHERE d.doctor_level = 3 AND d.locked = 0 AND d.enabled = 1 AND d.del = 1 AND d.id = dh.doctor_code AND dh.del = 1 AND dh.org_code = '"+mapList.get(0).get("code")+"'" ;
|
|
|
List<Map<String , Object >> bmapList = jdbcTemplate.queryForList(sql3);
|
|
|
if (bmapList.size() > 0){
|
|
@ -697,11 +698,21 @@ public class CourseService {
|
|
|
public JSONObject getTecInfoById(String doctor,String orgCode,int page,int size){
|
|
|
JSONObject object = new JSONObject();
|
|
|
//老师的基本信息
|
|
|
String sql = "SELECT d.id,d.introduce,d.name,d.job_title_code jobTitleCode,d.job_title_name jobTitleName,dh.org_code orgCode,dh.org_name orgName\n" +
|
|
|
String sql = "SELECT d.id,d.introduce,d.name,d.photo,d.sex,d.idcard,d.job_title_code jobTitleCode,d.job_title_name jobTitleName,dh.org_code orgCode,dh.org_name orgName\n" +
|
|
|
"FROM base_doctor d,base_doctor_hospital dh\n" +
|
|
|
"WHERE d.id = '"+doctor+"' AND dh.org_code = '"+orgCode+"' AND d.enabled = 1 AND d.locked = 0 AND d.del = 1 AND dh.del = 1 AND dh.doctor_code = d.id";
|
|
|
List<Map<String , Object>> mapList = jdbcTemplate.queryForList(sql);
|
|
|
object.put("doctorInfo",mapList.get(0));
|
|
|
if (mapList.size()>0){
|
|
|
String idcard = mapList.get(0).get("idcard").toString();
|
|
|
if (StringUtils.isNotBlank(idcard)){
|
|
|
Integer age = IdCardUtil.getAgeForIdcard(idcard);
|
|
|
mapList.get(0).put("age",age);
|
|
|
}
|
|
|
else {
|
|
|
mapList.get(0).put("age",null);
|
|
|
}
|
|
|
}
|
|
|
object.put("doctorInfo",mapList.size()>0?mapList.get(0):null);
|
|
|
if (mapList.size() > 0){
|
|
|
page = page - 1;
|
|
|
size = (page+1)*size;
|