Explorar el Código

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

trick9191 hace 5 años
padre
commit
fc68a9104b

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

@ -670,7 +670,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param dept
     * @return
     */
    public List<Map<String,Object>> findDoctorByHospitalAndDept(String orgCode,String dept,String chargeType,String doctorCode){
    public List<Map<String,Object>> findDoctorByHospitalAndDept(String orgCode,String dept,String chargeType,String doctorCode,String outpatientType){
        String sql ="SELECT " +
                " d.id, " +
                " d.photo, " +
@ -679,7 +679,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " d.introduce," +
                " d.job_title_code AS jobTitleCode, " +
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType" +
                " d.charge_type AS chargeType," +
                " d.outpatient_type AS outpatientType," +
                " d.consult_status AS consultStatus" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -689,6 +691,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNotBlank(chargeType)){
            sql+=" AND d.charge_type ='"+chargeType+"'";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
        }else{
            sql+=" AND d.outpatient_type is not null ";
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0&&StringUtils.isNotBlank(doctorCode)){
@ -710,7 +717,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param dept
     * @return
     */
    public MixEnvelop findDoctorWithWork(String orgCode,String dept,String chargeType,String doctorCode,Integer page,Integer size){
    public MixEnvelop findDoctorWithWork(String orgCode,String dept,String chargeType,String doctorCode,String outpatientType,Integer page,Integer size){
        String totalSql ="SELECT " +
                " count(1) AS total " +
@ -723,6 +730,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNotBlank(chargeType)){
            totalSql+=" AND d.charge_type ='"+chargeType+"'";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            totalSql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
        }else{
            totalSql+=" AND d.outpatient_type is not null ";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
@ -740,7 +752,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                " d.job_title_name AS jobTitleName," +
                " d.charge_type AS chargeType," +
                " h.dept_code AS deptCode," +
                " h.dept_Name AS deptName" +
                " h.dept_Name AS deptName," +
                " d.outpatient_type AS outpatientType," +
                " d.consult_status AS consultStatus" +
                " FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
@ -750,6 +764,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if(StringUtils.isNotBlank(chargeType)){
            sql+=" AND d.charge_type ='"+chargeType+"'";
        }
        if(StringUtils.isNotBlank(outpatientType)){
            sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
        }else{
            sql+=" AND d.outpatient_type is not null ";
        }
        sql += " LIMIT " + (page - 1) * size + "," + size + "";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){

+ 29 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorDO.java

@ -171,6 +171,17 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
	 */
	private String del;
    /**
     * 咨询类型1图文,2视频,多用‘,’分割
     */
    private String outpatientType;
    /**
     * 1在线接诊,0下线
     */
    private String consultStatus;
	@Column(name = "password")
    public String getPassword() {
        return password;
@ -411,4 +422,22 @@ public class BaseDoctorDO extends UuidIdentityEntityWithOperator {
    public void setChargeType(String chargeType) {
        this.chargeType = chargeType;
    }
    @Column(name = "outpatient_type")
    public String getOutpatientType() {
        return outpatientType;
    }
    public void setOutpatientType(String outpatientType) {
        this.outpatientType = outpatientType;
    }
    @Column(name = "consult_status")
    public String getConsultStatus() {
        return consultStatus;
    }
    public void setConsultStatus(String consultStatus) {
        this.consultStatus = consultStatus;
    }
}

+ 7 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -198,8 +198,10 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                                   @ApiParam(name = "chargeType", value = "号别")
                                                   @RequestParam(value = "chargeType", required = false)String chargeType,
                                                   @ApiParam(name = "doctorCode", value = "需要置顶医生")
                                                   @RequestParam(value = "doctorCode", required = false)String doctorCode) {
        return success(prescriptionService.findDoctorByHospitalAndDept(orgCode,dept,chargeType,doctorCode));
                                                   @RequestParam(value = "doctorCode", required = false)String doctorCode,
                                                   @ApiParam(name = "outpatientType", value = "1图文,2视频")
                                                   @RequestParam(value = "outpatientType", required = false)String outpatientType) {
        return success(prescriptionService.findDoctorByHospitalAndDept(orgCode,dept,chargeType,doctorCode,outpatientType));
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.appointmentRevisit)
@ -335,12 +337,14 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                         @RequestParam(value = "doctorCode", required = false)String doctorCode,
                                         @ApiParam(name = "chargeType", value = "号别")
                                         @RequestParam(value = "chargeType", required = false)String chargeType,
                                         @ApiParam(name = "outpatientType", value = "1图文,2视频")
                                         @RequestParam(value = "outpatientType", required = false)String outpatientType,
                                         @ApiParam(name = "page", value = "第几页")
                                         @RequestParam(value = "page", required = true)Integer page,
                                         @ApiParam(name = "size", value = "每页大小")
                                         @RequestParam(value = "size", required = true)Integer size) {
        return success(prescriptionService.findDoctorWithWork(orgCode,dept,chargeType,doctorCode,page,size));
        return success(prescriptionService.findDoctorWithWork(orgCode,dept,chargeType,doctorCode,outpatientType,page,size));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findDoctorWithMouthWork)