|
@ -3,9 +3,11 @@ package com.yihu.wlyy.service.manager.account;
|
|
import com.yihu.wlyy.entity.*;
|
|
import com.yihu.wlyy.entity.*;
|
|
import com.yihu.wlyy.entity.call.CallRecord;
|
|
import com.yihu.wlyy.entity.call.CallRecord;
|
|
import com.yihu.wlyy.entity.call.CallService;
|
|
import com.yihu.wlyy.entity.call.CallService;
|
|
|
|
import com.yihu.wlyy.entity.synergy.ManageSynergyWorkorderServicerDO;
|
|
import com.yihu.wlyy.repository.*;
|
|
import com.yihu.wlyy.repository.*;
|
|
import com.yihu.wlyy.repository.call.CallRecordDao;
|
|
import com.yihu.wlyy.repository.call.CallRecordDao;
|
|
import com.yihu.wlyy.repository.call.CallServiceDao;
|
|
import com.yihu.wlyy.repository.call.CallServiceDao;
|
|
|
|
import com.yihu.wlyy.repository.synergy.ManageSynergyWorkorderServicerDao;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
import com.yihu.wlyy.service.BaseService;
|
|
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
|
|
import com.yihu.wlyy.service.manager.family.FamilyMemberService;
|
|
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
|
|
import com.yihu.wlyy.service.manager.hos.HosDoctorService;
|
|
@ -92,9 +94,11 @@ public class CustomerService extends BaseService{
|
|
doctors.add(doctor);
|
|
doctors.add(doctor);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String labelSql="SELECT DISTINCT CASE call_label WHEN '1' THEN '有待跟踪' WHEN '2' THEN '电话骚扰' WHEN '3' THEN '态度恶劣' END FROM manage_call_record mcr WHERE (caller_number='"+patient.getPhone()+"' OR caller_number='"+patient.getMobile()+"') AND type=1 AND call_label IS NOT NULL";
|
|
|
|
List<Map<String,Object>> labelInfo = jdbcTemplate.queryForList(labelSql);
|
|
resp.put("signInfo",signInfo);
|
|
resp.put("signInfo",signInfo);
|
|
resp.put("doctors",doctors);
|
|
resp.put("doctors",doctors);
|
|
|
|
resp.put("labelInfo",labelInfo);
|
|
|
|
|
|
return resp;
|
|
return resp;
|
|
}
|
|
}
|
|
@ -167,7 +171,7 @@ public class CustomerService extends BaseService{
|
|
//发送短信消息啦
|
|
//发送短信消息啦
|
|
String mobile = doctor.getMobile();
|
|
String mobile = doctor.getMobile();
|
|
if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
|
|
if(!StringUtils.isBlank(mobile)&&!"2".equals(type)){
|
|
msg+="\n您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
|
|
|
|
|
|
msg+=" 您可通过微信关注\"i健康智能助手\"公众号更快更便捷的获取服务信息。";
|
|
List<NameValuePair> par = new ArrayList<NameValuePair>();
|
|
List<NameValuePair> par = new ArrayList<NameValuePair>();
|
|
par.add(new BasicNameValuePair("mobiles", mobile));
|
|
par.add(new BasicNameValuePair("mobiles", mobile));
|
|
par.add(new BasicNameValuePair("content", msg));
|
|
par.add(new BasicNameValuePair("content", msg));
|
|
@ -387,13 +391,83 @@ public class CustomerService extends BaseService{
|
|
|
|
|
|
public Map<String,Object> getCallRecordInfo(String code){
|
|
public Map<String,Object> getCallRecordInfo(String code){
|
|
CallRecord callRecord = callRecordDao.findByCode(code);
|
|
CallRecord callRecord = callRecordDao.findByCode(code);
|
|
List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
|
|
|
|
List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);
|
|
|
|
|
|
/*List<CallService> consultService = callServiceDao.findByCallCodeAndType(code,0);
|
|
|
|
List<CallService> orderService = callServiceDao.findByCallCodeAndType(code,1);*/
|
|
|
|
|
|
|
|
String type="";
|
|
|
|
String relationCode="";
|
|
|
|
String sql="";
|
|
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
|
|
//咨询
|
|
|
|
if ("0".equals(type)){
|
|
|
|
sql="SELECT " +
|
|
|
|
" a.code as workCode," +
|
|
|
|
" a.content, " +
|
|
|
|
" a.`status`, " +
|
|
|
|
" a.service_patient_name, " +
|
|
|
|
" c.deal_type, " +
|
|
|
|
" c.deal_content, " +
|
|
|
|
" a.remark " +
|
|
|
|
" FROM " +
|
|
|
|
" manage_synergy_workorder_reserve_consult c " +
|
|
|
|
" INNER JOIN ( " +
|
|
|
|
" SELECT " +
|
|
|
|
" w.*, s.service_patient_name " +
|
|
|
|
" FROM " +
|
|
|
|
" manage_synergy_workorder w " +
|
|
|
|
" LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code " +
|
|
|
|
" ) a " +
|
|
|
|
" WHERE " +
|
|
|
|
" call_code = '"+code+"'";
|
|
|
|
resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
}
|
|
|
|
//健康教育
|
|
|
|
if ("1".equals(type)){
|
|
|
|
|
|
|
|
}
|
|
|
|
//预约
|
|
|
|
if ("2".equals(type)){
|
|
|
|
sql="SELECT" +
|
|
|
|
" a. CODE AS workCode," +
|
|
|
|
" a.`status`," +
|
|
|
|
" a.service_patient_name," +
|
|
|
|
" c.order_hospital_name," +
|
|
|
|
" c.order_dept_name," +
|
|
|
|
" c.order_time" +
|
|
|
|
"FROM" +
|
|
|
|
" manage_synergy_workorder_reserve_consult c" +
|
|
|
|
"INNER JOIN (" +
|
|
|
|
" SELECT" +
|
|
|
|
" w.*, s.service_patient_name" +
|
|
|
|
" FROM" +
|
|
|
|
" manage_synergy_workorder w" +
|
|
|
|
" LEFT JOIN manage_synergy_workorder_servicer s ON w.`code` = s.workorder_code" +
|
|
|
|
") a" +
|
|
|
|
"WHERE" +
|
|
|
|
" call_code = '"+code+"'";
|
|
|
|
resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
}
|
|
|
|
//随访
|
|
|
|
if ("3".equals(type)){
|
|
|
|
|
|
|
|
}
|
|
|
|
//问卷调查
|
|
|
|
if ("4".equals(type)){
|
|
|
|
|
|
|
|
}
|
|
|
|
//疾病筛查
|
|
|
|
if ("5".equals(type)){
|
|
|
|
sql="SELECT * FROM `wlyy_survey_screen_result` WHERE `code`='"+relationCode+"'";
|
|
|
|
resultList = jdbcTemplate.queryForList(sql);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
|
|
List<PatientReservation> patientReservation = patientReservationDao.findByCallCode(code);
|
|
Map<String,Object> rs = new HashedMap();
|
|
Map<String,Object> rs = new HashedMap();
|
|
rs.put("callRecord",callRecord);
|
|
rs.put("callRecord",callRecord);
|
|
rs.put("consultService",consultService);
|
|
|
|
rs.put("orderService",orderService);
|
|
|
|
|
|
/*rs.put("consultService",consultService);
|
|
|
|
rs.put("orderService",orderService);*/
|
|
rs.put("patientReservation",patientReservation);
|
|
rs.put("patientReservation",patientReservation);
|
|
return rs;
|
|
return rs;
|
|
}
|
|
}
|