Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
f9e7cbd95b

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

@ -1659,13 +1659,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @param orgCode
     * @return
     */
    public List<DictHospitalDeptVO> findInDeptByHospital(String orgCode, String dept, String deptType) {
        List<DictHospitalDeptDO> list;
    public List<DictHospitalDeptVO> findInDeptByHospital(String orgCode, String dept, String deptType,String consultDeptFlag) {
        String sql = "select * from dict_hospital_dept where 1=1 ";
        if (StringUtils.isNotBlank(deptType) ) {
            list = dictHospitalDeptDao.findByOrgCodeAndDeptType(orgCode, deptType);
            sql += " and org_code='"+orgCode+"' and dept_type='"+deptType+"' ";
        } else {
            list = dictHospitalDeptDao.findByOrgCodeIn(Arrays.asList(orgCode.split(",")));
            sql += " and org_code in ('"+orgCode.replaceAll(",","','")+"') ";
        }
        if (StringUtils.isNotBlank(consultDeptFlag) ) {
            sql += " and consult_dept_flag='"+consultDeptFlag+"' ";
        }
        List<DictHospitalDeptDO> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(DictHospitalDeptDO.class));
        List<DictHospitalDeptVO> rs = new ArrayList<>();
        convertToModels(list, rs, DictHospitalDeptVO.class);
        if (rs != null && rs.size() > 0 && StringUtils.isNotBlank(dept)) {

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

@ -1947,11 +1947,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                          @RequestParam(value = "orgCode", required = true)String orgCode,
                                          @ApiParam(name = "dept", value = "需要置顶部门")
                                          @RequestParam(value = "dept", required = false)String dept,
                                          @ApiParam(name = "consultDeptFlag", value = "是否咨询科室")
                                          @RequestParam(value = "consultDeptFlag", required = false)String consultDeptFlag,
                                          @ApiParam(name = "deptType", value = "门诊和病区标识")
                                          @RequestParam(value = "deptType", required = false)String deptType) {
        try {
            return success(prescriptionService.findInDeptByHospital(orgCode,dept,deptType));
            return success(prescriptionService.findInDeptByHospital(orgCode,dept,deptType,consultDeptFlag));
        }catch (Exception e) {
            return failedListEnvelopException2(e);
        }