From 4349b2d5acc7b7827d88a46a8c1f88f5ebdcc583 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Mon, 24 Mar 2025 15:02:34 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E8=8D=AF=E5=93=81=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/datadictionary/dto/MedicationManageDto.java | 3 +++ .../datadictionary/MedicationManageSearchMapper.xml | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageDto.java index c85e7c0c..0e47901c 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageDto.java @@ -35,6 +35,7 @@ public class MedicationManageDto { private String statusEnum_enumText; /** 所属科室 */ + @JsonSerialize(using = ToStringSerializer.class) private Long orgId; /** 剂型 */ @@ -160,9 +161,11 @@ public class MedicationManageDto { private Integer injectFlag; /** 生产厂家 */ + @JsonSerialize(using = ToStringSerializer.class) private Long manufacturerId; /** 供应商 */ + @JsonSerialize(using = ToStringSerializer.class) private Long supplyId; /** 是否限制使用 */ diff --git a/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/MedicationManageSearchMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/MedicationManageSearchMapper.xml index 0648bec3..0546ef98 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/MedicationManageSearchMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/datadictionary/MedicationManageSearchMapper.xml @@ -53,13 +53,13 @@ T1.characteristic, T1.national_drug_code, T1.part_attribute, - T1.antibiotic_code - T1.restricted_enum - T1.self_flag - T1.antibiotic_flag - T1.basic_flag + T1.antibiotic_code, + T1.restricted_enum, + T1.self_flag, + T1.antibiotic_flag, + T1.basic_flag, T1.remark, - T3.manufacturer_name, + T3.name AS manufacturer_name, T4.base_unit_code, T4.base_quantity, T4.min_unit_code, From 0c2868f20d689af92f4ef9df71e4e5e864de855f Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Mon, 24 Mar 2025 16:51:49 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E5=99=A8=E6=9D=90=E6=9B=B4up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/datadictionary/dto/DeviceManageUpDto.java | 13 +++++++++++++ .../datadictionary/dto/MedicationManageUpDto.java | 3 +++ openhis-ui-vue3/vite.config.js | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DeviceManageUpDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DeviceManageUpDto.java index 2e163bed..f520ed5d 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DeviceManageUpDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DeviceManageUpDto.java @@ -94,10 +94,12 @@ public class DeviceManageUpDto { /** 生产厂家 */ @NotNull(message = "生产厂家不能为空") + @JsonSerialize(using = ToStringSerializer.class) private Long manufacturerId; /** 供应商 */ @NotNull(message = "供应商不能为空") + @JsonSerialize(using = ToStringSerializer.class) private Long supplyId; /** 说明 */ @@ -109,8 +111,19 @@ public class DeviceManageUpDto { /** 执行科室 */ @NotNull(message = "执行科室不能为空") + @JsonSerialize(using = ToStringSerializer.class) private Long ruleId; + /** 归属科室 */ + @NotNull(message = "归属科室不能为空") + @JsonSerialize(using = ToStringSerializer.class) + private Long orgId; + + /** 所在位置 */ + @NotNull(message = "所在位置不能为空") + @JsonSerialize(using = ToStringSerializer.class) + private Long locationId; + /** 器材版本 */ private String version; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageUpDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageUpDto.java index 61d48ebc..f0c23309 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageUpDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/MedicationManageUpDto.java @@ -5,6 +5,7 @@ import java.util.Date; import javax.validation.constraints.NotBlank; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; @@ -48,9 +49,11 @@ public class MedicationManageUpDto { private String lotNumber; /** 生效日期 */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") private Date effectiveDate; /** 到期日期 */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") private Date expirationDate; /** 用法 */ diff --git a/openhis-ui-vue3/vite.config.js b/openhis-ui-vue3/vite.config.js index 3fa8a5c1..6731e261 100644 --- a/openhis-ui-vue3/vite.config.js +++ b/openhis-ui-vue3/vite.config.js @@ -32,7 +32,7 @@ export default defineConfig (({mode, command}) => { // https://cn.vitejs.dev/config/#server-proxy '/dev-api': { target: 'http://localhost:18080/openhis', - // target: 'http://192.168.31.221:18080/openhis', + // target: 'http://192.168.31.221:18081/openhis', changeOrigin: true, rewrite: p => p.replace (/^\/dev-api/, ''), }, From bb68ba8989fde18a71f5b8bab50aa6980d057943 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Mon, 24 Mar 2025 16:53:42 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/impl/DeviceManageAppServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java index 8d14603d..f55d91fd 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DeviceManageAppServiceImpl.java @@ -219,12 +219,12 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService { @Override public R addDevice(@Validated @RequestBody DeviceManageUpDto deviceManageUpDto) { - DeviceDefinition DeviceDefinition = new DeviceDefinition(); - BeanUtils.copyProperties(deviceManageUpDto, DeviceDefinition); + DeviceDefinition deviceDefinition = new DeviceDefinition(); + BeanUtils.copyProperties(deviceManageUpDto, deviceDefinition); // 新增外来器材目录 - DeviceDefinition.setStatusEnum(PublicationStatus.DRAFT); - return deviceDefinitionService.addDevice(DeviceDefinition) + deviceDefinition.setStatusEnum(PublicationStatus.DRAFT); + return deviceDefinitionService.addDevice(deviceDefinition) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"})) : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null)); } From 9f4ea53d3131d68a891931b55cb89237846fc82c Mon Sep 17 00:00:00 2001 From: duhe Date: Mon, 24 Mar 2025 19:48:43 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93=20?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E5=AE=A1=E6=89=B9=E7=94=BB=E9=9D=A2=20=20?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E8=B0=83=E8=AF=95=20up=20by=20dh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurchaseInventoryController.java | 4 +- .../dto/PurchaseInventoryDto.java | 2 +- .../views/catalog/device/components/device.js | 20 +- .../device/components/deviceDialog.vue | 159 ++++++++-- .../src/views/catalog/device/index.vue | 20 +- .../src/views/catalog/disease/index.vue | 4 +- .../components/inventoryReceiptDialog.vue | 56 +++- .../components/purchaseinventory.js | 41 +-- .../purchaseinventory/index.vue | 280 +++--------------- 9 files changed, 284 insertions(+), 302 deletions(-) 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 dcced6ff..dc094629 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 @@ -98,7 +98,7 @@ public class PurchaseInventoryController { * @return 操作结果 */ @PutMapping("/submit-approval") - public R submitApproval(@RequestParam String busNo) { + public R submitApproval(@RequestBody String busNo) { return purchaseInventoryAppService.submitApproval(busNo); } @@ -109,7 +109,7 @@ public class PurchaseInventoryController { * @return 操作结果 */ @PutMapping("/withdraw-approval") - public R withdrawApproval(@RequestParam String busNo) { + public R withdrawApproval(@RequestBody String busNo) { return purchaseInventoryAppService.withdrawApproval(busNo); } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/PurchaseInventoryDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/PurchaseInventoryDto.java index 4e7655a3..a69a87dc 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/PurchaseInventoryDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/inventorymanage/dto/PurchaseInventoryDto.java @@ -71,7 +71,7 @@ public class PurchaseInventoryDto { private Long purposeLocationStoreId; /** 申请人 */ - @NotNull +// @NotNull private Long applicantId; /** 经手人 */ diff --git a/openhis-ui-vue3/src/views/catalog/device/components/device.js b/openhis-ui-vue3/src/views/catalog/device/components/device.js index 061efdbc..475a2a00 100644 --- a/openhis-ui-vue3/src/views/catalog/device/components/device.js +++ b/openhis-ui-vue3/src/views/catalog/device/components/device.js @@ -71,4 +71,22 @@ export function startDevice(ids) { method: 'put', data: ids }) -} \ No newline at end of file +} + +// 查询部门树形数据 +export function deptTreeSelect(queryParams) { + return request({ + url: '/base-data-manage/organization/organization', + method: 'get', + param: queryParams + }) +} + +// 查询地点树形数据 +export function locationTreeSelect(queryParams) { + return request({ + url: '/base-data-manage/cabinet-location/cabinet-location', + method: 'get', + param: queryParams + }) +} diff --git a/openhis-ui-vue3/src/views/catalog/device/components/deviceDialog.vue b/openhis-ui-vue3/src/views/catalog/device/components/deviceDialog.vue index 65f964fc..72f004a8 100644 --- a/openhis-ui-vue3/src/views/catalog/device/components/deviceDialog.vue +++ b/openhis-ui-vue3/src/views/catalog/device/components/deviceDialog.vue @@ -24,7 +24,7 @@ - + + + + + - + - + - + + + + + + + + - + + + @@ -64,7 +109,14 @@ - + + + @@ -93,7 +145,14 @@ - + + + @@ -121,19 +180,39 @@ - + + + - - + + - + + + + @@ -143,11 +222,11 @@ - + @@ -196,18 +275,25 @@ import { addDevice, getDiseaseTreatmentInit, getDeviceOne, + deptTreeSelect, + locationTreeSelect, } from "./device"; const router = useRouter(); const { proxy } = getCurrentInstance(); -const { sys_normal_disable, sys_user_sex } = proxy.useDict( - "sys_normal_disable", - "sys_user_sex" +const { device_type_code, unit_code } = proxy.useDict( + "device_type_code", + "unit_code" ); const title = ref(""); const visible = ref(false); const emits = defineEmits(["submit"]); // 声明自定义事件 +const deptOptions = ref(undefined); // 部门树选项 +const locationOptions = ref(undefined); // 地点树选项 +const deviceCategories = ref([]); // 器材分类 +const statusFlagOptions = ref([]); // 状态标记 +const supplierListOptions = ref([]); // 供应商列表 const data = reactive({ form: {}, @@ -264,6 +350,8 @@ const data = reactive({ allergenFlag: [ { required: true, message: "过敏标记不能为空", trigger: "blur" }, ], + orgId: [{ required: true, message: "提供部门不能为空", trigger: "blur" }], + locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }], }, }); @@ -278,6 +366,14 @@ const props = defineProps({ type: String, required: false, }, + deviceCategories: { + type: Object, + required: false, + }, + statusFlagOptions: { + type: Object, + required: false, + }, }); // 显示弹框 @@ -287,9 +383,30 @@ function show() { // getList(); title.value = ""; title.value = props.title; - console.log(props, "22222", title.value); + deviceCategories.value = props.deviceCategories; + statusFlagOptions.value = props.statusFlagOptions; + console.log(props, "22222", title.value, props.deviceCategories); + getDeptTree(); + getLocationTree(); visible.value = true; } +/** 查询部门下拉树结构 */ +function getDeptTree() { + deptTreeSelect().then((response) => { + console.log(response, "response查询部门下拉树结构"); + deptOptions.value = response.data.records; + console.log(deptOptions.value, "部门下拉树结构"); + }); +} + +/** 查询地点下拉树结构 */ +function getLocationTree() { + locationTreeSelect().then((response) => { + console.log(response, "response查询部门下拉树结构"); + locationOptions.value = response.data.records; + console.log(locationOptions.value, "部门下拉树结构"); + }); +} // 显示弹框 function edit() { // queryParams.roleId = props.roleId; @@ -298,6 +415,10 @@ function edit() { title.value = ""; title.value = props.title; form.value = props.item; + deviceCategories.value = props.deviceCategories; + statusFlagOptions.value = props.statusFlagOptions; + getDeptTree(); + getLocationTree(); visible.value = true; } /** 重置操作表单 */ @@ -330,6 +451,8 @@ function reset() { version: undefined, // 器材版本 substanceText: undefined, // 主要成分 allergenFlag: undefined, // 过敏标记 + orgId: undefined, // 科室ID + locationId: undefined, // 地点ID }; proxy.resetForm("medicationRef"); } diff --git a/openhis-ui-vue3/src/views/catalog/device/index.vue b/openhis-ui-vue3/src/views/catalog/device/index.vue index 7148b113..fefa434c 100644 --- a/openhis-ui-vue3/src/views/catalog/device/index.vue +++ b/openhis-ui-vue3/src/views/catalog/device/index.vue @@ -33,7 +33,7 @@ v-model="queryParams.searchKey" placeholder="品名/商品名/英文品名/编码/拼音" clearable - style="width: 240px" + style="width: 220px" @keyup.enter="handleQuery" /> @@ -231,8 +231,8 @@ @@ -254,8 +254,8 @@ @@ -270,8 +270,8 @@ @@ -383,6 +383,8 @@ ref="deviceRef" :title="title" :item="currentData" + :deviceCategories="deviceCategories" + :statusFlagOptions="statusFlagOptions" @submit="getList()" /> 打印患者卡 打印瓶签 打印输液单 @@ -49,10 +48,15 @@

院注医嘱

- - + + + + @@ -72,7 +76,7 @@

院注执行历史

- +