72.系统管理--》基础数据-》科室管理

This commit is contained in:
ljj
2025-12-05 13:39:23 +08:00
parent 29e7f0937b
commit 8a9a622aeb
9 changed files with 258 additions and 82 deletions

View File

@@ -100,7 +100,18 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
@Override
public R<?> getOrgInfo(Long orgId) {
Organization organization = organizationService.getById(orgId);
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
if (organization == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息"}));
}
// 转换为DTO对象确保数据格式一致
OrganizationDto organizationDto = new OrganizationDto();
BeanUtils.copyProperties(organization, organizationDto);
organizationDto.setTypeEnum_dictText(EnumUtils.getInfoByValue(OrganizationType.class, organizationDto.getTypeEnum()));
organizationDto.setClassEnum_dictText(EnumUtils.getInfoByValue(OrganizationClass.class, organizationDto.getClassEnum()));
organizationDto.setActiveFlag_dictText(EnumUtils.getInfoByValue(AccountStatus.class, organizationDto.getActiveFlag()));
return R.ok(organizationDto, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
}
/**

View File

@@ -60,4 +60,16 @@ public class OrganizationDto {
/** 子集合 */
private List<OrganizationDto> children = new ArrayList<>();
/** 挂号科室标记 */
private Integer registerFlag;
/** 科室位置 */
private String location;
/** 科室简介 */
private String intro;
/** 备注 */
private String remark;
}

View File

@@ -77,4 +77,16 @@ public class Organization extends HisBaseEntity {
/** 默认挂号医生 */
private Long defDoctorId;
/** 挂号科室标记 */
private Integer registerFlag;
/** 科室位置 */
private String location;
/** 科室简介 */
private String intro;
/** 备注 */
private String remark;
}

View File

@@ -3,5 +3,15 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.administration.mapper.OrganizationMapper">
<!-- 自定义selectById方法确保包含所有字段包括新增字段 -->
<select id="selectById" parameterType="java.lang.Long" resultType="com.openhis.administration.domain.Organization">
SELECT id, bus_no, name, active_flag, type_enum, class_enum, py_str, wb_str,
yb_no, yb_name, caty, display_order, medins_id, medins_admdvs,
medins_type, medins_lv, def_doctor_id, create_by, create_time,
update_by, update_time, tenant_id, delete_flag,
register_flag, location, intro, remark
FROM adm_organization
WHERE id = #{id} AND delete_flag = '0'
</select>
</mapper>