|
@ -573,7 +573,8 @@ public class RehabilitationManageService {
|
|
|
*/
|
|
|
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, " +
|
|
|
" 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"+
|
|
|
" 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 " +
|
|
@ -616,6 +617,9 @@ public class RehabilitationManageService {
|
|
|
}
|
|
|
resultMap.put("statusName",statusName);//状态名称
|
|
|
resultMap.put("status",status);//状态
|
|
|
resultMap.put("disease",one.get("disease"));
|
|
|
resultMap.put("diseaseName",one.get("diseaseName"));
|
|
|
resultMap.put("planTitle",one.get("planTitle"));
|
|
|
//指导与汇报
|
|
|
List<GuidanceMessageLogDO> messageList = guidanceMessageLogDao.findByPlanDetailId(one.get("id").toString());
|
|
|
List<Map<String,Object>> messageMapList = new ArrayList<>();
|
|
@ -1156,8 +1160,15 @@ public class RehabilitationManageService {
|
|
|
Map<String,Object> resultMap = new HashMap<>();
|
|
|
Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId);//计划总服务项目数
|
|
|
Integer finishedCount = rehabilitationDetailDao.findByStatusAndPlanId(1,planId);
|
|
|
PatientRehabilitationPlanDO p =patientRehabilitationPlanDao.findById(planId);
|
|
|
resultMap.put("allCount",allCount);
|
|
|
resultMap.put("finishedCount",finishedCount);
|
|
|
if (p!=null){
|
|
|
resultMap.put("disease",p.getDisease());
|
|
|
resultMap.put("diseaseName",p.getDiseaseName());
|
|
|
resultMap.put("createUser",p.getCreateUser());
|
|
|
resultMap.put("planTitle",p.getTitle());
|
|
|
}
|
|
|
// resultMap.put("healthyCondition",healthyCondition);
|
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
|
|
|
}
|
|
@ -1233,4 +1244,53 @@ public class RehabilitationManageService {
|
|
|
envelop.setObj(rehabilitationDetailDOS);
|
|
|
return envelop;
|
|
|
}
|
|
|
|
|
|
public ObjEnvelop getServiceItemsAfterStop(String planId)throws Exception{
|
|
|
Map<String,Object> reslutMap = new HashMap<>();
|
|
|
String sql ="SELECT" +
|
|
|
" p.patient," +
|
|
|
" p.`name`," +
|
|
|
" p.title," +
|
|
|
" p.disease_name,p.abort_reason,p.abort_time," +
|
|
|
" a.*" +
|
|
|
" FROM" +
|
|
|
" wlyy_patient_rehabilitation_plan p" +
|
|
|
" LEFT JOIN (" +
|
|
|
" SELECT" +
|
|
|
" d.id," +
|
|
|
" d.plan_id," +
|
|
|
" d.hospital," +
|
|
|
" d.hospital_name," +
|
|
|
" i.service_item_id," +
|
|
|
" i.service_item_name," +
|
|
|
" d.expense," +
|
|
|
" r.doctor_code," +
|
|
|
" r.doctor_name," +
|
|
|
" r.complete_time" +
|
|
|
" FROM" +
|
|
|
" wlyy_rehabilitation_plan_detail d" +
|
|
|
" LEFT JOIN wlyy_hospital_service_item i ON d.hospital_service_item_id = i.id" +
|
|
|
" LEFT JOIN wlyy_rehabilitation_operate_records r ON d.id = r.rehabilitation_detail_id" +
|
|
|
" WHERE" +
|
|
|
" r.`status` = 1" +
|
|
|
" ) a ON p.id = a.plan_id" +
|
|
|
" WHERE" +
|
|
|
" p.id = '"+planId+"'";
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
|
|
|
Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId);//计划总服务项目数
|
|
|
Integer finishCount = list.size();//完成服务项目数
|
|
|
|
|
|
double totalExpense = 0;
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
for (Map<String,Object> map : list){
|
|
|
double expense = Integer.valueOf(String .valueOf(map.get("expense")));
|
|
|
totalExpense += expense;
|
|
|
map.put("expense",df.format(expense/100));
|
|
|
}
|
|
|
reslutMap.put("totalExpense",df.format(totalExpense/100));
|
|
|
reslutMap.put("allCount",allCount);
|
|
|
reslutMap.put("finishCount",finishCount);
|
|
|
reslutMap.put("serviceList",list);
|
|
|
return ObjEnvelop.getSuccess(SpecialistMapping.api_success,reslutMap);
|
|
|
}
|
|
|
}
|