通过机构ID查询机构名称
This commit is contained in:
@@ -12,4 +12,14 @@ import com.openhis.administration.domain.Organization;
|
||||
*/
|
||||
public interface IOrganizationService extends IService<Organization> {
|
||||
Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize);
|
||||
|
||||
|
||||
/**
|
||||
* 通过机构ID查询机构名称
|
||||
*
|
||||
* @param code 机构ID
|
||||
* @return 机构名称
|
||||
*/
|
||||
Organization getByCode(String code);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -50,4 +51,18 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
return organizationPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过机构ID查询机构名称
|
||||
*
|
||||
* @param code 机构ID
|
||||
* @return 机构名称
|
||||
*/
|
||||
@Override
|
||||
public Organization getByCode(String code) {
|
||||
QueryWrapper<Organization> queryWrapper = new QueryWrapper<>();
|
||||
//设置查询条件为机构Id code
|
||||
queryWrapper.eq("code", code);
|
||||
return organizationMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user