Explorar o código

Merge branch 'dev' of trick9191/wlyy2.0 into dev

trick9191 %!s(int64=5) %!d(string=hai) anos
pai
achega
625f835cb8

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/PatientRegisterTimeDao.java

@ -13,4 +13,5 @@ public interface PatientRegisterTimeDao extends PagingAndSortingRepository<WlyyP
    List<WlyyPatientRegisterTimeDO> findByDoctorAndWorkId(String doctor,String workId);
    List<WlyyPatientRegisterTimeDO> findByOutpatientId(String outpatientId);
    List<WlyyPatientRegisterTimeDO> findByDoctor(String doctor);
}

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -16,4 +16,5 @@ public interface OutpatientDao extends PagingAndSortingRepository<WlyyOutpatient
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.status in(0,1)")
    List<WlyyOutpatientDO> findByPatientList(String patient);
    List<WlyyOutpatientDO> findByDoctorAndStatus(String doctor,String status);
}

+ 21 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -145,7 +145,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        List<WlyyOutpatientVO> list = entranceService.BS30025(patNo,conNo,null,null,demoFlag);
        if(list!=null&&list.size()>0){
            return list.get(0);
            WlyyOutpatientVO outpatientVO = list.get(0);
            BasePatientDO patientDO = basePatientDao.findById(outpatientVO.getPatient());
            outpatientVO.setSex(patientDO.getSex()+"");
            outpatientVO.setBirthday(patientDO.getBirthday());
            return outpatientVO;
        }
        return null;
    }
@ -1509,6 +1513,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
               rs.put("hospital",null);
            }
            //医生角色
            String sql = "SELECT " +
                    " t. CODE AS roleCode, " +
                    " t. NAME AS roleName" +
@ -1524,6 +1530,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }else{
                rs.put("roles",null);
            }
            //医生预约量
            List<WlyyPatientRegisterTimeDO>  registerTimeDOs = patientRegisterTimeDao.findByDoctor(doctor);
            if(registerTimeDOs!=null&&registerTimeDOs.size()>0){
                rs.put("registerCount",registerTimeDOs.size());
            }else{
                rs.put("registerCount",0);
            }
            //医生问诊量
            List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByDoctorAndStatus(doctor,"2");
            if(wlyyOutpatientDOs!=null&&wlyyOutpatientDOs.size()>0){
                rs.put("outpatientCount",wlyyOutpatientDOs.size());
            }else{
                rs.put("outpatientCount",0);
            }
        }
        return rs;

+ 23 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/hospital/prescription/WlyyOutpatientVO.java

@ -185,6 +185,13 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    @ApiModelProperty(value = "1图文;2视频", example = "模块1")
    private String type;
    @ApiModelProperty(value = "性别,1男,2女", example = "模块1")
    private String sex;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @ApiModelProperty(value = "生日", example = "模块1")
    private Date birthday;
    public String getAdmNo() {
        return admNo;
@ -392,4 +399,20 @@ public class WlyyOutpatientVO extends UuidIdentityVO {
    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}