|
@ -1100,13 +1100,16 @@ public class SurveyScreenResultService extends BaseService {
|
|
|
|
|
|
//获取筛查居民信息
|
|
//获取筛查居民信息
|
|
public List<Map<String, Object>> initPatient(String doctor, String labelType, String serverType, Long teamCode) {
|
|
public List<Map<String, Object>> initPatient(String doctor, String labelType, String serverType, Long teamCode) {
|
|
String sql = "SELECT DISTINCT p.`code` as service_patient_code, p.`name` as service_patient_name, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name,h.town,h.town_name " +
|
|
|
|
|
|
String sql = "SELECT DISTINCT p.`code` as servicePatientCode, p.`name` as servicePatientName, t1.ssc,t1.idcard,t1.mobile,t1.hospital,t1.hospital_name as hospitalName, h.town,h.town_name as townName " +
|
|
"FROM wlyy_sign_family t1 LEFT JOIN wlyy_patient p on p. CODE = t1.patient " +
|
|
"FROM wlyy_sign_family t1 LEFT JOIN wlyy_patient p on p. CODE = t1.patient " +
|
|
"LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = " + labelType + " and t2.status=1 " +
|
|
"LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = " + labelType + " and t2.status=1 " +
|
|
"RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code and s.server_type in (" + serverType + ") " +
|
|
|
|
|
|
"RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code" +
|
|
"LEFT JOIN dm_hospital h on t1.hospital = h.`code` " +
|
|
"LEFT JOIN dm_hospital h on t1.hospital = h.`code` " +
|
|
"WHERE ( t1.doctor = ? OR t1.doctor_health = ?) AND t1. STATUS > 0 and t1.expenses_status = 1 AND t1.admin_team_code = ? " +
|
|
"WHERE ( t1.doctor = ? OR t1.doctor_health = ?) AND t1. STATUS > 0 and t1.expenses_status = 1 AND t1.admin_team_code = ? " +
|
|
"AND p.openid IS NOT NULL AND p.openid <>'' ";
|
|
"AND p.openid IS NOT NULL AND p.openid <>'' ";
|
|
|
|
if(StringUtils.isNotBlank(serverType)){
|
|
|
|
sql = sql.replace("on s.sign_code = t1.code", "on s.sign_code = t1.code and s.server_type in (" + serverType + ") ");
|
|
|
|
}
|
|
Object[] args = new Object[]{doctor, doctor, teamCode};
|
|
Object[] args = new Object[]{doctor, doctor, teamCode};
|
|
List<Map<String, Object>> patientInfo = jdbcTemplate.queryForList(sql, args);
|
|
List<Map<String, Object>> patientInfo = jdbcTemplate.queryForList(sql, args);
|
|
return patientInfo;
|
|
return patientInfo;
|
|
@ -1123,6 +1126,7 @@ public class SurveyScreenResultService extends BaseService {
|
|
*/
|
|
*/
|
|
public String createWorkOrder(String jsonData, List<Map<String, Object>> patientInfo, String doctor) throws Exception {
|
|
public String createWorkOrder(String jsonData, List<Map<String, Object>> patientInfo, String doctor) throws Exception {
|
|
JSONObject object = new JSONObject(jsonData);
|
|
JSONObject object = new JSONObject(jsonData);
|
|
|
|
JSONArray patientInfos = new JSONArray(patientInfo);
|
|
//获取关联业务名称
|
|
//获取关联业务名称
|
|
if(object.getInt("type") == 4){
|
|
if(object.getInt("type") == 4){
|
|
Survey survey = surveyDao.findById(object.getString("relationCode"));
|
|
Survey survey = surveyDao.findById(object.getString("relationCode"));
|
|
@ -1138,10 +1142,10 @@ public class SurveyScreenResultService extends BaseService {
|
|
object.put("createUserName", d.getName());
|
|
object.put("createUserName", d.getName());
|
|
object.put("createUserType", 1);
|
|
object.put("createUserType", 1);
|
|
Map<String, Object> param = new HashedMap();
|
|
Map<String, Object> param = new HashedMap();
|
|
param.put("patientInfo", patientInfo.toString());
|
|
|
|
|
|
param.put("patientInfo", patientInfos.toString());
|
|
param.put("jsonData", object.toString());
|
|
param.put("jsonData", object.toString());
|
|
HttpResponse response = null;
|
|
HttpResponse response = null;
|
|
response = HttpUtils.doPost(customerUrl + "wlyy-manage/createWorkOrder", param);
|
|
|
|
|
|
response = HttpUtils.doPost(customerUrl + "doctor/createWorkOrder", param);
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
JSONObject rs = new JSONObject(response.getContent());
|
|
return rs.getString("message");
|
|
return rs.getString("message");
|
|
}
|
|
}
|