LAPTOP-KB9HII50\70708 11 kuukautta sitten
vanhempi
commit
58ad40ef51

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

@ -597,11 +597,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(endTime)) {
            totalSql += " AND o.create_time <=:endTime ";
            totalParams.put("endTime", DateUtil.strToDateLong(endTime + " 23:59:59"));
        }
        if (StringUtils.isNotBlank(outpatientType)){
            totalSql+=" AND o.outpatient_type = :outpatientType ";
            totalParams.put("outpatientType", outpatientType);
            if("35".equals(outpatientType)){
                totalSql+=" AND o.outpatient_type in ('3','5') ";
            }else {
                totalSql+=" AND o.outpatient_type = :outpatientType ";
                totalParams.put("outpatientType", outpatientType);
            }
        }
       /* totalParams.add(patient);
        if(status!=null){
@ -706,7 +709,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            }
        }
        if (StringUtils.isNotBlank(outpatientType)){
            sql+=" AND o.outpatient_type = '"+outpatientType+"' ORDER BY o.create_time DESC ";
            if("35".equals(outpatientType)){
                sql+=" AND o.outpatient_type in ('3','5') ORDER BY o.create_time DESC ";
            }else {
                sql+=" AND o.outpatient_type = '"+outpatientType+"' ORDER BY o.create_time DESC ";
            }
        }
        logger.info("sql="+sql);
@ -7296,7 +7303,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public MixEnvelop findDoctorByHospitalAndDiseaseAndDept2(String iswork, String patientid, String orgCode, String dept,
                                                            String diseaseKey, String doctorNameKey,
                                                            String jobTitleNameKey, String outpatientType,
                                                            String keyName, String workingTime, String consultStatus, String chargType, String consutlSort, String isAttention, Integer page, Integer pagesize) {
                                                            String keyName, String workingTime, String consultStatus, String chargType, String consutlSort,
                                                             String isAttention,String isNurse, Integer page, Integer pagesize) {
        long statr = new Date().getTime();
        String sql = "SELECT " +
                " d.id AS \"id\", " +
@ -7321,6 +7329,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        sql+=" FROM " +
                " base_doctor d " +
                " JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
                " JOIN dict_job_title jt ON jd.code = d.job_title_code " +
                " Left join ( select count(id) as total,doctor from wlyy_outpatient where status = 3 GROUP BY doctor ) a on a.doctor = d.id ";
        Map<String, Object> params = new HashedMap();
        Date date = new Date();
@ -7418,7 +7427,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                sql += " AND h.dept_code =:dept ";
                params.put("dept", dept);
            }
        }
        if ("1".equals(isNurse)) {
            sql += " AND jt.saas_id = 'hlys' ";
        }
        if (StringUtils.isNotBlank(jobTitleNameKey)) {

+ 5 - 9
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -8156,6 +8156,7 @@ public class StatisticsEsService {
                "FROM\n" +
                "	base_doctor a\n" +
                "	INNER JOIN base_doctor_hospital b ON a.id = b.doctor_code \n" +
                "	INNER JOIN dict_hospital_dept dhd ON dhd.code = b.DEPT_CODE and dhd.CONSULT_DEPT_FLAG='1' " +
                "WHERE\n" +
                "	1 = 1 \n" +
                "	AND a.del='1' AND b.del='1'\n" +
@ -8163,15 +8164,10 @@ public class StatisticsEsService {
                "	AND a.outpatient_type <> '' \n" +
                "	AND b.dept_code IS NOT NULL ";
        String doctorSql = "SELECT\n" +
                "	count( DISTINCT a.id ) \n" +
                "FROM\n" +
                "	base_doctor a \n" +
                "WHERE\n" +
                "	1 = 1 \n" +
                "	AND a.del = '1' \n" +
                "	AND a.outpatient_type IS NOT NULL \n" +
                "	AND a.outpatient_type <> ''";
        String doctorSql = "SELECT COUNT(bd.ID) as \"total\" FROM " +
                "base_doctor bd, base_doctor_hospital bdh,dict_hospital_dept dhd " +
                " WHERE bd.ID = bdh.DOCTOR_CODE AND dhd.code = bdh.DEPT_CODE AND bd.DEL = 1 " +
                " AND bdh.DEL = 1 AND bd.OUTPATIENT_TYPE IS NOT NULL AND dhd.CONSULT_DEPT_FLAG='1'  ";
        CompletableFuture<Integer> future01 = CompletableFuture.supplyAsync(() -> {
            Integer integer = jdbcTemplate.queryForObject(deptSql, Integer.class);

+ 3 - 1
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -4324,7 +4324,9 @@ public class ImService {
                sql += " AND op.outpatient_type = 4";
            } else if (type.equalsIgnoreCase("29")) {
                sql += " AND op.outpatient_type = 1 and  oh.id is not null ";
            } else {
            } else if (type.equalsIgnoreCase("30")) {
                sql += " AND op.outpatient_type = 5";
            }  else {
                sql += " AND op.type in (1,2,3) ";
            }
        }

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyOutpatientDO.java

@ -50,7 +50,7 @@ public class WlyyOutpatientDO extends UuidIdentityEntity {
    private String conNo;
    /**
     * 1.在线复诊2.协同门诊 3.专家咨询 4康复咨询
     * 1.在线复诊2.协同门诊 3.专家咨询 4康复咨询 5.护理咨询
     */
    private String outpatientType;
    /**

+ 6 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -334,6 +334,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                                             @RequestParam(value = "consutlSort", required = true,defaultValue = "DESC")String consutlSort,
                                                            @ApiParam(name = "isAttention", value = "是否关注 1:关注 0:不关注 不传:查所有")
                                                                 @RequestParam(value = "isAttention", required = false)String isAttention,
                                                            @ApiParam(name = "isNurse", value = "是否护师 1:是 0:否 不传:查所有")
                                                                @RequestParam(value = "isNurse", required = false)String isNurse,
                                                            @ApiParam(name = "page", value = "第几页")
                                                             @RequestParam(value = "page",required = false) Integer page,
                                                            @ApiParam(name = "pagesize", value = "分页大小")
@ -345,7 +347,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                    orgCode,dept,
                    diseaseKey,doctorNameKey,
                    jobTitleNameKey,outpatientType,
                    keyName,workingTime,consultStatus,chargType,consutlSort,isAttention,page,pagesize);
                    keyName,workingTime,consultStatus,chargType,consutlSort,isAttention,isNurse,page,pagesize);
        } catch (Exception e){
            return  failedMixEnvelopException2(e);
        }
@ -380,6 +382,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                                            @RequestParam(value = "consutlSort", required = true,defaultValue = "DESC")String consutlSort,
                                                            @ApiParam(name = "isAttention", value = "是否关注 1:关注 0:不关注 不传:查所有")
                                                            @RequestParam(value = "isAttention", required = false)String isAttention,
                                                             @ApiParam(name = "isNurse", value = "是否护师 1:是 0:否 不传:查所有")
                                                                 @RequestParam(value = "isNurse", required = false)String isNurse,
                                                            @ApiParam(name = "page", value = "第几页")
                                                            @RequestParam(value = "page",required = false) Integer page,
                                                            @ApiParam(name = "pagesize", value = "分页大小")
@ -391,7 +395,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                    orgCode,dept,
                    diseaseKey,doctorNameKey,
                    jobTitleNameKey,outpatientType,
                    keyName,workingTime,consultStatus,chargType,consutlSort,isAttention,page,pagesize);
                    keyName,workingTime,consultStatus,chargType,consutlSort,isAttention,isNurse,page,pagesize);
        } catch (Exception e){
            return  failedMixEnvelopException2(e);
        }

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

@ -385,7 +385,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                                                               @RequestParam(value = "startTime", required = false) String startTime,
                                                                               @ApiParam(name = "endTime", value = "结束时间,yyyy-MM-dd’")
                                                                               @RequestParam(value = "endTime", required = false) String endTime,
                                                                               @ApiParam(name = "outpatientType", value = "1复诊2协同3咨询4康复咨询")
                                                                               @ApiParam(name = "outpatientType", value = "1复诊2协同3咨询4康复咨询5护理咨询")
                                                                               @RequestParam(value = "outpatientType", required = false) String outpatientType,
                                                                               @ApiParam(name = "type", value = "outpatientType=1时 type 1=住院申请")
                                                                               @RequestParam(value = "type", required = false) String type,