机构org

This commit is contained in:
anxin
2025-02-25 09:50:43 +08:00
parent e44ccb2e07
commit b5cf465f3d
4 changed files with 22 additions and 26 deletions

View File

@@ -22,7 +22,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
/** /**
* 机构管理(科室)controller * 机构管理controller
* *
* @author * @author
* @date 2025-02-21 * @date 2025-02-21
@@ -39,9 +39,9 @@ public class OrganizationController {
private AssignSeqUtil assignSeqUtil; private AssignSeqUtil assignSeqUtil;
/** /**
* 添加科室信息 * 添加机构信息
* *
* @param organization 科室信息 * @param organization 机构信息
*/ */
@PostMapping("/organization") @PostMapping("/organization")
public R<?> addOrganization(@Validated @RequestBody Organization organization) { public R<?> addOrganization(@Validated @RequestBody Organization organization) {
@@ -57,14 +57,14 @@ public class OrganizationController {
boolean saveOrgSuccess = organizationService.save(organization); boolean saveOrgSuccess = organizationService.save(organization);
return saveOrgSuccess return saveOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"}))
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"科室信息"})); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"}));
} }
/** /**
* 编辑科室信息 * 编辑机构信息
* *
* @param organization 科室信息 * @param organization 机构信息
*/ */
@PutMapping("/organization") @PutMapping("/organization")
public R<?> editOrganization(@Validated @RequestBody Organization organization) { public R<?> editOrganization(@Validated @RequestBody Organization organization) {
@@ -74,12 +74,12 @@ public class OrganizationController {
boolean updateOrgSuccess = organizationService.updateById(organization); boolean updateOrgSuccess = organizationService.updateById(organization);
return updateOrgSuccess return updateOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}))
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"})); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
} }
/** /**
* 删除科室信息 * 删除机构信息
* *
* @param orgId 主表id * @param orgId 主表id
*/ */
@@ -89,29 +89,29 @@ public class OrganizationController {
boolean deleteOrgSuccess = organizationService.removeById(orgId); boolean deleteOrgSuccess = organizationService.removeById(orgId);
return deleteOrgSuccess return deleteOrgSuccess
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"})) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"}))
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"})); : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息删除失败"}));
} }
/** /**
* 科室分页列表 * 机构分页列表
* *
* @param classEnum 机构分类枚举 * @param classEnum 机构分类枚举
* @param activeFlag 活动标识 * @param activeFlag 活动标识
* @param pageNo 当前页码 * @param pageNo 当前页码
* @param pageSize 查询条数 * @param pageSize 查询条数
* @param request 请求数据 * @param request 请求数据
* @return 科室分页列表 * @return 机构分页列表
*/ */
@GetMapping(value = "/organization") @GetMapping(value = "/organization")
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag, public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
// 查询【科室】分页列表 // 查询【机构】分页列表
Page<Organization> organizationPage = Page<Organization> organizationPage =
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize); organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
return R.ok(organizationPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"})); return R.ok(organizationPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
} }
} }

View File

@@ -1,15 +1,12 @@
package com.openhis.administration.domain; package com.openhis.administration.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity; import com.core.common.core.domain.HisBaseEntity;
import com.openhis.common.enums.OrganizationClass; import com.openhis.common.enums.OrganizationClass;
import com.openhis.common.enums.OrganizationType; import com.openhis.common.enums.OrganizationType;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@@ -60,5 +57,4 @@ public class Organization extends HisBaseEntity {
/** 显示顺序 */ /** 显示顺序 */
private Integer displayOrder; private Integer displayOrder;
} }

View File

@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Organization; import com.openhis.administration.domain.Organization;
/** /**
* 机构管理(科室)Service接口 * 机构管理Service接口
* *
* @author system * @author system
* @date 2025-02-21 * @date 2025-02-21

View File

@@ -13,7 +13,7 @@ import com.openhis.administration.service.IOrganizationService;
import com.openhis.common.enums.DelFlag; import com.openhis.common.enums.DelFlag;
/** /**
* 机构管理(科室)Service业务层处理 * 机构管理Service业务层处理
* *
* @author system * @author system
* @date 2025-02-21 * @date 2025-02-21
@@ -26,11 +26,11 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
/** /**
* 查询科室列表 * 查询机构列表
* *
* @param classEnum 机构分类枚举 * @param classEnum 机构分类枚举
* @param activeFlag 活动标识 * @param activeFlag 活动标识
* @return 科室列表 * @return 机构列表
*/ */
@Override @Override
public Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) { public Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) {
@@ -47,7 +47,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper); Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
// 返回科室信息列表 // 返回机构信息列表
return organizationPage; return organizationPage;
} }