Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/PatientRehabilitationPlanDO.java
wangzhinan 5 lat temu
rodzic
commit
0e3e843b88

+ 32 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistPatientRelationDO.java

@ -1,5 +1,6 @@
package com.yihu.jw.entity.specialist;
package com.yihu.jw.entity.specialist;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Column;
@ -79,6 +80,13 @@ public class SpecialistPatientRelationDO extends UuidIdentityEntityWithOperator
    private String healthStatusCode;//健康状况编码
    private String healthStatusCode;//健康状况编码
    @Column(name = "disease_code")
    @Column(name = "disease_code")
    private String diseaseCode;//签约疾病编码,多个使用逗号隔开
    private String diseaseCode;//签约疾病编码,多个使用逗号隔开
    @Column(name = "is_manage")
    private Integer isManage;//是否管理(1管理0未管理)
    @Column(name = "manage_user")
    private String manageUser;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "manage_time")
    private Date manageTime;
    public String getSaasId() {
    public String getSaasId() {
@ -266,4 +274,28 @@ public class SpecialistPatientRelationDO extends UuidIdentityEntityWithOperator
    public void setDiseaseCode(String diseaseCode) {
    public void setDiseaseCode(String diseaseCode) {
        this.diseaseCode = diseaseCode;
        this.diseaseCode = diseaseCode;
    }
    }
    public Integer getIsManage() {
        return isManage;
    }
    public void setIsManage(Integer isManage) {
        this.isManage = isManage;
    }
    public String getManageUser() {
        return manageUser;
    }
    public void setManageUser(String manageUser) {
        this.manageUser = manageUser;
    }
    public Date getManageTime() {
        return manageTime;
    }
    public void setManageTime(Date manageTime) {
        this.manageTime = manageTime;
    }
}
}

+ 7 - 9
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -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")+"";