From 10d9b7bd6f7fc0cd67e210ba3ffbd74667a56f00 Mon Sep 17 00:00:00 2001 From: duhe Date: Tue, 25 Feb 2025 09:08:04 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E7=96=BE=E7=97=85=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=89=8D=E5=8F=B0=E4=BB=A3=E7=A0=81=20up=20by=20dh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/catalog/disease/authRole.vue | 112 ++++ .../catalog/disease/components/disease.js | 84 +++ .../src/views/catalog/disease/index.vue | 558 ++++++++++++++++++ .../views/catalog/disease/profile/index.vue | 87 +++ .../catalog/disease/profile/resetPwd.vue | 57 ++ .../catalog/disease/profile/userAvatar.vue | 171 ++++++ .../catalog/disease/profile/userInfo.vue | 67 +++ 7 files changed, 1136 insertions(+) create mode 100644 openhis-ui-vue3/src/views/catalog/disease/authRole.vue create mode 100644 openhis-ui-vue3/src/views/catalog/disease/components/disease.js create mode 100644 openhis-ui-vue3/src/views/catalog/disease/index.vue create mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/index.vue create mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue create mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue create mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue diff --git a/openhis-ui-vue3/src/views/catalog/disease/authRole.vue b/openhis-ui-vue3/src/views/catalog/disease/authRole.vue new file mode 100644 index 00000000..0b5c14bc --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/authRole.vue @@ -0,0 +1,112 @@ + + + diff --git a/openhis-ui-vue3/src/views/catalog/disease/components/disease.js b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js new file mode 100644 index 00000000..3f947607 --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js @@ -0,0 +1,84 @@ +import request from '@/utils/request' +import { parseStrEmpty } from "@/utils/openhis"; + +// 查询病种目录列表 +export function getDiseaseList(query) { + return request({ + url: '/datadictionary/disease/information-page', + method: 'get', + params: query + }) +} + +// 查询病种目录详细 +export function getDiseaseOne(id) { + return request({ + url: '/datadictionary/disease/information-one', + method: 'get', + params: id + }) +} + +// 新增病种目录 +export function addDisease(data) { + return request({ + url: '/datadictionary/disease/information', + method: 'post', + data: data + }) +} + +// 修改病种目录 +export function editDisease(data) { + return request({ + url: '/datadictionary/disease/information', + method: 'put', + data: data + }) +} + +// 删除病种目录 +export function delUser(userId) { + return request({ + url: '/system/user/' + userId, + method: 'delete' + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, status) { + const data = { + userId, + status + } + return request({ + url: '/system/user/changeStatus', + method: 'put', + data: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 查询部门下拉树结构 +export function deptTreeSelect() { + return request({ + url: '/system/user/deptTree', + method: 'get' + }) +} diff --git a/openhis-ui-vue3/src/views/catalog/disease/index.vue b/openhis-ui-vue3/src/views/catalog/disease/index.vue new file mode 100644 index 00000000..2c5bed27 --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/index.vue @@ -0,0 +1,558 @@ + + + diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue new file mode 100644 index 00000000..5851f05d --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue @@ -0,0 +1,87 @@ + + + diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue new file mode 100644 index 00000000..96daef39 --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue @@ -0,0 +1,57 @@ + + + diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue new file mode 100644 index 00000000..3b39636c --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue new file mode 100644 index 00000000..a5e1c773 --- /dev/null +++ b/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue @@ -0,0 +1,67 @@ + + + From e44ccb2e079cf438c921f82dfe8e623e1d5fa938 Mon Sep 17 00:00:00 2001 From: anxin Date: Tue, 25 Feb 2025 09:21:29 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=9C=BA=E6=9E=84org=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OrganizationController.java | 18 +++++++++--------- .../service/impl/OrganizationServiceImpl.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java index 5b9a8c25..eb0e723b 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java @@ -54,11 +54,11 @@ public class OrganizationController { String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix()); organization.setBus_no(code); - boolean saveOrganizationSuccess = organizationService.save(organization); + boolean saveOrgSuccess = organizationService.save(organization); - return saveOrganizationSuccess + return saveOrgSuccess ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"})) - : R.fail(PromptMsgConstant.Common.M00007, null); + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"科室信息"})); } /** @@ -72,10 +72,10 @@ public class OrganizationController { // Organization organization = new Organization(); // BeanUtils.copyProperties(organizationdto, organization); - boolean updateSuccess = organizationService.updateById(organization); - return updateSuccess + boolean updateOrgSuccess = organizationService.updateById(organization); + return updateOrgSuccess ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"})) - : R.fail(PromptMsgConstant.Common.M00007, null); + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"})); } /** @@ -86,9 +86,9 @@ public class OrganizationController { @DeleteMapping("/organization") public R deleteSupplyRequest(@RequestParam Long orgId) { - boolean deleteSuccess = organizationService.removeById(orgId); + boolean deleteOrgSuccess = organizationService.removeById(orgId); - return deleteSuccess + return deleteOrgSuccess ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"})) : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"})); } @@ -111,7 +111,7 @@ public class OrganizationController { // 查询【科室】分页列表 Page organizationPage = organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize); - return R.ok(organizationPage); + return R.ok(organizationPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"})); } } diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java index c60b593c..4689cbf1 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java @@ -42,7 +42,7 @@ public class OrganizationServiceImpl extends ServiceImpl organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper); From b5cf465f3d1e6d1665966b357afac98d96d05900 Mon Sep 17 00:00:00 2001 From: anxin Date: Tue, 25 Feb 2025 09:50:43 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=9C=BA=E6=9E=84org?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OrganizationController.java | 32 +++++++++---------- .../administration/domain/Organization.java | 6 +--- .../service/IOrganizationService.java | 2 +- .../service/impl/OrganizationServiceImpl.java | 8 ++--- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java index eb0e723b..3521f44b 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java @@ -22,7 +22,7 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; /** - * 机构管理(科室)controller + * 机构管理controller * * @author * @date 2025-02-21 @@ -39,9 +39,9 @@ public class OrganizationController { private AssignSeqUtil assignSeqUtil; /** - * 添加科室信息 + * 添加机构信息 * - * @param organization 科室信息 + * @param organization 机构信息 */ @PostMapping("/organization") public R addOrganization(@Validated @RequestBody Organization organization) { @@ -57,14 +57,14 @@ public class OrganizationController { boolean saveOrgSuccess = organizationService.save(organization); return saveOrgSuccess - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"科室信息"})); + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"})); } /** - * 编辑科室信息 + * 编辑机构信息 * - * @param organization 科室信息 + * @param organization 机构信息 */ @PutMapping("/organization") public R editOrganization(@Validated @RequestBody Organization organization) { @@ -74,12 +74,12 @@ public class OrganizationController { boolean updateOrgSuccess = organizationService.updateById(organization); return updateOrgSuccess - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"科室信息"})); + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"})); } /** - * 删除科室信息 + * 删除机构信息 * * @param orgId 主表id */ @@ -89,29 +89,29 @@ public class OrganizationController { boolean deleteOrgSuccess = organizationService.removeById(orgId); return deleteOrgSuccess - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"})); + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息删除失败"})); } /** - * 科室分页列表 + * 机构分页列表 * * @param classEnum 机构分类枚举 * @param activeFlag 活动标识 * @param pageNo 当前页码 * @param pageSize 查询条数 * @param request 请求数据 - * @return 科室分页列表 + * @return 机构分页列表 */ @GetMapping(value = "/organization") public R getOrganizationPage(Integer classEnum, Integer activeFlag, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { - // 查询【科室】分页列表 + // 查询【机构】分页列表 Page organizationPage = 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[] {"机构信息"})); } } diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java index 474103d6..5a7f7c00 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java @@ -1,15 +1,12 @@ package com.openhis.administration.domain; -import java.math.BigDecimal; -import java.util.Date; - import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; - import com.core.common.core.domain.HisBaseEntity; import com.openhis.common.enums.OrganizationClass; import com.openhis.common.enums.OrganizationType; + import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -60,5 +57,4 @@ public class Organization extends HisBaseEntity { /** 显示顺序 */ private Integer displayOrder; - } diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java index d23c4342..17de0231 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.openhis.administration.domain.Organization; /** - * 机构管理(科室)Service接口 + * 机构管理Service接口 * * @author system * @date 2025-02-21 diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java index 4689cbf1..37692db3 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java @@ -13,7 +13,7 @@ import com.openhis.administration.service.IOrganizationService; import com.openhis.common.enums.DelFlag; /** - * 机构管理(科室)Service业务层处理 + * 机构管理Service业务层处理 * * @author system * @date 2025-02-21 @@ -26,11 +26,11 @@ public class OrganizationServiceImpl extends ServiceImpl getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) { @@ -47,7 +47,7 @@ public class OrganizationServiceImpl extends ServiceImpl organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper); - // 返回科室信息列表 + // 返回机构信息列表 return organizationPage; } From ede41782b4f8811c6031c7b24710ffecac222171 Mon Sep 17 00:00:00 2001 From: duhe Date: Tue, 25 Feb 2025 10:56:05 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E7=96=BE=E7=97=85=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0=20up=20by=20dh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/catalog/disease/authRole.vue | 112 ------------ .../catalog/disease/components/disease.js | 19 +- .../src/views/catalog/disease/index.vue | 29 ++- .../views/catalog/disease/profile/index.vue | 87 --------- .../catalog/disease/profile/resetPwd.vue | 57 ------ .../catalog/disease/profile/userAvatar.vue | 171 ------------------ .../catalog/disease/profile/userInfo.vue | 67 ------- 7 files changed, 16 insertions(+), 526 deletions(-) delete mode 100644 openhis-ui-vue3/src/views/catalog/disease/authRole.vue delete mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/index.vue delete mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue delete mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue delete mode 100644 openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue diff --git a/openhis-ui-vue3/src/views/catalog/disease/authRole.vue b/openhis-ui-vue3/src/views/catalog/disease/authRole.vue deleted file mode 100644 index 0b5c14bc..00000000 --- a/openhis-ui-vue3/src/views/catalog/disease/authRole.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/openhis-ui-vue3/src/views/catalog/disease/components/disease.js b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js index 3f947607..9d8fe7d9 100644 --- a/openhis-ui-vue3/src/views/catalog/disease/components/disease.js +++ b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js @@ -45,23 +45,10 @@ export function delUser(userId) { }) } -// 用户状态修改 -export function changeUserStatus(userId, status) { - const data = { - userId, - status - } +// 病种目录分类查询 +export function getDiseaseCategory() { return request({ - url: '/system/user/changeStatus', - method: 'put', - data: data - }) -} - -// 查询用户个人信息 -export function getUserProfile() { - return request({ - url: '/system/user/profile', + url: '/datadictionary/disease/information-category', method: 'get' }) } diff --git a/openhis-ui-vue3/src/views/catalog/disease/index.vue b/openhis-ui-vue3/src/views/catalog/disease/index.vue index 2c5bed27..a63201c0 100644 --- a/openhis-ui-vue3/src/views/catalog/disease/index.vue +++ b/openhis-ui-vue3/src/views/catalog/disease/index.vue @@ -12,9 +12,9 @@ style="margin-bottom: 20px" /> --> -
+ @@ -282,20 +282,16 @@ diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue deleted file mode 100644 index 5851f05d..00000000 --- a/openhis-ui-vue3/src/views/catalog/disease/profile/index.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue deleted file mode 100644 index 96daef39..00000000 --- a/openhis-ui-vue3/src/views/catalog/disease/profile/resetPwd.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue deleted file mode 100644 index 3b39636c..00000000 --- a/openhis-ui-vue3/src/views/catalog/disease/profile/userAvatar.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - - \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue b/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue deleted file mode 100644 index a5e1c773..00000000 --- a/openhis-ui-vue3/src/views/catalog/disease/profile/userInfo.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - From 10b44933ab4e74af15c0078420255cb7111b5175 Mon Sep 17 00:00:00 2001 From: "Zhang.WH" Date: Tue, 25 Feb 2025 11:32:50 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=B8=B8=E9=87=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/OrganizationController.java | 3 +- .../controller/ItemDefinitionController.java | 69 +++++++------- .../assembler/PurchaseInventoryAssembler.java | 75 +++++++-------- .../PurchaseInventoryController.java | 94 ++++++++----------- .../web/inventorymanage/dto/InventoryDto.java | 6 ++ .../dto/InventoryReceiptDto.java | 62 ++++-------- .../dto/InventorySearchParam.java | 27 ++++++ .../common/constant/CommonConstants.java | 44 ++++++++- .../common/constant/PromptMsgConstant.java | 52 ---------- .../common/constant/TableNameConstants.java | 14 --- .../openhis/common/utils/HisQueryUtils.java | 37 ++++---- .../administration/domain/Organization.java | 6 +- .../service/IOrganizationService.java | 3 +- .../service/impl/OrganizationServiceImpl.java | 8 +- .../workflow/domain/SupplyRequest.java | 7 +- 15 files changed, 229 insertions(+), 278 deletions(-) delete mode 100644 openhis-server/openhis-common/src/main/java/com/openhis/common/constant/PromptMsgConstant.java delete mode 100644 openhis-server/openhis-common/src/main/java/com/openhis/common/constant/TableNameConstants.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java index 5b9a8c25..1ed94d2e 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/basedatamanage/controller/OrganizationController.java @@ -52,7 +52,7 @@ public class OrganizationController { // 基础采番 String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix()); - organization.setBus_no(code); + organization.setBusNo(code); boolean saveOrganizationSuccess = organizationService.save(organization); @@ -86,6 +86,7 @@ public class OrganizationController { @DeleteMapping("/organization") public R deleteSupplyRequest(@RequestParam Long orgId) { + // 在service层做业务校验 boolean deleteSuccess = organizationService.removeById(orgId); return deleteSuccess diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java index 13c1469c..7158d085 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java @@ -10,8 +10,6 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; -import com.core.common.enums.AssignSeqEnum; -import com.core.common.utils.AssignSeqUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -19,7 +17,9 @@ import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; +import com.core.common.enums.AssignSeqEnum; import com.core.common.enums.DefinitionTypeEnum; +import com.core.common.utils.AssignSeqUtil; import com.core.common.utils.MessageUtils; import com.core.common.utils.bean.BeanUtils; import com.openhis.administration.domain.ChargeItemDefApp; @@ -51,12 +51,12 @@ public class ItemDefinitionController { private IChargeItemDefAppService chargeItemDefAppService; @Autowired(required = false) private ChargeItemDefSearchMapper chargeItemDefSearchMapper; -// @Autowired(required = false) -// private IMedicationDefinitionService medicationDefinitionService; -// @Autowired(required = false) -// private IDeviceDefinitionService deviceDefinitionService; -// @Autowired(required = false) -// private IActivityDefinitionService activityDefinitionService; + // @Autowired(required = false) + // private IMedicationDefinitionService medicationDefinitionService; + // @Autowired(required = false) + // private IDeviceDefinitionService deviceDefinitionService; + // @Autowired(required = false) + // private IActivityDefinitionService activityDefinitionService; @Autowired(required = false) private AssignSeqUtil assignSeqUtil; @@ -133,10 +133,10 @@ public class ItemDefinitionController { } // 通过 DefinitionType 区分药品定价/器具定价/手术定价 if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) { - //获取定价列表 + // 获取定价列表 chargeItemDefinitionList = chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, skipCount); - //设置分页条件 + // 设置分页条件 chargeItemDefinitionPage.setSize(pageSize); chargeItemDefinitionPage.setCurrent(pageNo); if (chargeItemDefinitionList.size() > 0) { @@ -146,13 +146,12 @@ public class ItemDefinitionController { chargeItemDefinitionPage.setTotal(0); chargeItemDefinitionPage.setRecords(new ArrayList<>()); } - return R.ok(chargeItemDefinitionPage, - MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); } else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) { - //获取定价列表 + // 获取定价列表 chargeItemDefinitionList = chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, skipCount); - //设置分页条件 + // 设置分页条件 chargeItemDefinitionPage.setSize(pageSize); chargeItemDefinitionPage.setCurrent(pageNo); if (chargeItemDefinitionList.size() > 0) { @@ -162,13 +161,12 @@ public class ItemDefinitionController { chargeItemDefinitionPage.setTotal(0); chargeItemDefinitionPage.setRecords(new ArrayList<>()); } - return R.ok(chargeItemDefinitionPage, - MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); } else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) { - //获取定价列表 + // 获取定价列表 chargeItemDefinitionList = chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, skipCount); - //设置分页条件 + // 设置分页条件 chargeItemDefinitionPage.setSize(pageSize); chargeItemDefinitionPage.setCurrent(pageNo); if (chargeItemDefinitionList.size() > 0) { @@ -178,8 +176,7 @@ public class ItemDefinitionController { chargeItemDefinitionPage.setTotal(0); chargeItemDefinitionPage.setRecords(new ArrayList<>()); } - return R.ok(chargeItemDefinitionPage, - MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); } else { return R.ok(new Page<>(), MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); } @@ -220,34 +217,34 @@ public class ItemDefinitionController { // 基础采番 String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix()); // 控制长度采番(seqLength: 总长度) - String code1 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(),8); + String code1 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8); // 控制长度批量采番 - List code2 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(),8,3); + List code2 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8, 3); // 获取编号 Integer code3 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix()); // 批量获取编号 - List code4 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix(),3); + List code4 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix(), 3); // 每日采番 String code5 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix()); // 每日按长度采番(seqLength: 日期后的数字位数) - String code6 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(),8); + String code6 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8); // 每日批量采番 - List code7 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(),8,3); + List code7 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8, 3); // 每日获取编号 Integer code8 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix()); // 每日批量获取编号 - List code9 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix(),3); + List code9 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix(), 3); Map map = new HashMap<>(); - map.put("code",code); - map.put("code1",code1); - map.put("code2",code2); - map.put("code3",code3); - map.put("code4",code4); - map.put("code5",code5); - map.put("code6",code6); - map.put("code7",code7); - map.put("code8",code8); - map.put("code9",code9); + map.put("code", code); + map.put("code1", code1); + map.put("code2", code2); + map.put("code3", code3); + map.put("code4", code4); + map.put("code5", code5); + map.put("code6", code6); + map.put("code7", code7); + map.put("code8", code8); + map.put("code9", code9); return R.ok(map); } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/assembler/PurchaseInventoryAssembler.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/assembler/PurchaseInventoryAssembler.java index c52564b4..2a5f0c0e 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/assembler/PurchaseInventoryAssembler.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/assembler/PurchaseInventoryAssembler.java @@ -3,17 +3,6 @@ */ package com.openhis.web.inventorymanage.assembler; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.stream.Collectors; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.openhis.administration.domain.Patient; -import com.openhis.medication.domain.Medication; -import com.openhis.web.inventorymanage.dto.InventoryReceiptDto; -import com.openhis.workflow.domain.SupplyRequest; - /** * 采购入库相关dto转换器 * @@ -30,36 +19,36 @@ public class PurchaseInventoryAssembler { * @param patientList【患者管理Entity实体】列表 * @return 【入库单据分页列表DTO】分页 */ - public static Page assembleInventoryReceiptDto(Page supplyRequestPage, - List medicationList, List patientList) { - - // 将查询到的【药品基本信息管理】列表,作成以ID为Key的Map - Map medicationMap = - medicationList.stream().collect(Collectors.toMap(Medication::getId, Function.identity())); - - // 将查询到的【患者管理】列表,作成以ID为Key的Map - Map patientMap = - patientList.stream().collect(Collectors.toMap(Patient::getId, Function.identity())); - - // 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】 - Page returnPage = - new Page<>(supplyRequestPage.getCurrent(), supplyRequestPage.getSize(), supplyRequestPage.getTotal()); - - // 将【供应申请管理】的分页转化为返回【入库单据分页列表DTO】的分页 - returnPage.setRecords(supplyRequestPage.getRecords().stream().map(entity -> { - // 定义【入库单据分页列表DTO】 - InventoryReceiptDto dto = new InventoryReceiptDto(); - // 从主表COPY需要的字段 - dto.setId(entity.getId()); - dto.setCategoryEnum(1); - // 从【药品基本信息管理】Map取值,设置【药品基本信息管理】返回实体 - dto.setMedication(medicationMap.getOrDefault(entity.getDispenseId(), null)); - // 从【患者管理】Map取值,设置【患者管理】返回实体 - dto.setPatient(patientMap.getOrDefault(entity.getPatientId(), null)); - return dto; - }).collect(Collectors.toList())); - - // 返回【入库单据分页列表DTO】分页 - return returnPage; - } + // public static Page assembleInventoryReceiptDto(Page supplyRequestPage, + // List medicationList, List patientList) { + // + // // 将查询到的【药品基本信息管理】列表,作成以ID为Key的Map + // Map medicationMap = + // medicationList.stream().collect(Collectors.toMap(Medication::getId, Function.identity())); + // + // // 将查询到的【患者管理】列表,作成以ID为Key的Map + // Map patientMap = + // patientList.stream().collect(Collectors.toMap(Patient::getId, Function.identity())); + // + // // 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】 + // Page returnPage = + // new Page<>(supplyRequestPage.getCurrent(), supplyRequestPage.getSize(), supplyRequestPage.getTotal()); + // + // // 将【供应申请管理】的分页转化为返回【入库单据分页列表DTO】的分页 + // returnPage.setRecords(supplyRequestPage.getRecords().stream().map(entity -> { + // // 定义【入库单据分页列表DTO】 + // InventoryReceiptDto dto = new InventoryReceiptDto(); + // // 从主表COPY需要的字段 + // dto.setId(entity.getId()); + // dto.setCategoryEnum(1); + // // 从【药品基本信息管理】Map取值,设置【药品基本信息管理】返回实体 + // dto.setMedication(medicationMap.getOrDefault(entity.getDispenseId(), null)); + // // 从【患者管理】Map取值,设置【患者管理】返回实体 + // dto.setPatient(patientMap.getOrDefault(entity.getPatientId(), null)); + // return dto; + // }).collect(Collectors.toList())); + // + // // 返回【入库单据分页列表DTO】分页 + // return returnPage; + // } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java index 7c8bc7fa..4f92b975 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/controller/PurchaseInventoryController.java @@ -3,8 +3,7 @@ */ package com.openhis.web.inventorymanage.controller; -import java.util.List; -import java.util.stream.Collectors; +import java.util.HashSet; import javax.servlet.http.HttpServletRequest; @@ -13,27 +12,27 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; import com.core.common.utils.MessageUtils; import com.core.common.utils.bean.BeanUtils; import com.openhis.administration.domain.ChargeItem; import com.openhis.administration.domain.Location; -import com.openhis.administration.domain.Patient; import com.openhis.administration.service.IChargeItemService; import com.openhis.administration.service.ILocationService; import com.openhis.administration.service.IPatientService; import com.openhis.administration.service.ISupplierService; +import com.openhis.common.constant.CommonConstants; import com.openhis.common.constant.PromptMsgConstant; -import com.openhis.medication.domain.Medication; +import com.openhis.common.utils.HisQueryUtils; import com.openhis.medication.service.IMedicationService; -import com.openhis.web.inventorymanage.assembler.PurchaseInventoryAssembler; import com.openhis.web.inventorymanage.dto.InventoryDto; import com.openhis.web.inventorymanage.dto.InventoryReceiptInitDto; import com.openhis.web.inventorymanage.dto.InventorySearchParam; import com.openhis.web.inventorymanage.dto.SaveInventoryReceiptDto; import com.openhis.workflow.domain.SupplyRequest; +import com.openhis.workflow.mapper.SupplyRequestMapper; import com.openhis.workflow.service.ISupplyRequestService; import lombok.extern.slf4j.Slf4j; @@ -61,6 +60,8 @@ public class PurchaseInventoryController { private ISupplierService supplierService; @Autowired private ILocationService locationService; + @Autowired + private SupplyRequestMapper supplyRequestMapper; @GetMapping(value = "/init") public R init() { @@ -81,14 +82,43 @@ public class PurchaseInventoryController { // 3.practitioner_role与practitioner联查获取对应location的管理员列表 // 4.查询选定对应药品类型的药品信息列表 + /** + * 入库单据列表 + * + * @param inventorySearchParam 查询条件 + * @param pageNo 当前页码 + * @param pageSize 查询条数 + * @param searchKey 模糊查询关键字 + * @param request 请求数据 + * @return 入库单据分页列表 + */ + @GetMapping(value = "/inventory-receipt-page") + public R getPage(InventorySearchParam inventorySearchParam, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, + @RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) { + + // 设置模糊查询的字段名 + HashSet searchFields = new HashSet<>(); + searchFields.add(CommonConstants.FieldName.BusNo); + + // 构建查询条件 + QueryWrapper queryWrapper = + HisQueryUtils.buildQueryWrapper(inventorySearchParam, searchKey, searchFields, request); + + // Page inventoryReceiptPage= supplyRequestService.page(new + // Page<>(pageNo,pageSize),queryWrapper); + return R.ok(); + } + /** * 添加入库单据(生成供应请求) * - * @param inventoryDto 供应请求信息 + * @param inventoryDto 入库单据 */ @PostMapping("/inventory-receipt") - public R addSupplyRequest(@Validated @RequestBody InventoryDto inventoryDto) { - // 生成待发送的入库单据supply_request + public R addInventoryReceipt(@Validated @RequestBody InventoryDto inventoryDto) { + // 生成待发送的入库单据 SupplyRequest supplyRequest = new SupplyRequest(); BeanUtils.copyProperties(inventoryDto, supplyRequest); // 如果业务上不需要其它处理 直接调用service的保存方法 @@ -120,7 +150,7 @@ public class PurchaseInventoryController { * @param saveInventoryReceiptDto 供应请求信息 */ @PutMapping("/inventory-receipt") - public R editSupplyRequest(@Validated @RequestBody SaveInventoryReceiptDto saveInventoryReceiptDto) { + public R editInventoryReceipt(@Validated @RequestBody SaveInventoryReceiptDto saveInventoryReceiptDto) { // 更新supply_request信息 SupplyRequest saveRequest = new SupplyRequest(); BeanUtils.copyProperties(saveInventoryReceiptDto, saveRequest); @@ -140,7 +170,7 @@ public class PurchaseInventoryController { * @param supplyRequestId 主表id */ @DeleteMapping("/inventory-receipt") - public R deleteSupplyRequest(@RequestParam Long supplyRequestId) { + public R deleteInventoryReceipt(@RequestParam Long supplyRequestId) { // 全都是逻辑删除 boolean deleteSuccess = supplyRequestService.removeById(supplyRequestId); @@ -155,48 +185,6 @@ public class PurchaseInventoryController { return deleteChargeItemSuccess ? R.ok() : R.fail(); } - /** - * 入库单据详情列表 - * - * @param inventorySearchParam 查询条件 - * @param pageNo 当前页码 - * @param pageSize 查询条数 - * @param request 请求数据 - * @return 入库单据分页列表 - */ - @GetMapping(value = "/inventory-receipt-page") - public R getDetailPage(InventorySearchParam inventorySearchParam, - @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { - - // 查询条件初始化 - Medication medication = new Medication(); - BeanUtils.copyProperties(inventorySearchParam, medication); - - SupplyRequest supplyRequest = new SupplyRequest(); - BeanUtils.copyProperties(inventorySearchParam, supplyRequest); - - // 获取供应请求信息 - - // ==================================================================================== - - // 查询【供应申请管理】分页列表 - Page supplyRequestPage = supplyRequestService.getPage(supplyRequest, pageNo, pageSize); - - // 根据【发放id】查询【药品基本信息管理】列表 - List medicationList = medicationService.listByIds( - supplyRequestPage.getRecords().stream().map(SupplyRequest::getDispenseId).collect(Collectors.toList())); - - // 根据【患者id】查询【患者管理】列表 - List patientList = patientService.listByIds( - supplyRequestPage.getRecords().stream().map(SupplyRequest::getPatientId).collect(Collectors.toList())); - - // 装配并返回【入库单据分页列表DTO】分页 - return R - .ok(PurchaseInventoryAssembler.assembleInventoryReceiptDto(supplyRequestPage, medicationList, patientList)); - - } - /** * 单据提交申请 * diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryDto.java index 845efe15..680933b1 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryDto.java @@ -6,10 +6,15 @@ package com.openhis.web.inventorymanage.dto; import java.math.BigDecimal; import java.util.Date; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + import lombok.Data; import lombok.experimental.Accessors; /** + * 入库 + * * @author ZhangYC * @date 2025-02-20 */ @@ -24,6 +29,7 @@ public class InventoryDto { private Integer itemQuantity; /** 物品编码 */ + @JsonSerialize(using = ToStringSerializer.class) private Long code; /** 物品计量单位 */ diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryReceiptDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryReceiptDto.java index bc24dc77..c0196b77 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryReceiptDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventoryReceiptDto.java @@ -8,8 +8,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.openhis.administration.domain.Patient; -import com.openhis.medication.domain.Medication; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import lombok.experimental.Accessors; @@ -24,68 +24,44 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class InventoryReceiptDto implements Serializable { + private static final long serialVersionUID = 1L; + /** ID */ @TableId(type = IdType.ASSIGN_ID) + @JsonSerialize(using = ToStringSerializer.class) private Long id; + /** 单据号 */ + private String busNo; + /** 类型 */ private Integer typeEnum; /** 状态 */ private Integer statusEnum; - /** 意图 */ - private Integer intentEnum; - /** 分类 */ private Integer categoryEnum; - /** 优先权 */ - private Integer priorityEnum; - - /** 汇总编号 */ - private Long summaryId; - - /** 交付 */ - private Long deliverId; - - /** 患者id */ - private Long patientId; - - /** 发放实体表名 */ - private String dispenseTable; - - /** 发放id */ - private Long dispenseId; - - /** 期望时间 */ - private Date occurrenceTime; - - /** 供应人 */ - private Long practitionerId; - /** 供应商 */ private Long supplierId; - /** 理由 */ - private String reason; - - /** 源仓库类型 */ - private Integer sourceType; - /** 源仓库 */ private Long sourceLocationId; - /** 源仓位 */ - private Long sourceLocationStoreId; + /** 目的仓库 */ + private Long purposeLocationId; - /** 目的类型 */ - private Integer purposeType; + /** 审批人 */ + private Long approverId; - /** 药品基本信息管理Entity实体 */ - private Medication medication; + /** 审批时间 */ + private Date approvalTime; - /** 患者管理Entity实体 */ - private Patient patient; + /** 申请人 */ + private Long applicantId; + + /** 申请时间 */ + private Date applyTime; } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventorySearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventorySearchParam.java index 565c4a9b..44017c78 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventorySearchParam.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/InventorySearchParam.java @@ -4,6 +4,9 @@ package com.openhis.web.inventorymanage.dto; import java.io.Serializable; +import java.util.Date; + +import org.hibernate.validator.constraints.Length; import lombok.Data; import lombok.experimental.Accessors; @@ -18,4 +21,28 @@ import lombok.experimental.Accessors; @Accessors(chain = true) public class InventorySearchParam implements Serializable { + /** 单据号 */ + @Length(max = 255) + private String busNo; + + /** 状态 */ + private Integer statusEnum; + + /** 分类 */ + private Integer categoryEnum; + + /** 供应商 */ + private Long supplierId; + + /** 申请开始时间 */ + private Date applyTimeStart; + + /** 申请结束时间 */ + private Date applyTimeEnd; + + /** 目的仓库 */ + private Long purposeLocationId; + + /** 申请人 */ + private Long applicantId; } diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/CommonConstants.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/CommonConstants.java index 9069daa4..98bd3628 100644 --- a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/CommonConstants.java +++ b/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/CommonConstants.java @@ -1,18 +1,52 @@ package com.openhis.common.constant; /** - * 共通常量 + * 常量 * * @author system */ public class CommonConstants { + /** - * 租户ID字段名称 + * 共同常量 */ - public static final String TENANT_ID = "tenant_id"; + public interface Common { + /** + * 租户ID字段名称 + */ + String TENANT_ID = "tenant_id"; - public static final String S_TIME = "STime"; + /** + * 开始时间(用于分页条件查询) + */ + String S_TIME = "STime"; - public static final String E_TIME = "ETime"; + /** + * 结束时间(用于分页条件查询) + */ + String E_TIME = "ETime"; + } + + /** + * 表名常量 + */ + public interface TableName { + + /** + * 服务管理 + */ + String ADM_HEALTHCARE_SERVICE = "adm_healthcare_service"; + } + + /** + * 字段名常量 + */ + public interface FieldName { + + /** + * 业务编码 + */ + String BusNo = "bus_no"; + } } diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/PromptMsgConstant.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/PromptMsgConstant.java deleted file mode 100644 index 3a76949d..00000000 --- a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/PromptMsgConstant.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.openhis.common.constant; - -/** - * APL消息ID常量类 - */ -public interface PromptMsgConstant { - - /** - * 共用 - */ - interface Common { - /** - * {0}添加成功 - */ - String M00001 = "apl.common.M00001"; - /** - * {0}保存成功 - */ - String M00002 = "apl.common.M00002"; - /** - * {0}已经存在 - */ - String M00003 = "apl.common.M00003"; - /** - * {0}操作成功 - */ - String M00004 = "apl.common.M00004"; - /** - * {0}删除成功 - */ - String M00005 = "apl.common.M00005"; - /** - * 操作失败,该数据已被他人删除,请刷新后重试 - */ - String M00006 = "apl.common.M00006"; - /** - * 操作失败,该数据已被他人更改,请刷新后重试 - */ - String M00007 = "apl.common.M00007"; - /** - * 请勿重复提交 - */ - String M00008 = "apl.common.M00008"; - /** - * 查询成功 - */ - String M00009 = "apl.common.M00009"; - - } - - -} diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/TableNameConstants.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/TableNameConstants.java deleted file mode 100644 index faa05908..00000000 --- a/openhis-server/openhis-common/src/main/java/com/openhis/common/constant/TableNameConstants.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.openhis.common.constant; - -/** - * 表名常量 - * - * @author system - */ -public class TableNameConstants { - /** - * 服务管理 - */ - public static final String ADM_HEALTHCARE_SERVICE = "adm_healthcare_service"; - -} diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java index 119913fa..a1f5ce94 100644 --- a/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java +++ b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java @@ -1,11 +1,5 @@ package com.openhis.common.utils; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.core.common.utils.DateUtils; -import com.core.common.utils.SecurityUtils; -import com.openhis.common.constant.CommonConstants; - -import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Field; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -15,6 +9,13 @@ import java.util.Date; import java.util.HashSet; import java.util.Map; +import javax.servlet.http.HttpServletRequest; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.core.common.utils.DateUtils; +import com.core.common.utils.SecurityUtils; +import com.openhis.common.constant.CommonConstants; + /** * His查询工具类 */ @@ -23,16 +24,17 @@ public class HisQueryUtils { /** * 条件查询构造器 * - * @param entity 传参实体 - * @param searchKey 模糊查询关键字 + * @param entity 传参实体 + * @param searchKey 模糊查询关键字 * @param searchFields 支持模糊查询的字段集合 ; 不需要模糊查询传 null 即可 - * @param request 请求 + * @param request 请求 * @return 构造条件 */ - public static QueryWrapper buildQueryWrapper(T entity, String searchKey, HashSet searchFields, HttpServletRequest request) { + public static QueryWrapper buildQueryWrapper(T entity, String searchKey, HashSet searchFields, + HttpServletRequest request) { QueryWrapper queryWrapper = new QueryWrapper<>(); // 添加租户id查询条件 - queryWrapper.eq(CommonConstants.TENANT_ID, getCurrentTenantId()); + queryWrapper.eq(CommonConstants.Common.TENANT_ID, getCurrentTenantId()); if (entity == null) { return queryWrapper; } @@ -43,7 +45,7 @@ public class HisQueryUtils { try { Object value = field.get(entity); if (value != null && !value.toString().equals("")) { - //String fieldName = field.getName(); + // String fieldName = field.getName(); // 将驼峰命名的字段名转换为下划线命名的数据库字段名 String fieldName = camelToUnderline(field.getName()); // 处理等于条件 @@ -68,14 +70,15 @@ public class HisQueryUtils { for (Map.Entry entry : parameterMap.entrySet()) { String paramName = entry.getKey(); // 检查参数名是否以 "STime" 或 "ETime" 结尾 - if (paramName.endsWith(CommonConstants.S_TIME) || paramName.endsWith(CommonConstants.E_TIME)) { + if (paramName.endsWith(CommonConstants.Common.S_TIME) + || paramName.endsWith(CommonConstants.Common.E_TIME)) { // 提取字段名(去掉 "STime" 或 "ETime" 后缀) String fieldName = paramName.substring(0, paramName.length() - 5); // 驼峰转下划线 String dbFieldName = camelToUnderline(fieldName); // 获取对应的 STime 和 ETime 值 - String startValue = getParameterValue(request, fieldName + CommonConstants.S_TIME); - String endValue = getParameterValue(request, fieldName + CommonConstants.E_TIME); + String startValue = getParameterValue(request, fieldName + CommonConstants.Common.S_TIME); + String endValue = getParameterValue(request, fieldName + CommonConstants.Common.E_TIME); // 如果 Start 和 End 都有值,则添加时间段查询条件 if (startValue != null && endValue != null) { try { @@ -88,7 +91,7 @@ public class HisQueryUtils { Date startDate = dateFormat.parse(startValue); Date endDate = dateFormat.parse(endValue); queryWrapper.ge(dbFieldName, startDate); // 大于等于 STime - queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime + queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime } catch (ParseException e) { e.printStackTrace(); } @@ -102,7 +105,7 @@ public class HisQueryUtils { * 检查时间字符串是否符合指定格式 * * @param formatter 时间格式 - * @param dateStr 时间字符串 + * @param dateStr 时间字符串 * @return 是否匹配 */ private static boolean isValidFormat(DateTimeFormatter formatter, String dateStr) { diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java index 474103d6..5a7f7c00 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/domain/Organization.java @@ -1,15 +1,12 @@ package com.openhis.administration.domain; -import java.math.BigDecimal; -import java.util.Date; - import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; - import com.core.common.core.domain.HisBaseEntity; import com.openhis.common.enums.OrganizationClass; import com.openhis.common.enums.OrganizationType; + import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -60,5 +57,4 @@ public class Organization extends HisBaseEntity { /** 显示顺序 */ private Integer displayOrder; - } diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java index d23c4342..d1a2a34f 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/IOrganizationService.java @@ -11,8 +11,7 @@ import com.openhis.administration.domain.Organization; * @date 2025-02-21 */ public interface IOrganizationService extends IService { - Page getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize); - + Page getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo, Integer pageSize); /** * 通过机构ID查询机构名称 diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java index c60b593c..54af2010 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/OrganizationServiceImpl.java @@ -1,16 +1,15 @@ 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; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.openhis.administration.domain.Organization; import com.openhis.administration.mapper.OrganizationMapper; import com.openhis.administration.service.IOrganizationService; -import com.openhis.common.enums.DelFlag; /** * 机构管理(科室)Service业务层处理 @@ -33,7 +32,8 @@ public class OrganizationServiceImpl extends ServiceImpl getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) { + public Page getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo, + Integer pageSize) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); @@ -60,7 +60,7 @@ public class OrganizationServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); - //设置查询条件为机构Id code + // 设置查询条件为机构Id code queryWrapper.eq("code", code); return organizationMapper.selectOne(queryWrapper); } diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/workflow/domain/SupplyRequest.java b/openhis-server/openhis-domain/src/main/java/com/openhis/workflow/domain/SupplyRequest.java index 1a61898d..eb4eaa0f 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/workflow/domain/SupplyRequest.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/workflow/domain/SupplyRequest.java @@ -1,13 +1,12 @@ package com.openhis.workflow.domain; -import java.math.BigDecimal; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; - import com.core.common.core.domain.HisBaseEntity; + import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -28,6 +27,9 @@ public class SupplyRequest extends HisBaseEntity { @TableId(type = IdType.ASSIGN_ID) private Long id; + /** 单据号 */ + private String busNo; + /** 类型 */ private Integer typeEnum; @@ -118,5 +120,4 @@ public class SupplyRequest extends HisBaseEntity { /** 申请时间 */ private Date applyTime; - } \ No newline at end of file From cebe37809eae02c398454a20e27388f8282f41e7 Mon Sep 17 00:00:00 2001 From: liupanting Date: Tue, 25 Feb 2025 11:48:02 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E7=96=BE=E7=97=85=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DiseaseManageController.java | 54 +++++++++++++--- .../datadictionary/dto/DiseaseManageDto.java | 61 +++++++++++++++++++ .../datadictionary/dto/DiseaseSourceDto.java | 18 ++++++ 3 files changed, 124 insertions(+), 9 deletions(-) create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseManageDto.java create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseSourceDto.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java index 8ee8e339..1a4272fe 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java @@ -1,19 +1,25 @@ package com.openhis.web.datadictionary.controller; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; import javax.servlet.http.HttpServletRequest; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; import com.core.common.utils.MessageUtils; +import com.core.common.utils.bean.BeanUtils; import com.openhis.clinical.domain.ConditionDefinition; import com.openhis.clinical.service.IConditionDefinitionService; import com.openhis.common.constant.PromptMsgConstant; import com.openhis.common.enums.ConditionDefinitionSource; +import com.openhis.web.datadictionary.dto.DiseaseManageDto; +import com.openhis.web.datadictionary.dto.DiseaseSourceDto; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -40,7 +46,16 @@ public class DiseaseManageController { public R getDiseaseCategory() { // 获取疾病目录种类 List statusList = Arrays.asList(ConditionDefinitionSource.values()); - return R.ok(statusList); + List diseaseSourceDtos = new ArrayList<>(); + // 取得更新值 + for (ConditionDefinitionSource detail : statusList) { + DiseaseSourceDto diseaseSourceDto = new DiseaseSourceDto(); + diseaseSourceDto.setCode(detail.getCode()); + diseaseSourceDto.setValue(detail.getValue()); + diseaseSourceDto.setInfo(detail.getInfo()); + diseaseSourceDtos.add(diseaseSourceDto); + } + return R.ok(diseaseSourceDtos); } /** @@ -63,8 +78,18 @@ public class DiseaseManageController { // 查询【病种目录】分页列表 Page diseasePage = iConditionDefinitionService.getPage(searchKey, status, sourceEnum, pageNo, pageSize); + + // 获取入病种目录列表 + Page diseaseManageDtoPage = new Page<>(); + diseaseManageDtoPage.setRecords(diseasePage.getRecords().stream().map(entity -> { + // 定义【入病种目录列表DTO】 + DiseaseManageDto dto = new DiseaseManageDto(); + BeanUtils.copyProperties(entity, dto); + return dto; + }).collect(Collectors.toList())); + // 返回【病种目录列表DTO】分页 - return R.ok(diseasePage); + return R.ok(diseaseManageDtoPage); } /** @@ -73,8 +98,8 @@ public class DiseaseManageController { * @param id 疾病ID * @return */ - @GetMapping("/information-one") - public R getDiseaseOne(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) { + @GetMapping("/information-one/{id}") + public R getDiseaseOne(@PathVariable("id") Long id) { // 根据ID查询【病种目录】 ConditionDefinition byId = iConditionDefinitionService.getById(id); @@ -84,11 +109,18 @@ public class DiseaseManageController { /** * 病种目录编辑 * - * @param conditionDefinitionList 病种目录实体列表 + * @param diseaseManageDtos 病种目录列表 * @return */ @PutMapping("/information") - public R editDisease(@RequestBody List conditionDefinitionList) { + public R editDisease(@RequestBody List diseaseManageDtos) { + List conditionDefinitionList = new ArrayList<>(); + // 取得更新值 + for (DiseaseManageDto detail : diseaseManageDtos) { + ConditionDefinition conditionDefinition = new ConditionDefinition(); + BeanUtils.copyProperties(detail, conditionDefinition); + conditionDefinitionList.add(conditionDefinition); + } // 更新病种信息 return iConditionDefinitionService.updateBatchById(conditionDefinitionList) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, null)) @@ -98,11 +130,13 @@ public class DiseaseManageController { /** * 新增外来病种目录 * - * @param conditionDefinition 病种目录实体 + * @param diseaseManageDto 病种目录实体 * @return */ @PostMapping("/information") - public R addDisease(@RequestBody ConditionDefinition conditionDefinition) { + public R addDisease(@Validated @RequestBody DiseaseManageDto diseaseManageDto) { + ConditionDefinition conditionDefinition = new ConditionDefinition(); + BeanUtils.copyProperties(diseaseManageDto, conditionDefinition); // 新增外来病种目录 return iConditionDefinitionService.addDisease(conditionDefinition) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) @@ -117,5 +151,7 @@ public class DiseaseManageController { * @return */ @PostMapping("/information-yb") - void AddYbDisease(@RequestBody ConditionDefinition conditionDefinition) {} + public R addYbDisease(@RequestBody ConditionDefinition conditionDefinition) { + return null; + } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseManageDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseManageDto.java new file mode 100644 index 00000000..63b3c15b --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseManageDto.java @@ -0,0 +1,61 @@ +package com.openhis.web.datadictionary.dto; + +import javax.validation.constraints.NotBlank; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.openhis.common.enums.ConditionDefinitionSource; +import com.openhis.common.enums.PublicationStatus; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 疾病目录分页Dto + * + * @author lpt + * @date 2025-02-25 + */ +@Data +@Accessors(chain = true) +public class DiseaseManageDto { + /** ID */ + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** 所属分类 */ + private ConditionDefinitionSource sourceEnum; + + /** 编码 */ + @NotBlank(message = "疾病编码不能为空") + private String conditionCode; + + /** 诊断名称 */ + @NotBlank(message = "疾病名称不能为空") + private String name; + + /** 诊断名称拼音 */ + private String pyStr; + + /** 诊断名称五笔拼音 */ + private String wbStr; + + /** 类型 */ + private String typeCode; + + /** 描述 */ + private String description; + + /** 医保标记 */ + private Integer ybFlag; + + /** 医保编码 */ + private String ybNo; + + /** 医保对码标记 */ + private Integer ybMatchFlag; + + /** 状态 */ + private PublicationStatus statusEnum; + +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseSourceDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseSourceDto.java new file mode 100644 index 00000000..2d7bf785 --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiseaseSourceDto.java @@ -0,0 +1,18 @@ +package com.openhis.web.datadictionary.dto; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 疾病目录种别dto + * + * @author lpt + * @date 2025-02-25 + */ +@Data +@Accessors(chain = true) +public class DiseaseSourceDto { + private Integer value; + private String code; + private String info; +} From f53635b340df5664e12e2831f55a65fde0f1e62e Mon Sep 17 00:00:00 2001 From: duhe Date: Tue, 25 Feb 2025 13:09:44 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E5=8E=82=E5=95=86/=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=90=8E=E5=8F=B0=20=20=20=E7=96=BE=E7=97=85=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E5=89=8D=E5=8F=B0=20up=20by=20dh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SupplierManagementController.java | 129 ++++++++++++++++++ .../web/datadictionary/dto/SupplierDto.java | 56 ++++++++ .../dto/SupplierSearchParam.java | 39 ++++++ .../service/ISupplierService.java | 19 ++- .../service/impl/SupplierServiceImpl.java | 48 +++++++ .../catalog/disease/components/disease.js | 24 +--- .../src/views/catalog/disease/index.vue | 46 +------ 7 files changed, 298 insertions(+), 63 deletions(-) create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/SupplierManagementController.java create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierDto.java create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierSearchParam.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/SupplierManagementController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/SupplierManagementController.java new file mode 100644 index 00000000..dbcdaed0 --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/SupplierManagementController.java @@ -0,0 +1,129 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.openhis.web.datadictionary.controller; + +import java.util.List; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.core.domain.R; +import com.core.common.utils.MessageUtils; +import com.core.common.utils.bean.BeanUtils; +import com.openhis.administration.domain.Supplier; +import com.openhis.administration.service.ISupplierService; +import com.openhis.common.constant.PromptMsgConstant; +import com.openhis.web.datadictionary.dto.SupplierDto; +import com.openhis.web.datadictionary.dto.SupplierSearchParam; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import com.openhis.clinical.domain.ConditionDefinition; +import com.openhis.clinical.service.IConditionDefinitionService; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import javax.servlet.http.HttpServletRequest; + +/** + * TODO:厂商/产地 + * + * @author dh + * @date 2025-02-21 + */ +@RestController +@RequestMapping("/data-dictionary-supplier") +@Slf4j +@AllArgsConstructor +public class SupplierManagementController { + private final ISupplierService supplierService; + + /** + * 厂商/产地查询 + * + * @param supplierSearchParam 查询条件 + * @param pageNo 查询条件 + * @param pageSize 查询条件 + * @return 厂商/产地查询结果 + */ + @GetMapping(value = "/get-supplier-list") + public R getSupplierList(SupplierSearchParam supplierSearchParam, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { + + // 查询条件初始化 + Supplier supplier = new Supplier(); + BeanUtils.copyProperties(supplierSearchParam, supplier); + + // 查询 + Page supplierPage = supplierService.getPage(supplier,pageNo,pageSize); + // 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】 + Page returnPage = + new Page<>(supplierPage.getCurrent(), supplierPage.getSize(), supplierPage.getTotal()); +// supplierPage +// supplierPage.map(item -> { +// SupplierDto supplierDto = new SupplierDto(); +// BeanUtils.copyProperties(item, supplierDto); // 使用 BeanUtils 复制属性 +// // 如果有特殊字段需要手动转换,可以在这里处理 +// return supplierDto; +// }); + + return R.ok(returnPage); + } + + /** + * 添加供应商信息 + * + * @param supplierDto 供应商信息 + */ + @PostMapping("/add-supplier") + public R addSupplyRequest(@Validated @RequestBody SupplierDto supplierDto) { + // 初始化参数 + Supplier supplier = new Supplier(); + BeanUtils.copyProperties(supplierDto, supplier); + // 如果业务上不需要其它处理 直接调用service的保存方法 + boolean saveSupplierSuccess = supplierService.save(supplier); + + if (!saveSupplierSuccess) { + return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); + } + + return saveSupplierSuccess + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"厂商/供应商信息"})) + : R.fail(PromptMsgConstant.Common.M00007, null); + } + + /** + * 编辑供应商信息 + * + * @param supplierDto 供应商信息 + */ + @PutMapping("/edit-supplier") + public R editSupplyRequest(@Validated @RequestBody SupplierDto supplierDto) { + // 初始化参数 + Supplier supplier = new Supplier(); + BeanUtils.copyProperties(supplierDto, supplier); + + return supplierService.updateById(supplier) ? + R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"厂商/供应商信息"})) + : R.fail(PromptMsgConstant.Common.M00007, null); + } + + + /** + * 厂商/产地详细查询 + * + * @param supplierId 查询条件 + * @return 厂商/产地查询结果 + */ + @GetMapping(value = "/get-supplier-detail") + public R getSupplierDetail(@RequestParam(name = "id", required = true) String supplierId) { + + + // 查询 + Supplier supplierDetail = supplierService.getById(supplierId); + return R.ok(supplierDetail); + } +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierDto.java new file mode 100644 index 00000000..f57eff9e --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierDto.java @@ -0,0 +1,56 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.openhis.web.datadictionary.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 供应商保存dto + * + * @author dh + * @date 2025-02-24 + */ +@Data +@Accessors(chain = true) +public class SupplierDto { + + /** ID */ + private Long id; + + /** 编号 */ + private String busNo; + + /** 名称 */ + private String name; + + /** 类型 */ + private Integer typeEnum; + + /** 地址 */ + private String address; + + /** 拼音码 */ + private String pyStr; + + /** 五笔码 */ + private String wbStr; + + /** 联系人电话 */ + private String phone; + + /** 联系人邮箱 */ + private String email; + + /** 活动标识 */ + private Integer activeFlag; + + /** 机构编号 */ + private Long orgId; +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierSearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierSearchParam.java new file mode 100644 index 00000000..71fe59ec --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/SupplierSearchParam.java @@ -0,0 +1,39 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.openhis.web.datadictionary.dto; + +import java.io.Serializable; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 厂商/产地分页查询条件 + * + * @author dh + * @date 2025-02-18 + */ +@Data +@Accessors(chain = true) +public class SupplierSearchParam implements Serializable { + + /** + * 编号 + */ + @Schema(description = "编号") + private String busNo; + /** + * 名称* + */ + @Schema(description = "名称") + private String name; + + /** + * 名称* + */ + @Schema(description = "供应商类型") + private String typeEnum; + +} diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/ISupplierService.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/ISupplierService.java index 655097d2..4291d475 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/ISupplierService.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/ISupplierService.java @@ -1,14 +1,31 @@ package com.openhis.administration.service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; +import com.core.common.core.domain.R; import com.openhis.administration.domain.Supplier; +import com.openhis.workflow.domain.SupplyRequest; +import org.springframework.web.bind.annotation.RequestParam; + +import javax.servlet.http.HttpServletRequest; /** * 供应商管理Service接口 * - * @author system + * @author dh * @date 2025-02-20 */ public interface ISupplierService extends IService { + /** + * 查询厂商/供应商分页列表 + * + * @param supplier 查询条件 + * @param pageNo 查询条件 + * @param pageSize 查询条件 + * @return 供应申请列表 + */ + Page getPage(Supplier supplier, Integer pageNo, Integer pageSize); + + } \ No newline at end of file diff --git a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/SupplierServiceImpl.java b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/SupplierServiceImpl.java index 5e87745c..6b5447d3 100644 --- a/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/SupplierServiceImpl.java +++ b/openhis-server/openhis-domain/src/main/java/com/openhis/administration/service/impl/SupplierServiceImpl.java @@ -1,5 +1,13 @@ package com.openhis.administration.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.utils.StringUtils; +import com.core.common.utils.bean.BeanUtils; +import com.openhis.common.enums.DelFlag; +import com.openhis.workflow.domain.SupplyRequest; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -13,7 +21,47 @@ import com.openhis.administration.service.ISupplierService; * @author system * @date 2025-02-20 */ +@Slf4j @Service +@AllArgsConstructor public class SupplierServiceImpl extends ServiceImpl implements ISupplierService { + private final SupplierMapper supplierMapper; + /** + * 查询厂商/产地列表 + * + * @param supplier 查询条件 + * @param pageNo 查询条件 + * @param pageSize 查询条件 + * @return 厂商/产地列表 + */ + @Override + public Page getPage(Supplier supplier, Integer pageNo, Integer pageSize) { + Page supplierList = new Page<>(); +// // 判断入库数量 +// if (supplyRequest.getItemQuantity() != 0) { +// // 查询供应申请信息列表 +// supplyRequestList = supplyRequestMapper.selectPage(new Page<>(pageNo, pageSize), +// new LambdaQueryWrapper().eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getValue())); +// } else { +// return null; +// } + + // 设置查询条件 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotEmpty(supplier.getBusNo())) { + lambdaQueryWrapper.eq(Supplier::getBusNo, supplier.getBusNo()); + } + if (StringUtils.isNotEmpty(supplier.getName())) { + lambdaQueryWrapper.eq(Supplier::getName, supplier.getName()); + } + if (StringUtils.isNotNull(supplier.getTypeEnum())) { + lambdaQueryWrapper.eq(Supplier::getTypeEnum, supplier.getTypeEnum()); + } + lambdaQueryWrapper.eq(Supplier::getDeleteFlag, DelFlag.NO.getValue()); + + supplierList = supplierMapper.selectPage(new Page<>(pageNo, pageSize), lambdaQueryWrapper); + // 返回入库信息列表 + return supplierList; + } } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/catalog/disease/components/disease.js b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js index 9d8fe7d9..6ab99b62 100644 --- a/openhis-ui-vue3/src/views/catalog/disease/components/disease.js +++ b/openhis-ui-vue3/src/views/catalog/disease/components/disease.js @@ -13,9 +13,8 @@ export function getDiseaseList(query) { // 查询病种目录详细 export function getDiseaseOne(id) { return request({ - url: '/datadictionary/disease/information-one', - method: 'get', - params: id + url: '/datadictionary/disease/information-one' + parseStrEmpty(id), + method: 'get' }) } @@ -51,21 +50,4 @@ export function getDiseaseCategory() { url: '/datadictionary/disease/information-category', method: 'get' }) -} - -// 修改用户个人信息 -export function updateUserProfile(data) { - return request({ - url: '/system/user/profile', - method: 'put', - data: data - }) -} - -// 查询部门下拉树结构 -export function deptTreeSelect() { - return request({ - url: '/system/user/deptTree', - method: 'get' - }) -} +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/catalog/disease/index.vue b/openhis-ui-vue3/src/views/catalog/disease/index.vue index a63201c0..916ce8e7 100644 --- a/openhis-ui-vue3/src/views/catalog/disease/index.vue +++ b/openhis-ui-vue3/src/views/catalog/disease/index.vue @@ -303,8 +303,6 @@ const single = ref(true); const multiple = ref(true); const total = ref(0); const title = ref(""); -const dateRange = ref([]); -const deptName = ref(""); const conditionDefinitionOptions = ref(undefined); // const initPassword = ref(undefined); // const postOptions = ref([]); @@ -319,46 +317,12 @@ const data = reactive({ status: undefined, // 状态(包括 1:预置,2:启用,3:停用) }, rules: { - userName: [ - { required: true, message: "用户名称不能为空", trigger: "blur" }, - { - min: 2, - max: 20, - message: "用户名称长度必须介于 2 和 20 之间", - trigger: "blur", - }, - ], - nickName: [ - { required: true, message: "用户昵称不能为空", trigger: "blur" }, - ], - password: [ - { required: true, message: "用户密码不能为空", trigger: "blur" }, - { - min: 5, - max: 20, - message: "用户密码长度必须介于 5 和 20 之间", - trigger: "blur", - }, - { - pattern: /^[^<>"'|\\]+$/, - message: "不能包含非法字符:< > \" ' \\ |", - trigger: "blur", - }, - ], - email: [ - { - type: "email", - message: "请输入正确的邮箱地址", - trigger: ["blur", "change"], - }, - ], - phonenumber: [ - { - pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, - message: "请输入正确的手机号码", - trigger: "blur", - }, + name: [ + { required: true, message: "名称不能为空", trigger: "blur" }, ], + conditionCode: [ + { required: true, message: "编码不能为空", trigger: "blur" }, + ] }, }); From 24b16b6d9704b5d89d92f7f9cf0955a1b3b2ceee Mon Sep 17 00:00:00 2001 From: Zhuangxingyu Date: Tue, 25 Feb 2025 13:24:11 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?=E5=AE=9A=E4=BB=B7=E7=AE=A1=E7=90=86=E4=BB=A3=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/core/common/enums/ChargeItemEnum.java | 86 +++++++++ .../controller/ItemDefinitionController.java | 177 +++++++++--------- .../dto/ChargeItemOptionDto.java | 24 +++ .../dto/ItemDefSearchParam.java | 2 - .../mapper/ChargeItemDefSearchMapper.java | 12 +- .../ChargeItemDefSearchMapper.xml | 59 +++--- 6 files changed, 228 insertions(+), 132 deletions(-) create mode 100644 openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java diff --git a/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java b/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java new file mode 100644 index 00000000..7366624e --- /dev/null +++ b/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java @@ -0,0 +1,86 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.core.common.enums; + +/** + * 收费项目 + * + * @author zxy + * @date 2025-02-24 + */ +public enum ChargeItemEnum { + + /** + * 床位费 + */ + BED_FEE("01", "床位费"), + /** + * 诊察费 + */ + DIAGNOSTIC_FEE("02", "诊察费"), + /** + * 检查费 + */ + CHECK_FEE("03", "检查费"), + /** + * 化验费 + */ + DIAGNOSTIC_TEST_FEE("04", "化验费"), + /** + * 治疗费 + */ + MEDICAL_EXPENSE_FEE("05", "治疗费"), + /** + * 手术费 + */ + OPERATION_FEE("06", "手术费"), + /** + * 护理费 + */ + NURSING_FEE("07", "护理费"), + /** + * 卫生材料费 + */ + SANITARY_MATERIALS_FEE("08", "卫生材料费"), + /** + * 西药费 + */ + WEST_MEDICINE("09", "西药费"), + /** + * 中药饮片费 + */ + CHINESE_MEDICINE_SLICES_FEE("10", "中药饮片费"), + /** + * 中成药费 + */ + CHINESE_MEDICINE_FEE("11", "中成药费"), + /** + * 一般诊疗费 + */ + GENERAL_CONSULTATION_FEE("12", "一般诊疗费"), + /** + * 挂号费 + */ + REGISTRATION_FEE("13", "挂号费"), + /** + * 其他费 + */ + OTHER_FEE("14", "其他费"); + + private final String code; + private final String info; + + ChargeItemEnum(String code, String info) { + this.code = code; + this.info = info; + } + + public String getCode() { + return code; + } + + public String getInfo() { + return info; + } +} \ No newline at end of file diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java index 7158d085..6b238fd6 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java @@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; import com.core.common.enums.AssignSeqEnum; +import com.core.common.enums.ChargeItemEnum; import com.core.common.enums.DefinitionTypeEnum; import com.core.common.utils.AssignSeqUtil; import com.core.common.utils.MessageUtils; @@ -28,6 +29,7 @@ import com.openhis.administration.service.IChargeItemDefAppService; import com.openhis.administration.service.IChargeItemDefinitionService; import com.openhis.common.constant.PromptMsgConstant; import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto; +import com.openhis.web.datadictionary.dto.ChargeItemOptionDto; import com.openhis.web.datadictionary.dto.ItemDefSearchParam; import com.openhis.web.datadictionary.dto.ItemDefinitionDto; import com.openhis.web.datadictionary.mapper.ChargeItemDefSearchMapper; @@ -51,15 +53,74 @@ public class ItemDefinitionController { private IChargeItemDefAppService chargeItemDefAppService; @Autowired(required = false) private ChargeItemDefSearchMapper chargeItemDefSearchMapper; - // @Autowired(required = false) - // private IMedicationDefinitionService medicationDefinitionService; - // @Autowired(required = false) - // private IDeviceDefinitionService deviceDefinitionService; - // @Autowired(required = false) - // private IActivityDefinitionService activityDefinitionService; @Autowired(required = false) private AssignSeqUtil assignSeqUtil; + /** + * 项目定价列表 + * + * @param itemDefSearchParam 查询条件 + * @return 项目定价列表 + */ + @GetMapping(value = "/init") + public R getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) { + List chargeItemOptions = new ArrayList<>(); + if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) { + // 西药 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.WEST_MEDICINE.getCode()) + .setLabel(ChargeItemEnum.WEST_MEDICINE.getInfo())); + // 中药饮片 + chargeItemOptions + .add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getCode()) + .setLabel(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getInfo())); + // 中成药 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHINESE_MEDICINE_FEE.getCode()) + .setLabel(ChargeItemEnum.CHINESE_MEDICINE_FEE.getInfo())); + // 其他 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode()) + .setLabel(ChargeItemEnum.OTHER_FEE.getInfo())); + } else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) { + // 卫生材料 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.SANITARY_MATERIALS_FEE.getCode()) + .setLabel(ChargeItemEnum.SANITARY_MATERIALS_FEE.getInfo())); + // 其他 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode()) + .setLabel(ChargeItemEnum.OTHER_FEE.getInfo())); + } else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) { + // 床位 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.BED_FEE.getCode()) + .setLabel(ChargeItemEnum.BED_FEE.getInfo())); + // 诊察 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.DIAGNOSTIC_FEE.getCode()) + .setLabel(ChargeItemEnum.DIAGNOSTIC_FEE.getInfo())); + // 检查 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHECK_FEE.getCode()) + .setLabel(ChargeItemEnum.CHECK_FEE.getInfo())); + // 化验 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getCode()) + .setLabel(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getInfo())); + // 治疗 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.MEDICAL_EXPENSE_FEE.getCode()) + .setLabel(ChargeItemEnum.MEDICAL_EXPENSE_FEE.getInfo())); + // 手术 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OPERATION_FEE.getCode()) + .setLabel(ChargeItemEnum.OPERATION_FEE.getInfo())); + // 护理费 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.NURSING_FEE.getCode()) + .setLabel(ChargeItemEnum.NURSING_FEE.getInfo())); + // 其他 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getCode()) + .setLabel(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getInfo())); + // 挂号 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.REGISTRATION_FEE.getCode()) + .setLabel(ChargeItemEnum.REGISTRATION_FEE.getInfo())); + // 其他 + chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode()) + .setLabel(ChargeItemEnum.OTHER_FEE.getInfo())); + } + return R.ok(chargeItemOptions); + } + /** * 项目定价列表 * @@ -72,60 +133,12 @@ public class ItemDefinitionController { @GetMapping(value = "/item-definition-page") public R getDefinitionPage(ItemDefSearchParam itemDefSearchParam, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { - // region - /// todo: 代码未测试 - // 获取定价查询条件 - // ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition(); - // BeanUtils.copyProperties(itemDefSearchParam, chargeItemDefinition); - - // ==================================================================================== - - // 查询【费用定价管理】分页列表 - // Page chargeItemDefinitionPage = - // chargeItemDefinitionMapper.getPage(itemDefSearchParam, pageNo, pageSize); - // if (chargeItemDefinitionPage.getRecords() != null) { - // List chargeItemDefAppList = chargeItemDefAppService.listByIds(chargeItemDefinitionPage - // .getRecords().stream().filter(e -> e.getInstanceTable().equals("adm_charge_item_def_app")) - // .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList())); - // // 通过 DefinitionType 区分药品定价/器具定价/手术定价 - // if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) { - // // 获取药品定价列表 - // List medicationList = - // medicationDefinitionService.listByIds(chargeItemDefinitionPage.getRecords().stream() - // .filter(e -> e.getInstanceTable().equals("med_medication_definition")) - // .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList())); - // - // return R.ok(ItemDefinitionAssembler.assembleMedDefinitionDto(chargeItemDefinitionPage, - // chargeItemDefAppList, medicationList, itemDefSearchParam)); - // } else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) { - // // 获取器具定价列表 - // List deviceDefinitionList = deviceDefinitionService.listByIds(chargeItemDefinitionPage - // .getRecords().stream().filter(e -> e.getInstanceTable().equals("adm_device_definition")) - // .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList())); - // - // return R.ok(ItemDefinitionAssembler.assembleDevDefinitionDto(chargeItemDefinitionPage, - // chargeItemDefAppList, deviceDefinitionList, itemDefSearchParam)); - // } else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) { - // List activityDefinitionList = - // activityDefinitionService.listByIds(chargeItemDefinitionPage.getRecords().stream() - // .filter(e -> e.getInstanceTable().equals("wor_activity_definition")) - // .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList())); - // - // return R.ok(ItemDefinitionAssembler.assembleProDefinitionDto(chargeItemDefinitionPage, - // chargeItemDefAppList, activityDefinitionList, itemDefSearchParam)); - // } else { - // return R.ok(new Page()); - // } - // } else { - // return R.ok(new Page()); - // } - // endregion + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, + @RequestParam(value = "searchKey", defaultValue = "10") String searchKey, HttpServletRequest request) { IPage chargeItemDefinitionPage = new Page<>(); List chargeItemDefinitionList; - // TODO: 待测试 // 跳过的数量 int skipCount = 0; if (pageNo > 0) { @@ -135,51 +148,29 @@ public class ItemDefinitionController { if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) { // 获取定价列表 chargeItemDefinitionList = - chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, skipCount); - // 设置分页条件 - chargeItemDefinitionPage.setSize(pageSize); - chargeItemDefinitionPage.setCurrent(pageNo); - if (chargeItemDefinitionList.size() > 0) { - chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount()); - chargeItemDefinitionPage.setRecords(chargeItemDefinitionList); - } else { - chargeItemDefinitionPage.setTotal(0); - chargeItemDefinitionPage.setRecords(new ArrayList<>()); - } - return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount); } else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) { // 获取定价列表 chargeItemDefinitionList = - chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, skipCount); - // 设置分页条件 - chargeItemDefinitionPage.setSize(pageSize); - chargeItemDefinitionPage.setCurrent(pageNo); - if (chargeItemDefinitionList.size() > 0) { - chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount()); - chargeItemDefinitionPage.setRecords(chargeItemDefinitionList); - } else { - chargeItemDefinitionPage.setTotal(0); - chargeItemDefinitionPage.setRecords(new ArrayList<>()); - } - return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount); } else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) { // 获取定价列表 chargeItemDefinitionList = - chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, skipCount); - // 设置分页条件 - chargeItemDefinitionPage.setSize(pageSize); - chargeItemDefinitionPage.setCurrent(pageNo); - if (chargeItemDefinitionList.size() > 0) { - chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount()); - chargeItemDefinitionPage.setRecords(chargeItemDefinitionList); - } else { - chargeItemDefinitionPage.setTotal(0); - chargeItemDefinitionPage.setRecords(new ArrayList<>()); - } - return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount); } else { - return R.ok(new Page<>(), MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); + chargeItemDefinitionList = new ArrayList<>(); } + // 设置分页条件 + chargeItemDefinitionPage.setSize(pageSize); + chargeItemDefinitionPage.setCurrent(pageNo); + if (chargeItemDefinitionList.size() > 0) { + chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount()); + chargeItemDefinitionPage.setRecords(chargeItemDefinitionList); + } else { + chargeItemDefinitionPage.setTotal(0); + chargeItemDefinitionPage.setRecords(new ArrayList<>()); + } + return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); } /** diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java new file mode 100644 index 00000000..6971d12d --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java @@ -0,0 +1,24 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.openhis.web.datadictionary.dto; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 收费项目下拉框 + * + * @author zxy + * @date 2025-02-24 + */ +@Data +@Accessors(chain = true) +public class ChargeItemOptionDto { + + /** 值 */ + private String value; + + /** 标签 */ + private String label; +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java index 3b3a3b0d..d5fff452 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java @@ -22,6 +22,4 @@ public class ItemDefSearchParam { private String chargeItem; /** 模糊搜索条件 */ private String searchKey; - /** 状态 */ - private Integer statusEnum; } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/mapper/ChargeItemDefSearchMapper.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/mapper/ChargeItemDefSearchMapper.java index 404e2a31..9bdaa3da 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/mapper/ChargeItemDefSearchMapper.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/mapper/ChargeItemDefSearchMapper.java @@ -25,11 +25,13 @@ public interface ChargeItemDefSearchMapper extends BaseMapper getMedList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam, - @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") Integer skipCount); + @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey, + @Param("skipCount") Integer skipCount); /** * 器具费用定价分页查询 @@ -37,11 +39,13 @@ public interface ChargeItemDefSearchMapper extends BaseMapper getDevList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam, - @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") int skipCount); + @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey, + @Param("skipCount") int skipCount); /** * 活动费用定价分页查询 @@ -49,9 +53,11 @@ public interface ChargeItemDefSearchMapper extends BaseMapper getActList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam, - @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") int skipCount); + @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey, + @Param("skipCount") int skipCount); } \ No newline at end of file diff --git a/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/ChargeItemDefSearchMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/ChargeItemDefSearchMapper.xml index 0c54714a..30820ae0 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/ChargeItemDefSearchMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/ChargeItemDefSearchMapper.xml @@ -63,13 +63,10 @@ ON T3.id = T4.medication_def_id) T5 T5.instance_table = 'med_medication_definition' - - AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - - - AND T5.status_enum = #{itemDefSearchParam.statusEnum} + + AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%') + OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%') + OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%') AND T5.category_code = #{itemDefSearchParam.chargeItem} @@ -101,8 +98,8 @@ T5.priority, T5.amount, T5.item_no, - T5.py_code, - T5.wb_code, + T5.py_str, + T5.wb_str, T5.unit_code, T5.category_code, T5.lot_number, @@ -125,11 +122,11 @@ T2.condition_yb_code, T2.priority, T2.amount, - T3.code AS item_no, - T3.py_code, - T3.wb_code, + T3.bus_no AS item_no, + T3.py_str, + T3.wb_str, T3.unit_code AS unit_code, - T3.device_class AS category_code, + T3.category_enum AS category_code, T4.lot_number FROM adm_charge_item_definition T1 @@ -138,16 +135,13 @@ LEFT JOIN adm_device_definition T3 ON T1.instance_id = T3.id LEFT JOIN adm_device T4 - ON T3.id = T4.def_id) T5 + ON T3.id = T4.device_def_id) T5 T5.instance_table = 'adm_device_definition' - - AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - - - AND T5.status_enum = #{itemDefSearchParam.statusEnum} + + AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%') + OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%') + OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%') AND T5.category_code = #{itemDefSearchParam.chargeItem} @@ -179,8 +173,8 @@ T5.priority, T5.amount, T5.item_no, - T5.py_code, - T5.wb_code, + T5.py_str, + T5.wb_str, T5.unit_code, T5.category_code, COUNT(1) OVER() AS TOTAL_COUNT @@ -202,10 +196,10 @@ T2.condition_yb_code, T2.priority, T2.amount, - T3.code AS item_no, - T3.py_code, - T3.wb_code, - T3.permitted_unit AS unit_code, + T3.bus_no AS item_no, + T3.py_str, + T3.wb_str, + T3.permitted_unit_code AS unit_code, T3.type_enum AS category_code FROM adm_charge_item_definition T1 @@ -215,13 +209,10 @@ ON T1.instance_id = T3.id) T5 T5.instance_table = 'wor_activity_definition' - - AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%') - - - AND T5.status_enum = #{itemDefSearchParam.statusEnum} + + AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%') + OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%') + OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%') AND T5.category_code = #{itemDefSearchParam.chargeItem} From 345e71f7cf985c71d8c706a17b26bbd952442193 Mon Sep 17 00:00:00 2001 From: "Wang.Huan" Date: Tue, 25 Feb 2025 13:27:50 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=94=B9=E9=80=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../openhis/common/utils/HisPageUtils.java | 74 +++++++++++++++++++ .../openhis/common/utils/HisQueryUtils.java | 14 ++-- 2 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisPageUtils.java diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisPageUtils.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisPageUtils.java new file mode 100644 index 00000000..4a70f7e5 --- /dev/null +++ b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisPageUtils.java @@ -0,0 +1,74 @@ +package com.openhis.common.utils; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.beans.BeanUtils; + +import java.util.List; +import java.util.stream.Collectors; + +public class HisPageUtils { + + /** + * 执行分页查询并转换为目标类型 + * + * @param mapper MyBatis Plus Mapper 接口 + * @param queryWrapper 查询条件 + * @param pageNo 当前页 + * @param pageSize 每页大小 + * @param targetClass 目标类(如 MedicationDto.class) + * @param 源对象类型(数据库实体类) + * @param 目标对象类型(DTO 类) + * @return 分页结果(目标类型) + */ + public static Page selectPage(BaseMapper mapper, QueryWrapper queryWrapper, + int pageNo, int pageSize, Class targetClass) { + // 构建分页对象 + Page page = new Page<>(pageNo, pageSize); + // 执行分页查询 + Page sourcePage = mapper.selectPage(page, queryWrapper); + // 转换为目标类型的分页对象 + Page targetPage = new Page<>(); + // 复制分页信息 + BeanUtils.copyProperties(sourcePage, targetPage); + // 转换记录列表 + targetPage.setRecords(convertToDtoList(sourcePage.getRecords(), targetClass)); + return targetPage; + } + + /** + * 将源对象列表转换为目标对象列表 + * + * @param sourceList 源对象列表 + * @param targetClass 目标类 + * @param 源对象类型 + * @param 目标对象类型 + * @return 目标对象列表 + */ + private static List convertToDtoList(List sourceList, Class targetClass) { + return sourceList.stream() + .map(source -> convertToDto(source, targetClass)) + .collect(Collectors.toList()); + } + + /** + * 将源对象转换为目标对象 + * + * @param source 源对象 + * @param targetClass 目标类 + * @param 源对象类型 + * @param 目标对象类型 + * @return 目标对象 + */ + private static R convertToDto(T source, Class targetClass) { + try { + // 创建目标对象实例 + R target = targetClass.getDeclaredConstructor().newInstance(); + BeanUtils.copyProperties(source, target); // 复制属性 + return target; + } catch (Exception e) { + throw new RuntimeException("Failed to convert object to DTO", e); + } + } +} diff --git a/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java index a1f5ce94..c2765cae 100644 --- a/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java +++ b/openhis-server/openhis-common/src/main/java/com/openhis/common/utils/HisQueryUtils.java @@ -24,14 +24,14 @@ public class HisQueryUtils { /** * 条件查询构造器 * - * @param entity 传参实体 - * @param searchKey 模糊查询关键字 + * @param entity 传参实体 + * @param searchKey 模糊查询关键字 * @param searchFields 支持模糊查询的字段集合 ; 不需要模糊查询传 null 即可 - * @param request 请求 + * @param request 请求 * @return 构造条件 */ - public static QueryWrapper buildQueryWrapper(T entity, String searchKey, HashSet searchFields, - HttpServletRequest request) { + public static QueryWrapper buildQueryWrapper(Object entity, String searchKey, HashSet searchFields, + HttpServletRequest request) { QueryWrapper queryWrapper = new QueryWrapper<>(); // 添加租户id查询条件 queryWrapper.eq(CommonConstants.Common.TENANT_ID, getCurrentTenantId()); @@ -45,7 +45,6 @@ public class HisQueryUtils { try { Object value = field.get(entity); if (value != null && !value.toString().equals("")) { - // String fieldName = field.getName(); // 将驼峰命名的字段名转换为下划线命名的数据库字段名 String fieldName = camelToUnderline(field.getName()); // 处理等于条件 @@ -65,13 +64,12 @@ public class HisQueryUtils { } // 处理时间段查询 DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD); - // DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); Map parameterMap = request.getParameterMap(); for (Map.Entry entry : parameterMap.entrySet()) { String paramName = entry.getKey(); // 检查参数名是否以 "STime" 或 "ETime" 结尾 if (paramName.endsWith(CommonConstants.Common.S_TIME) - || paramName.endsWith(CommonConstants.Common.E_TIME)) { + || paramName.endsWith(CommonConstants.Common.E_TIME)) { // 提取字段名(去掉 "STime" 或 "ETime" 后缀) String fieldName = paramName.substring(0, paramName.length() - 5); // 驼峰转下划线 From 70b527ea00694140a5bcad1e85012bdea74f5a91 Mon Sep 17 00:00:00 2001 From: Zhuangxingyu Date: Tue, 25 Feb 2025 13:55:00 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=AE=9A=E4=BB=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/core/common/enums/ChargeItemEnum.java | 34 +++++++++---------- .../controller/ItemDefinitionController.java | 2 +- .../dto/ChargeItemOptionDto.java | 2 +- .../dto/ItemDefSearchParam.java | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java b/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java index 7366624e..ee7f0efc 100644 --- a/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java +++ b/openhis-server/core-common/src/main/java/com/core/common/enums/ChargeItemEnum.java @@ -14,69 +14,69 @@ public enum ChargeItemEnum { /** * 床位费 */ - BED_FEE("01", "床位费"), + BED_FEE(1, "床位费"), /** * 诊察费 */ - DIAGNOSTIC_FEE("02", "诊察费"), + DIAGNOSTIC_FEE(2, "诊察费"), /** * 检查费 */ - CHECK_FEE("03", "检查费"), + CHECK_FEE(3, "检查费"), /** * 化验费 */ - DIAGNOSTIC_TEST_FEE("04", "化验费"), + DIAGNOSTIC_TEST_FEE(4, "化验费"), /** * 治疗费 */ - MEDICAL_EXPENSE_FEE("05", "治疗费"), + MEDICAL_EXPENSE_FEE(5, "治疗费"), /** * 手术费 */ - OPERATION_FEE("06", "手术费"), + OPERATION_FEE(6, "手术费"), /** * 护理费 */ - NURSING_FEE("07", "护理费"), + NURSING_FEE(7, "护理费"), /** * 卫生材料费 */ - SANITARY_MATERIALS_FEE("08", "卫生材料费"), + SANITARY_MATERIALS_FEE(8, "卫生材料费"), /** * 西药费 */ - WEST_MEDICINE("09", "西药费"), + WEST_MEDICINE(9, "西药费"), /** * 中药饮片费 */ - CHINESE_MEDICINE_SLICES_FEE("10", "中药饮片费"), + CHINESE_MEDICINE_SLICES_FEE(10, "中药饮片费"), /** * 中成药费 */ - CHINESE_MEDICINE_FEE("11", "中成药费"), + CHINESE_MEDICINE_FEE(11, "中成药费"), /** * 一般诊疗费 */ - GENERAL_CONSULTATION_FEE("12", "一般诊疗费"), + GENERAL_CONSULTATION_FEE(12, "一般诊疗费"), /** * 挂号费 */ - REGISTRATION_FEE("13", "挂号费"), + REGISTRATION_FEE(13, "挂号费"), /** * 其他费 */ - OTHER_FEE("14", "其他费"); + OTHER_FEE(14, "其他费"); - private final String code; + private final Integer code; private final String info; - ChargeItemEnum(String code, String info) { + ChargeItemEnum(Integer code, String info) { this.code = code; this.info = info; } - public String getCode() { + public Integer getCode() { return code; } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java index 6b238fd6..3a1c11c4 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/ItemDefinitionController.java @@ -134,7 +134,7 @@ public class ItemDefinitionController { public R getDefinitionPage(ItemDefSearchParam itemDefSearchParam, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, - @RequestParam(value = "searchKey", defaultValue = "10") String searchKey, HttpServletRequest request) { + @RequestParam(value = "searchKey", required = false) String searchKey, HttpServletRequest request) { IPage chargeItemDefinitionPage = new Page<>(); List chargeItemDefinitionList; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java index 6971d12d..78bb83c9 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ChargeItemOptionDto.java @@ -17,7 +17,7 @@ import lombok.experimental.Accessors; public class ChargeItemOptionDto { /** 值 */ - private String value; + private Integer value; /** 标签 */ private String label; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java index d5fff452..a8a99919 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/ItemDefSearchParam.java @@ -19,7 +19,7 @@ public class ItemDefSearchParam { /** 定价类型 */ private String definitionType; /** 定价项目 */ - private String chargeItem; + private Integer chargeItem; /** 模糊搜索条件 */ private String searchKey; }