Browse Source

医生管理医生所属机构职务等树形结构

LiTaohong 6 years ago
parent
commit
a0cef401c9

+ 12 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/doctor/BaseDoctorHospitalDO.java

@ -53,6 +53,12 @@ public class BaseDoctorHospitalDO extends IntegerIdentityEntity {
	 */
	private String jobTitleName;
    /**
     * 医生所在机构部门标识
     */
    private String deptCode;
    /**
	 * 作废标识,1正常,0作废
	 */
@ -138,6 +144,11 @@ public class BaseDoctorHospitalDO extends IntegerIdentityEntity {
        this.createTime = createTime;
    }
    public String getDeptCode() {
        return deptCode;
    }
    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }
}

+ 0 - 26
common/common-entity/src/main/java/com/yihu/jw/entity/base/patient/BasePatientDO.java

@ -166,16 +166,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	private Date openidTime;
    /**
	 * 居委会代码
	 */
	private String sickVillage;
    /**
	 *
	 */
	private String sickVillageName;
    /**
	 * 绑定电子社保卡主体(共济为操作人code)
	 */
@ -455,22 +445,6 @@ public class BasePatientDO extends UuidIdentityEntityWithOperator {
        this.openidTime = openidTime;
    }
	@Column(name = "sick_village")
    public String getSickVillage() {
        return sickVillage;
    }
    public void setSickVillage(String sickVillage) {
        this.sickVillage = sickVillage;
    }
	@Column(name = "sick_village_name")
    public String getSickVillageName() {
        return sickVillageName;
    }
    public void setSickVillageName(String sickVillageName) {
        this.sickVillageName = sickVillageName;
    }
	@Column(name = "principal_code")
    public String getPrincipalCode() {
        return principalCode;

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -352,6 +352,7 @@ public class BaseRequestMapping {
    public static class BaseDoctor extends Basic {
        public static final String PREFIX  = "/baseDoctor";
        public static final String DOCINFO  = "/docInfo";
        public static final String docOrgTreeInfo  = "/docOrgTreeInfo";
    }

+ 16 - 4
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/doctor/BaseDoctorHospitalVO.java

@ -31,19 +31,19 @@ public class BaseDoctorHospitalVO extends IntegerIdentityVO{
    /**
	 * 医院名称
	 */
	@ApiModelProperty(value = "医院名称", example = "")
	@ApiModelProperty(value = "医院名称", example = "厦门市中医院")
    private String hospName;
    /**
	 * 医生角色标识
	 */
	@ApiModelProperty(value = "医生角色标识", example = "")
	@ApiModelProperty(value = "医生角色标识", example = "专科医生")
    private String roleCode;
    /**
	 * 医院角色名称
	 */
	@ApiModelProperty(value = "医院角色名称", example = "")
	@ApiModelProperty(value = "医生角色名称", example = "")
    private String roleName;
    /**
@ -55,9 +55,21 @@ public class BaseDoctorHospitalVO extends IntegerIdentityVO{
    /**
	 * 职称名称
	 */
	@ApiModelProperty(value = "职称名称", example = "")
	@ApiModelProperty(value = "职称名称", example = "副主任医师")
    private String jobTitleName;
    /**
     * 部门标识
     */
    @ApiModelProperty(value = "部门标识", example = "")
    private String deptCode;
    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称", example = "骨科专业")
    private String deptName;
    /**
	 * 作废标识,1正常,0作废
	 */

+ 0 - 26
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/patient/BasePatientVO.java

@ -198,18 +198,6 @@ public class BasePatientVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "第一次添加open的时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date openidTime;
    /**
	 * 居委会代码
	 */
	@ApiModelProperty(value = "居委会代码", example = "")
    private String sickVillage;
    /**
	 * 
	 */
	@ApiModelProperty(value = "", example = "")
    private String sickVillageName;
    /**
	 * 绑定电子社保卡主体(共济为操作人code)
	 */
@ -475,20 +463,6 @@ public class BasePatientVO extends UuidIdentityVOWithOperator {
        this.openidTime = openidTime;
    }
    public String getSickVillage() {
        return sickVillage;
    }
    public void setSickVillage(String sickVillage) {
        this.sickVillage = sickVillage;
    }
    public String getSickVillageName() {
        return sickVillageName;
    }
    public void setSickVillageName(String sickVillageName) {
        this.sickVillageName = sickVillageName;
    }
    public String getPrincipalCode() {
        return principalCode;
    }

+ 1 - 2
sql/init.sql

@ -155,8 +155,6 @@ CREATE TABLE `base_patient` (
  `patient_status` varchar(100) DEFAULT NULL COMMENT '用户状态:1正常,0禁用,-1恶意注册,2审核中',
  `mobile_remarks` varchar(200) DEFAULT NULL COMMENT '联系方式备注【基卫】',
  `openid_time` datetime DEFAULT NULL COMMENT '第一次添加open的时间',
  `sick_village` varchar(50) DEFAULT NULL COMMENT '居委会代码',
  `sick_village_name` varchar(100) DEFAULT NULL,
  `principal_code` varchar(50) DEFAULT NULL COMMENT '绑定电子社保卡主体(共济为操作人code)',
  `sicard_status` varchar(100) DEFAULT NULL COMMENT '是否绑定电子社保卡 (0否 1是)',
  `sicard_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '电子社保卡绑定时间',
@ -762,6 +760,7 @@ create table `org_tree`
  `parent_code` varchar(50) not null COMMENT '父级行政区域code',
  `code` varchar(100) DEFAULT NULL COMMENT '行政区域code',
  `name` varchar(50) not null COMMENT '行政区域名称',
  `level` varchar(50) not null COMMENT '节点所在层级(即有几个父亲)',
  primary key (id)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构区域树形结构';

+ 25 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/doctor/BaseDoctorDao.java

@ -1,10 +1,15 @@
package com.yihu.jw.base.dao.doctor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import java.awt.print.Pageable;
import java.util.List;
import java.util.Map;
/**
 * 
 * 医生基础信息 数据库访问层
@ -18,4 +23,24 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 * @since 1.
 */
public interface BaseDoctorDao extends PagingAndSortingRepository<BaseDoctorDO, String>, JpaSpecificationExecutor<BaseDoctorDO>  {
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and name like ?1")
    List<Map<String,Object>> queryDoctorFullInfoByName(String name, Pageable pageable);
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and name like ?1")
    List<Map<String,Object>> queryDoctorFullInfoByNameAndOrgCode(String name, String orgCode,Pageable pageable);
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and name like ?1")
    List<Map<String,Object>> queryDoctorFullInfoByNameAndDocDel(String name, String docStatus,Pageable pageable);
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and name like ?1 and orgCode = ?2")
    List<Map<String,Object>> queryDoctorFullInfoByNameAndOrgCodeAndDocDel(String name, String orgCode,String docStatus,Pageable pageable);
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and idcard like ?1")
    List<Map<String,Object>> queryDoctorFullInfoByIdcard(String idcard, Pageable pageable);
    @Query("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hospName,hos.deptName,hos.roleName,hos.jobTitleName from BaseDoctorDO doc,BaseDoctorHospitalDO hos where doc.id = hos.doctorCode and hos.del = 1 and idcard like ?1 and orgCode = ?2")
    List<Map<String,Object>> queryDoctorFullInfoByIdcardAndOrgCode(String idcard,String orgCode,Pageable pageable);
}

+ 1 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/doctor/BaseDoctorHospitalDao.java

@ -18,4 +18,5 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 * @since 1.
 */
public interface BaseDoctorHospitalDao extends PagingAndSortingRepository<BaseDoctorHospitalDO, Integer>, JpaSpecificationExecutor<BaseDoctorHospitalDO>  {
}

+ 1 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/dao/org/OrgTreeDao.java

@ -28,7 +28,6 @@ public interface OrgTreeDao extends PagingAndSortingRepository<OrgTree, Integer>
    @Query("select id as id,code as code,name as name,case del when 1 then '有效' else '失效' end as status,concat(provinceName,cityName,townName,streetName) as address from BaseOrgDO where code like ?1")
    List<Map<String,Object>> findByCode(String code, Pageable pageable);
    @Override
    List<OrgTree> findAll();
    List<OrgTree> findByLevel(Integer level);
}

+ 44 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/BaseDoctorEndpoint.java

@ -102,14 +102,14 @@ public class BaseDoctorEndpoint extends EnvelopRestEndpoint {
    }
    /**
     * 医生信息(基本信息 + 医院执业信息)
     * 单个医生信息(基本信息 + 医院执业信息)
     * @param orgId
     * @param doctorId
     * @return
     * @throws Exception
     */
    @PostMapping(value = BaseRequestMapping.BaseDoctor.DOCINFO)
    @ApiOperation(value = "获取列表")
    @ApiOperation(value = "获取单个医生执业信息列表")
    public Envelop doctorHosplist(
            @ApiParam(name = "orgId", value = "医院id")
            @RequestParam(value = "orgId", required = true) String orgId,
@ -119,6 +119,48 @@ public class BaseDoctorEndpoint extends EnvelopRestEndpoint {
        return success(map.toString());
    }
 /**
     * 医生信息(基本信息 + 医院执业信息)列表
     * @param name
     * @param idcard
     * @param orgCode
     * @param doctorStatus
     * @return
     * @throws Exception
     */
    @PostMapping(value = BaseRequestMapping.BaseDoctor.DOCINFO)
    @ApiOperation(value = "获取列表")
    public Envelop getDoctorFullInfolist(
            @ApiParam(name = "name", value = "医生姓名")
            @RequestParam(value = "orgId", required = true) String name,
            @ApiParam(name = "idcard", value = "医生身份证号")
            @RequestParam(value = "orgId", required = true) String idcard,
            @ApiParam(name = "orgCode", value = "医院代码")
            @RequestParam(value = "orgCode", required = true) String orgCode,
            @ApiParam(name = "doctorStatus", value = "医生是否生效")
            @RequestParam(value = "doctorId", required = true) String doctorStatus,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<Map<String,Object>> map = baseDoctorService.getDoctorFullInfo(name, idcard,orgCode,doctorStatus);
        return success(map.toString());
    }
    /**
     * 获取医生 所属机构/部门/职称/职务 树形结构数据
     * @return
     * @throws Exception
     */
    @PostMapping(value = BaseRequestMapping.BaseDoctor.docOrgTreeInfo)
    @ApiOperation(value = "获取医生所属机构树形结构数据")
    public Envelop getDoctorOrgTree() throws Exception {
        String data = baseDoctorService.getOrgTree();
        return success(data);
    }
}

+ 70 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -1,16 +1,24 @@
package com.yihu.jw.base.service.doctor;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.base.dao.doctor.BaseDoctorDao;
import com.yihu.jw.base.dao.org.OrgTreeDao;
import com.yihu.jw.base.service.org.tree.SimpleTree;
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
import com.yihu.jw.base.service.org.tree.TreeNode;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -36,6 +44,12 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
    @Autowired
    private BaseDoctorRoleDictService baseDoctorRoleDictService;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private OrgTreeDao orgTreeDao;
    /**
     * 获取医生信息
@ -69,4 +83,60 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        return resultMap;
    }
    /**
     * 获取医生信息(包括医生任职的医院相关信息)
     * @param name
     * @param idcard
     * @param orgCode
     * @param docStatus
     * @return
     */
    public List<Map<String,Object>> getDoctorFullInfo(String name,String idcard,String orgCode,String docStatus){
        List<Map<String,Object>> result = new ArrayList<>();
        StringBuilder sql = new StringBuilder();
        sql.append("select doc.id,doc.name,doc.idcard,case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,doc.del as status,hos.hosp_name,hos.dept_name,hos.role_name,hos.job_title_name from base_doctor doc,base_doctor_hospital hos where doc.id = hos.doctor_code and hos.del = 1");
        if(StringUtils.isEmpty(name) && StringUtils.isEmpty(idcard) && StringUtils.isEmpty(orgCode) && StringUtils.isEmpty(docStatus)){
           result = jdbcTemplate.queryForList(sql.toString());
        }else if(StringUtils.isEmpty(name) || StringUtils.isEmpty(idcard)){
            if (!StringUtils.isEmpty(name)) {
                sql.append(" and doc.name = '").append(idcard).append("'");
            }else{
                sql.append(" and doc.idcard = '").append(name).append("'");
            }
            if(StringUtils.isEmpty(orgCode) && !StringUtils.isEmpty(docStatus)){
                sql.append(" and doc.del = '").append(docStatus).append("'");
            }else if(!StringUtils.isEmpty(orgCode) && StringUtils.isEmpty(docStatus)){
                sql.append(" and hos.hosp_code = '").append(orgCode).append("'");
            }else{
                sql.append(" and hos.hosp_code = '").append(orgCode).append("'");
                sql.append(" and doc.del = '").append(docStatus).append("'");
            }
            result = jdbcTemplate.queryForList(sql.toString());
        }else if(StringUtils.isEmpty(orgCode)){
            sql.append(" and doc.hosp_code = '").append(orgCode).append("'");
            result = jdbcTemplate.queryForList(sql.toString());
        }else{
            sql.append(" and doc.del = '").append(docStatus).append("'");
            result = jdbcTemplate.queryForList(sql.toString());
        }
        return result;
    }
    /**
     * 构建机构区域树形结构
     * @return
     */
    public String getOrgTree(){
        List<TreeNode> treeNodes = new ArrayList<>();
        treeNodes.addAll(orgTreeDao.findByLevel(5));
        SimpleTree tree = new SimpleTree(treeNodes);
        List<SimpleTreeNode> treeNode = tree.getRoot();
        SimplePropertyPreFilter filter = new SimplePropertyPreFilter();
        filter.getExcludes().add("parent");
        filter.getExcludes().add("allChildren");
        return JSONObject.toJSONString(treeNode, filter);
    }
}

+ 7 - 15
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -1,26 +1,18 @@
package com.yihu.jw.base.service.org;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.google.gson.JsonObject;
import com.yihu.jw.base.dao.org.BaseOrgDao;
import com.yihu.jw.base.dao.org.OrgTreeDao;
import com.yihu.jw.base.dao.user.UserDao;
import com.yihu.jw.base.dao.user.UserRoleDao;
import com.yihu.jw.base.service.org.tree.SimpleTree;
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
import com.yihu.jw.base.service.org.tree.Tree;
import com.yihu.jw.base.service.org.tree.TreeNode;
import com.yihu.jw.base.service.user.UserRoleService;
import com.yihu.jw.base.service.user.UserService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.base.user.UserRoleDO;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.org.BaseOrgDO;
@ -68,19 +60,19 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        List<Map<String,Object>> result = new ArrayList<>();
        if(StringUtils.endsWithIgnoreCase("1",orgStatus)){
            if(!StringUtils.isEmpty(orgCode) ){
                result = baseOrgDao.findByCodeAndDel(orgCode,orgStatus,creatPage(page,size,sorts));
                result = baseOrgDao.findByCodeAndDel(orgCode,orgStatus,createPage(page,size,sorts));
            }else if(!StringUtils.isEmpty(orgCode)){
                result = baseOrgDao.findByNameAndDel(orgName,orgStatus,creatPage(page,size,sorts));
                result = baseOrgDao.findByNameAndDel(orgName,orgStatus,createPage(page,size,sorts));
            }else{
                result = baseOrgDao.findBaseInfoByDel(orgStatus,creatPage(page,size,sorts));
                result = baseOrgDao.findBaseInfoByDel(orgStatus,createPage(page,size,sorts));
            }
        }else{
            if(!StringUtils.isEmpty(orgCode) ){
                result = baseOrgDao.findByCode(orgCode,creatPage(page,size,sorts));
                result = baseOrgDao.findByCode(orgCode,createPage(page,size,sorts));
            }else if(!StringUtils.isEmpty(orgCode)){
                result = baseOrgDao.findByName(orgName,creatPage(page,size,sorts));
                result = baseOrgDao.findByName(orgName,createPage(page,size,sorts));
            }else{
                result = baseOrgDao.findBaseInfo(creatPage(page,size,sorts));
                result = baseOrgDao.findBaseInfo(createPage(page,size,sorts));
            }
        }
        return result;
@ -151,7 +143,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
    public String getOrgAreaTree(){
        List<TreeNode> treeNodes = new ArrayList<>();
        treeNodes.addAll(orgTreeDao.findAll());
        treeNodes.addAll(orgTreeDao.findByLevel(4));
        SimpleTree tree = new SimpleTree(treeNodes);
        List<SimpleTreeNode> treeNode = tree.getRoot();
        SimplePropertyPreFilter filter = new SimplePropertyPreFilter();

+ 10 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/OrgTree.java

@ -13,6 +13,8 @@ public class OrgTree extends IntegerIdentityEntity implements TreeNode {
    private String code;
    private String parentCode;
    private String name;
    //当前树节点所在层级,例如省在第一级,用0表示
    private Integer level;
    public OrgTree(){}
    public OrgTree(String code, String parentCode, String name){
@ -68,4 +70,12 @@ public class OrgTree extends IntegerIdentityEntity implements TreeNode {
        this.name = name;
    }
    @Column(name = "name", nullable = false)
    public Integer getLevel() {
        return level;
    }
    public void setLevel(Integer level) {
        this.level = level;
    }
}

+ 31 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/OrgTreeService.java

@ -0,0 +1,31 @@
package com.yihu.jw.base.service.org;
import com.yihu.jw.base.dao.org.OrgTreeDao;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 
 * 机构信息服务service
 * 
 * @version 
 * <pre>
 * Author	Version		Date		Changes
 * litaohong    1.0  2018年10月15日 Created
 *
 * </pre>
 * @since 1.
 */
@Service
public class OrgTreeService extends BaseJpaService<OrgTree, OrgTreeDao> {
    @Autowired
    private OrgTreeDao orgTreeDao;
    public void addOrgTreeNode(BaseOrgDO baseOrgDO){
//        if(){}
    }
}

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/patient/BasePatientService.java

@ -60,14 +60,14 @@ public class BasePatientService extends BaseJpaService<BasePatientDO, BasePatien
    public List<Map<String,Object>> queryPatientBaseInfo(String idcard,String name,int page,int size,String sorts)throws Exception{
        List<Map<String,Object>> result = new ArrayList<>();
        if(!StringUtils.isEmpty(idcard)){
            result = basePatientDao.findByIdcard("%"+idcard+"%",creatPage(page,size,sorts));
            result = basePatientDao.findByIdcard("%"+idcard+"%",createPage(page,size,sorts));
            return result;
        }
        if(!StringUtils.isEmpty(name)){
            result = basePatientDao.findByName(idcard,creatPage(page,size,sorts));
            result = basePatientDao.findByName(idcard,createPage(page,size,sorts));
            return result;
        }
        result = basePatientDao.findBaseInfo(creatPage(page,size,sorts));
        result = basePatientDao.findBaseInfo(createPage(page,size,sorts));
        return result;
    }
}

+ 6 - 6
svr/svr-base/src/main/java/com/yihu/jw/base/service/system/SystemDictService.java

@ -84,21 +84,21 @@ public class SystemDictService extends BaseJpaService<SystemDictDO, SystemDictDa
        JSONArray jsonArray = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        if (SystemDictEnum.Icd10Dict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictIcd10Service.queryAll(userId, creatPage(page,size,sorts));
            jsonObject = dictIcd10Service.queryAll(userId, createPage(page,size,sorts));
        } else if (SystemDictEnum.HospitalDeptDict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictHospitalDeptService.queryAll("", creatPage(page,size,sorts));
            jsonObject = dictHospitalDeptService.queryAll("", createPage(page,size,sorts));
        } else if (SystemDictEnum.JobTitleDict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictJobTitleService.queryAll("", creatPage(page,size,sorts));
            jsonObject = dictJobTitleService.queryAll("", createPage(page,size,sorts));
        } else if (SystemDictEnum.HealthProblemDict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictHealthProblemService.queryAll("", creatPage(page,size,sorts));
            jsonObject = dictHealthProblemService.queryAll("", createPage(page,size,sorts));
        } else if (SystemDictEnum.MedicineDict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictMedicineService.queryAll("", creatPage(page,size,sorts));
            jsonObject = dictMedicineService.queryAll("", createPage(page,size,sorts));
        } else if (SystemDictEnum.DiseaseDict == SystemDictEnum.valueOf(type)) {
            jsonObject = dictDiseaseService.queryAll("", creatPage(page,size,sorts));
            jsonObject = dictDiseaseService.queryAll("", createPage(page,size,sorts));
        }
        jsonArray.add(jsonObject);
        return jsonArray;