|
@ -78,7 +78,7 @@ public class RehabilitationManageService {
|
|
|
sql.replace("from", ",f.idcard,f.hospital_name from");
|
|
|
sql += leftSql;
|
|
|
}
|
|
|
sql += " where p.`status` > 0 ";
|
|
|
sql += " where 1=1 ";
|
|
|
if(planType!=null){
|
|
|
sql += " and p.plan_type="+planType;
|
|
|
}
|
|
@ -1110,7 +1110,7 @@ public class RehabilitationManageService {
|
|
|
}
|
|
|
if (rehabilitationDetailDOList.size()>0 && rehabilitationDetailDOList.size()==allCount){
|
|
|
planId = rehabilitationDetailDOList.get(0).getPlanId();
|
|
|
patientRehabilitationPlanDao.updateStatusById(2,planId);
|
|
|
patientRehabilitationPlanDao.updateStatusAndTimeById(2,planId, new Date());
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
throw new Exception("更新服务状态失败!");
|
|
@ -1171,6 +1171,8 @@ public class RehabilitationManageService {
|
|
|
resultMap.put("diseaseName",p.getDiseaseName());
|
|
|
resultMap.put("createUser",p.getCreateUser());
|
|
|
resultMap.put("planTitle",p.getTitle());
|
|
|
resultMap.put("status", p.getStatus());
|
|
|
resultMap.put("patientImg", p.getPatientImg());
|
|
|
}
|
|
|
// resultMap.put("healthyCondition",healthyCondition);
|
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
|
|
@ -1254,7 +1256,7 @@ public class RehabilitationManageService {
|
|
|
" p.patient," +
|
|
|
" p.`name`," +
|
|
|
" p.title," +
|
|
|
" p.disease_name,p.abort_reason,p.abort_time," +
|
|
|
" p.disease_name,p.abort_reason,p.abort_time,p.create_time," +
|
|
|
" a.*" +
|
|
|
" FROM" +
|
|
|
" wlyy_patient_rehabilitation_plan p" +
|
|
@ -1284,6 +1286,8 @@ public class RehabilitationManageService {
|
|
|
Integer finishCount = list.size();//完成服务项目数
|
|
|
|
|
|
double totalExpense = 0;
|
|
|
Set<String> hospitalSet = new HashSet();
|
|
|
Set<String> serviceDoctor = new HashSet();
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
for (Map<String,Object> map : list){
|
|
|
double expense = 0;
|
|
@ -1292,11 +1296,25 @@ public class RehabilitationManageService {
|
|
|
}
|
|
|
totalExpense += expense;
|
|
|
map.put("expense",df.format(expense/100));
|
|
|
|
|
|
//组装机构和服务医生
|
|
|
if(map.get("hospital") != null){
|
|
|
if(map.get("hospital_name") != null && !hospitalSet.contains(("hospital_name") + "")) {
|
|
|
hospitalSet.add(map.get("hospital_name") + "");
|
|
|
}
|
|
|
}
|
|
|
if(map.get("doctor_code") != null){
|
|
|
if(map.get("doctor_name") != null && !hospitalSet.contains(("doctor_name") + "")) {
|
|
|
serviceDoctor.add(map.get("doctor_name") + "");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
reslutMap.put("totalExpense",df.format(totalExpense/100));
|
|
|
reslutMap.put("allCount",allCount);
|
|
|
reslutMap.put("finishCount",finishCount);
|
|
|
reslutMap.put("serviceList",list);
|
|
|
reslutMap.put("hospitalAll", hospitalSet.toString().replace("[","").replace("]","").replace(",", "、"));
|
|
|
reslutMap.put("serviceDoctor", serviceDoctor.toString().replace("[","").replace("]","").replace(",", "、"));
|
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,reslutMap);
|
|
|
}
|
|
|
}
|