diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java index 88468e21d..76da432c7 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java @@ -5,6 +5,7 @@ import com.core.common.core.domain.R; import com.openhis.web.doctorstation.dto.AdviceBaseDto; import com.openhis.web.doctorstation.dto.AdviceSaveParam; import com.openhis.web.doctorstation.dto.OrderBindInfoDto; +import com.openhis.web.doctorstation.dto.SurgeryItemDto; import com.openhis.web.doctorstation.dto.UpdateGroupIdParam; import java.util.List; @@ -134,4 +135,16 @@ public interface IDoctorStationAdviceAppService { * @return 已配置的药品类别编码列表 */ R getConfiguredCategories(Long organizationId); + + /** + * 手术项目专用分页查询(仅手术 + 定价,无库存/草稿库存/取药科室等无关逻辑) + * + * @param organizationId 科室ID(可选) + * @param pageNo 当前页 + * @param pageSize 每页条数 + * @param searchKey 模糊查询关键字(可选) + * @return 手术项目分页数据(含价格信息) + */ + IPage getSurgeryPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey); + } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 4fffefc0c..b891617f3 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -2442,4 +2442,20 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp return R.ok(categoryCodes); } + /** + * 手术项目专用分页查询(仅手术 + 定价,无库存/草稿库存/取药科室等无关逻辑) + */ + @Override + public IPage getSurgeryPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey) { + log.info("getSurgeryPage 开始: orgId={}, page={}/{}, searchKey={}", organizationId, pageNo, pageSize, searchKey); + long start = System.currentTimeMillis(); + IPage result = doctorStationAdviceAppMapper.getSurgeryPage( + new Page<>(pageNo, pageSize), + PublicationStatus.ACTIVE.getValue(), + organizationId, + searchKey); + log.info("getSurgeryPage 完成: {}ms, total={}, records={}", System.currentTimeMillis() - start, result.getTotal(), result.getRecords().size()); + return result; + } + } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java index 3f1a49f3a..adaa524f7 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java @@ -203,4 +203,22 @@ public class DoctorStationAdviceController { return iDoctorStationAdviceAppService.getConfiguredCategories(organizationId); } + /** + * 手术项目专用分页查询(仅手术 + 定价,无库存/草稿库存/取药科室等无关逻辑) + * + * @param organizationId 科室ID(可选) + * @param pageNo 当前页 + * @param pageSize 每页条数 + * @param searchKey 模糊查询关键字(可选) + * @return 手术项目分页数据(含价格信息) + */ + @GetMapping(value = "/surgery-page") + public R getSurgeryPage( + @RequestParam(value = "organizationId", required = false) Long organizationId, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "500") Integer pageSize, + @RequestParam(value = "searchKey", defaultValue = "") String searchKey) { + return R.ok(iDoctorStationAdviceAppService.getSurgeryPage(organizationId, pageNo, pageSize, searchKey)); + } + } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/SurgeryItemDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/SurgeryItemDto.java new file mode 100644 index 000000000..d49f340e3 --- /dev/null +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/SurgeryItemDto.java @@ -0,0 +1,42 @@ +package com.openhis.web.doctorstation.dto; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 手术项目选择器专用 DTO(不含 @Dict 注解,绕过 DictAspect 的 Redis 字典翻译) + */ +@Data +public class SurgeryItemDto { + + /** 医嘱定义ID */ + @JsonSerialize(using = ToStringSerializer.class) + private Long adviceDefinitionId; + + /** 手术名称 */ + private String adviceName; + + /** 所属科室ID */ + @JsonSerialize(using = ToStringSerializer.class) + private Long orgId; + + /** 执行科室ID */ + @JsonSerialize(using = ToStringSerializer.class) + private Long positionId; + + /** 费用定价主表ID(用于提交时关联价格) */ + @JsonSerialize(using = ToStringSerializer.class) + private Long chargeItemDefinitionId; + + /** 单价(直接从定价主表取,无需嵌套 priceList) */ + private BigDecimal price; + + /** 单位编码 */ + private String unitCode; + + /** 单位编码字典文本(前端用于显示单位) */ + private String unitCodeDictText; +} diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java index 489d98d04..64e7f2adc 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java @@ -185,4 +185,18 @@ public interface DoctorStationAdviceAppMapper { */ Long getDefaultAccountId(@Param("encounterId") Long encounterId); + /** + * 手术项目专用分页查询(仅手术 + 定价,无库存/草稿库存/取药科室等无关逻辑) + * + * @param page 分页参数 + * @param statusEnum 启用状态 + * @param organizationId 科室ID(可选,用于过滤已配置的手术项目) + * @param searchKey 模糊查询关键字(可选) + * @return 手术项目分页数据 + */ + IPage getSurgeryPage(@Param("page") Page page, + @Param("statusEnum") Integer statusEnum, + @Param("organizationId") Long organizationId, + @Param("searchKey") String searchKey); + } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index 9d3a7cf29..5c57e9ad3 100755 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -811,4 +811,29 @@ LIMIT 1 + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/api.js b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/api.js index bc151ca38..e4149df86 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/api.js +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/api.js @@ -1,6 +1,15 @@ import request from '@/utils/request'; // 申请单相关接口 +// 手术项目专用分页查询(仅手术 + 定价,无库存/草稿库存等无关逻辑) +export function getSurgeryPage(params) { + return request({ + url: '/doctor-station/advice/surgery-page', + method: 'get', + params: params, + }); +} + //医嘱大下拉 export function getApplicationList(queryParams) { return request({ diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/medicalExaminations.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/medicalExaminations.vue index 9c99f8d3b..c71f9c5e9 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/medicalExaminations.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/medicalExaminations.vue @@ -274,7 +274,7 @@ const getList = () => { } loading.value = true; getApplicationList({ - pageSize: 500, + pageSize: 5000, pageNum: 1, categoryCode: '23', organizationId: effectivePatientInfo.value.inHospitalOrgId, @@ -542,6 +542,8 @@ const submit = () => { let applicationListAllFilter = applicationListAll.value.filter((item) => { return transferValue.value.includes(item.adviceDefinitionId); }); + // 从原始记录中提取检查项目名称,用于申请单名称字段 + const selectedNames = applicationListAllFilter.map(item => item.adviceName).join('+'); applicationListAllFilter = applicationListAllFilter.map((item) => { return { adviceDefinitionId: item.adviceDefinitionId, @@ -573,7 +575,7 @@ const submit = () => { encounterId: effectivePatientInfo.value.encounterId, organizationId: effectivePatientInfo.value.inHospitalOrgId, requestFormId: requestFormId, - name: applicationListAllFilter.map(item => item.adviceName).join('、'), + name: selectedNames, descJson: JSON.stringify(submitForm), categoryEnum: '22', }).then((res) => { diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue index f7177155f..f4c240e6b 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/order/applicationForm/surgery.vue @@ -5,13 +5,27 @@ -->