|
@ -689,12 +689,11 @@ public class RehabilitationManageService {
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
public ObjEnvelop serviceItem(String planDetailId,String doctorCode) throws Exception{
|
|
public ObjEnvelop serviceItem(String planDetailId,String doctorCode) throws Exception{
|
|
String sql = "select i.title,i.content,i.type as itemType,i.reserve,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " +
|
|
|
|
|
|
String sql = "select h.name as title,h.name as content,h.code as itemType,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as executeDoctor, " +
|
|
" d.doctor_name as executeDoctorName,p.patient ,p.name as patientName,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus," +
|
|
" d.doctor_name as executeDoctorName,p.patient ,p.name as patientName,p.create_user as createDoctor,p.create_user_name as createDoctorName, p.status as planStatus," +
|
|
" p.disease,p.disease_name as diseaseName,p.title as planTitle"+
|
|
" p.disease,p.disease_name as diseaseName,p.title as planTitle"+
|
|
" from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
|
|
" from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
|
|
" LEFT JOIN wlyy_specialist.wlyy_hospital_service_item h on d.hospital_service_item_id = h.id "+
|
|
|
|
" LEFT JOIN wlyy_specialist.wlyy_service_item i on i.id = h.service_item_id " +
|
|
|
|
|
|
" LEFT JOIN wlyy_specialist.wlyy_rehabilitation_service_item h on d.hospital_service_item_id = h.code "+
|
|
" LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
|
|
" LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id " +
|
|
" where d.id = '"+planDetailId+"'";
|
|
" where d.id = '"+planDetailId+"'";
|
|
List<Map<String,Object>> serviceItemList = jdbcTemplate.queryForList(sql);
|
|
List<Map<String,Object>> serviceItemList = jdbcTemplate.queryForList(sql);
|
|
@ -722,7 +721,7 @@ public class RehabilitationManageService {
|
|
resultMap.put("hospitalName",one.get("hospital_name"));//地点
|
|
resultMap.put("hospitalName",one.get("hospital_name"));//地点
|
|
resultMap.put("executeTime",one.get("execute_time"));//执行时间
|
|
resultMap.put("executeTime",one.get("execute_time"));//执行时间
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
resultMap.put("expense",df.format(((Integer)one.get("expense")*1.00)/100.00));//收费
|
|
|
|
|
|
resultMap.put("expense",one.get("expense")!=null?df.format(((Integer)one.get("expense")*1.00)/100.00):0);//收费
|
|
resultMap.put("reserve",one.get("reserve"));//是否需要预约(1预约、0不预约)
|
|
resultMap.put("reserve",one.get("reserve"));//是否需要预约(1预约、0不预约)
|
|
resultMap.put("planStatus",one.get("planStatus"));//计划的状态
|
|
resultMap.put("planStatus",one.get("planStatus"));//计划的状态
|
|
Integer status = Integer.valueOf(one.get("status").toString());//状态(0未完成,1已完成,2已预约)
|
|
Integer status = Integer.valueOf(one.get("status").toString());//状态(0未完成,1已完成,2已预约)
|
|
@ -749,11 +748,10 @@ public class RehabilitationManageService {
|
|
map.put("createTime",DateUtil.dateToStr(one2.getCreateTime(),"MM-dd HH:mm"));
|
|
map.put("createTime",DateUtil.dateToStr(one2.getCreateTime(),"MM-dd HH:mm"));
|
|
messageMapList.add(map);
|
|
messageMapList.add(map);
|
|
}
|
|
}
|
|
Integer itemType = (Integer) one.get("itemType");
|
|
|
|
resultMap.put("messageList",messageMapList);//指导与汇报记录
|
|
resultMap.put("messageList",messageMapList);//指导与汇报记录
|
|
resultMap.put("patient",one.get("patient"));
|
|
resultMap.put("patient",one.get("patient"));
|
|
resultMap.put("patientName",one.get("patientName"));
|
|
resultMap.put("patientName",one.get("patientName"));
|
|
resultMap.put("type",itemType);//1扫码、0上传附件、2、健康教育,3、健康指导,4、随访
|
|
|
|
|
|
resultMap.put("type",one.get("itemType"));//1扫码、0上传附件、2、健康教育,3、健康指导,4、随访
|
|
|
|
|
|
//是否完成任务
|
|
//是否完成任务
|
|
List<RehabilitationOperateRecordsDO> operateList = rehabilitationOperateRecordsDao.findByRehabilitationDetailId(one.get("id").toString());
|
|
List<RehabilitationOperateRecordsDO> operateList = rehabilitationOperateRecordsDao.findByRehabilitationDetailId(one.get("id").toString());
|
|
@ -767,10 +765,10 @@ public class RehabilitationManageService {
|
|
resultMap.put("operatorDoctorName",temp.getDoctorName());//执行医生名称
|
|
resultMap.put("operatorDoctorName",temp.getDoctorName());//执行医生名称
|
|
resultMap.put("node",temp.getNode());
|
|
resultMap.put("node",temp.getNode());
|
|
resultMap.put("relationRecordImg",(temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg()))?(new JSONArray(temp.getRelationRecordImg())):null);//json格式
|
|
resultMap.put("relationRecordImg",(temp.getRelationRecordImg()!=null&&StringUtils.isNotEmpty(temp.getRelationRecordImg()))?(new JSONArray(temp.getRelationRecordImg())):null);//json格式
|
|
if(itemType!=1&&itemType!=0){
|
|
|
|
|
|
/* if(itemType!=1&&itemType!=0){*/
|
|
resultMap.put("relationRecordCode",temp.getRelationRecordCode());
|
|
resultMap.put("relationRecordCode",temp.getRelationRecordCode());
|
|
resultMap.put("completeTimeShort",DateUtil.dateToStr(completeTime,"yyyy/MM/dd"));
|
|
resultMap.put("completeTimeShort",DateUtil.dateToStr(completeTime,"yyyy/MM/dd"));
|
|
}
|
|
|
|
|
|
/* }*/
|
|
}
|
|
}
|
|
resultMap.put("operate",operate);//是否完成任务(默认0:未完成,1:已完成)
|
|
resultMap.put("operate",operate);//是否完成任务(默认0:未完成,1:已完成)
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
|
|
@ -1137,7 +1135,7 @@ public class RehabilitationManageService {
|
|
}
|
|
}
|
|
|
|
|
|
// String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
|
|
// String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
|
|
String specialistRelationSql = "select DISTINCT d.doctor,d.doctor_name from wlyy_specialist.wlyy_rehabilitation_plan_detail d LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.type=2 and p.patient='"+patientCode+"'";
|
|
|
|
|
|
String specialistRelationSql = "select DISTINCT d.doctor,d.doctor_name from wlyy_specialist.wlyy_rehabilitation_plan_detail d LEFT JOIN wlyy_specialist.wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.type=2 AND d.doctor IS NOT NULL and d.doctor <> '' and p.patient='"+patientCode+"'";
|
|
List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
|
|
List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
|
|
for(Map<String,Object> one:specialistRelationList){
|
|
for(Map<String,Object> one:specialistRelationList){
|
|
String doctor = one.get("doctor")+"";
|
|
String doctor = one.get("doctor")+"";
|