|
@ -0,0 +1,123 @@
|
|
|
package com.yihu.wlyy.service.specialist;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
|
|
|
import com.yihu.wlyy.entity.message.Message;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.entity.specialist.PatientDiseaseServer;
|
|
|
import com.yihu.wlyy.entity.specialist.SpecialDisease;
|
|
|
import com.yihu.wlyy.entity.specialist.TeamDiseaseRelation;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorAdminTeamDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.doctor.SignPatientLabelDao;
|
|
|
import com.yihu.wlyy.repository.doctor.SignPatientLabelInfoDao;
|
|
|
import com.yihu.wlyy.repository.message.MessageDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.repository.specialist.PatientDiseaseServerDao;
|
|
|
import com.yihu.wlyy.repository.specialist.SpecialDiseaseDao;
|
|
|
import com.yihu.wlyy.repository.specialist.TeamDiseaseRelationDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
|
import com.yihu.wlyy.util.http.HttpResponse;
|
|
|
import com.yihu.wlyy.util.http.HttpUtils;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* Created by Trick on 2018/5/31.
|
|
|
*/
|
|
|
@Service
|
|
|
@Transactional
|
|
|
public class SpecialistScreenResultService extends BaseService {
|
|
|
|
|
|
private static org.slf4j.Logger logger = LoggerFactory.getLogger(SpecialistScreenResultService.class);
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private SignPatientLabelDao signPatientLabelDao;
|
|
|
@Autowired
|
|
|
private SignPatientLabelInfoDao signPatientLabelInfoDao;
|
|
|
@Autowired
|
|
|
private DoctorDao doctorDao;
|
|
|
@Autowired
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Value("${specialist.url}")
|
|
|
private String specialistUrl;
|
|
|
@Autowired
|
|
|
private DoctorAdminTeamDao doctorAdminTeamDao;
|
|
|
@Autowired
|
|
|
private TeamDiseaseRelationDao teamDiseaseRelationDao;
|
|
|
@Autowired
|
|
|
private PatientDiseaseServerDao patientDiseaseServerDao;
|
|
|
@Autowired
|
|
|
private PatientDao patientDao;
|
|
|
@Autowired
|
|
|
private SpecialDiseaseDao specialDiseaseDao;
|
|
|
@Autowired
|
|
|
private MessageDao messageDao;
|
|
|
@Autowired
|
|
|
private SignFamilyDao signFamilyDao;
|
|
|
|
|
|
public JSONArray getScreenList(String doctor,int type,Integer page,Integer size) throws Exception {
|
|
|
Map<String, Object> param = new HashedMap();
|
|
|
param.put("doctor", doctor);
|
|
|
param.put("type", type);
|
|
|
param.put("pageNo", page);
|
|
|
param.put("pageSize", size);
|
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/getScreenResult", param);
|
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
|
if ("succes".equals(rs.getString("message"))) {
|
|
|
return rs.getJSONArray("detailModelList");
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
public JSONObject getScreenCount(String doctor) throws Exception {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
Map<String, Object> param = new HashedMap();
|
|
|
param.put("doctor", doctor);
|
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/getScreenCount", param);
|
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
|
if ("succes".equals(rs.getString("message"))) {
|
|
|
jsonObject = rs.getJSONObject("obj");
|
|
|
return jsonObject;
|
|
|
}
|
|
|
jsonObject.put("status",-1);
|
|
|
jsonObject.put("message",rs.get("message"));
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
public JSONObject getSpecialScreenResultDetail(String code) throws Exception {
|
|
|
Map<String, Object> param = new HashedMap();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
param.put("code", code);
|
|
|
HttpResponse response = HttpUtils.doGet(specialistUrl + "svr-specialist/getScreenResultDetail", param);
|
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
|
if (rs.getInt("status")==200) {
|
|
|
jsonObject = rs.getJSONObject("obj");
|
|
|
return jsonObject;
|
|
|
}
|
|
|
jsonObject.put("status",-1);
|
|
|
jsonObject.put("message",rs.get("message"));
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|