Browse Source

眼科版本更改

wangzhinan 1 day ago
parent
commit
50928391eb

+ 10 - 9
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -607,27 +607,28 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        }
        //修改医生角色关联关系,医生默认可以没有角色,前端不修改就不做任何操作
        if(!CollectionUtils.isEmpty(role)){
        if(role!=null&&role.size()!=0){
            BaseDoctorRoleDO baseDoctorRoleDO = null;
            Set<Object> roleIdList = baseDoctorRoleService.findRoleIdList(baseDoctorDO.getId());
            try {
                for(int i=0;i<role.size();i++){
                    JSONObject object = role.getJSONObject(i);
                    baseDoctorRoleDO = objectMapper.readValue(object.getString("roleCode"),BaseDoctorRoleDO.class);
            for(int i=0;i<role.size();i++){
                JSONObject object = role.getJSONObject(i);
                baseDoctorRoleDO = baseDoctorRoleDao.findByDoctorCodeAndRoleCode(baseDoctorDO.getId(),object.getString("roleCode"));
                if (roleIdList!=null&&roleIdList.size()>0){
                    if(roleIdList.contains(baseDoctorRoleDO.getId())){
                        roleIdList.remove(baseDoctorRoleDO.getId());
                    }
                }
                if (baseDoctorRoleDO==null){
                    baseDoctorRoleDO = new BaseDoctorRoleDO();
                    baseDoctorRoleDO.setDel(1);
                    baseDoctorRoleDO.setRoleCode(object.getString("roleCode"));
                    baseDoctorRoleDO.setDoctorCode(baseDoctorDO.getId());
                    baseDoctorRoleService.save(baseDoctorRoleDO);
                }
            } catch (IOException e) {
                result.put("msg","convert hospital jsonObject to baseDoctorHospitalDO failed," + e.getCause());
                result.put("response",ConstantUtils.FAIL);
            }
            if(roleIdList.size() > 0){
                baseDoctorRoleService.delete(roleIdList.toArray());
            }
        }else{
            Set<Object> roleIdList = baseDoctorRoleService.findRoleIdList(baseDoctorDO.getId());
            if(roleIdList.size() > 0){

+ 4 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/service/role/WlyyUserRoleService.java

@ -34,9 +34,9 @@ public class WlyyUserRoleService extends BaseJpaService<WlyyUserRole, WlyyUserRo
    public PageEnvelop<List<Map<String,Object>>> getAdminList(String name,String idcard,String mobile,Integer page,Integer size){
        page = page>0?page-1:0;
        String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level from base_doctor doc " +
                " INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where 1=1 " ;
                " INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where 1=1 " ;
        String sqlCount = " select count(ur.id) from base_doctor doc " +
                " INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where 1=1 ";
                " INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where 1=1 ";
        String filter  = " ";
        if (StringUtils.isNotBlank(name)){
            filter += " and doc.`name`like '%"+name+"%' ";
@ -108,8 +108,8 @@ public class WlyyUserRoleService extends BaseJpaService<WlyyUserRole, WlyyUserRo
     *根据id获取权限详情
     */
    public Map<String,Object> getUserRoleById(String id){
        String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level from base_doctor doc " +
                " INNER JOIN wlyy_user_role ur on doc.id = ur.`user` INNER JOIN wlyy_role wr on ur.role = wr.`code` where ur.id='"+id+"' " ;
        String sql = " select ur.id,doc.name,doc.idcard,doc.id doctorCode,doc.mobile,ur.role,wr.code,wr.name roleName,wr.level_code from base_doctor doc " +
                " INNER JOIN wlyy_user_role ur on doc.id = ur.user_code INNER JOIN wlyy_role wr on ur.role = wr.code where ur.id='"+id+"' " ;
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if (list.size()>0){
            return list.get(0);

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

@ -435,7 +435,7 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                                    mixEnvelop.setStatus(410);
                                    mixEnvelop.setMessage(jdObject.getString("message"));
                                    return mixEnvelop;
                                }else {
                                } else {
                                    mixEnvelop = wlyyFamilyMemberService.addFamily(id, patientId, familyName, dictId, cardType, idCard, username, false, medicareType, medicare, clinicId,patientCardId);
                                }
                            }