From 245a4424bb6bb31368baa214deb89dd68a4ad1f1 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Mon, 17 Mar 2025 15:14:01 +0800 Subject: [PATCH] up --- .../OutpatientInfusionRecordServiceImpl.java | 15 ++++------ .../appservice/IOutpatientRecordService.java | 14 ++++----- .../impl/OutpatientRecordServiceImpl.java | 29 +++++++------------ .../OutpatientRecordController.java | 2 +- .../dto/OutpatientRecordInitDto.java | 21 -------------- 5 files changed, 24 insertions(+), 57 deletions(-) delete mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordInitDto.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index c662006d..91e675cf 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -3,7 +3,6 @@ package com.openhis.web.outpatientmanage.appservice.impl; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.Arrays; -import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; @@ -40,6 +39,7 @@ import com.openhis.web.outpatientmanage.mapper.OutpatientManageMapper; import com.openhis.workflow.domain.ServiceRequest; import com.openhis.workflow.mapper.ServiceRequestMapper; import com.openhis.workflow.service.IServiceRequestService; +import org.springframework.transaction.annotation.Transactional; /** * 门诊管理——输液实现类 @@ -48,6 +48,7 @@ import com.openhis.workflow.service.IServiceRequestService; * @date 2025/3/12 */ @Service +@Transactional public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionRecordService { @Resource @@ -119,23 +120,21 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR public IPage getOutpatientInfusionPatient( OutpatientInfusionSearchParam outpatientInfusionSearchParam, Integer pageNo, Integer pageSize) { - String searchKey; LocalDateTime beginTime; LocalDateTime endTime; if (outpatientInfusionSearchParam == null || outpatientInfusionSearchParam.getBeginTime() == null || outpatientInfusionSearchParam.getEndTime() == null) { - searchKey = null; beginTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true); endTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false); } else { - searchKey = outpatientInfusionSearchParam.getSearchKey(); beginTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getBeginTime(), true); endTime = DateUtils.startDayOrEndDay(outpatientInfusionSearchParam.getEndTime(), false); } // 构建查询条件 - QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey, - new HashSet<>(Arrays.asList("patient_bus_no", "encounter_bus_no", "patient_name")), null); + QueryWrapper queryWrapper = + HisQueryUtils.buildQueryWrapper(null, outpatientInfusionSearchParam.getSearchKey(), + new HashSet<>(Arrays.asList("patient_bus_no", "encounter_bus_no", "patient_name")), null); // based_on_id 是为空的 queryWrapper.eq("based_on_id", null); // 状态是未完成的 @@ -195,8 +194,6 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR */ @Override public boolean editPatientInfusionRecord(OutpatientInfusionRecordDto outpatientInfusionRecordDto, Long exeCount) { - // 这里执行一次就insert 表 wor_service_request里一条数据,based_on_id一直,以mr.quantity来振分 - // 点击执行一次,生成一条执行记录,确认执行+1 ,直至所有药品打完, // 根据执行人ID,通过登录userId获取 Practitioner practitioner = @@ -291,7 +288,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR LocalDateTime beginDateTime; LocalDateTime endDateTime; - //筛选时间不传,默认当天记录 + // 筛选时间不传,默认当天记录 if (beginTime == null || endTime == null) { beginDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), true); endDateTime = DateUtils.startDayOrEndDay(DateUtils.getDate(), false); diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/IOutpatientRecordService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/IOutpatientRecordService.java index de1cc541..fa9ab5e7 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/IOutpatientRecordService.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/IOutpatientRecordService.java @@ -4,7 +4,6 @@ import java.util.List; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.openhis.web.patientmanage.dto.OutpatientRecordDto; -import com.openhis.web.patientmanage.dto.OutpatientRecordInitDto; import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam; /** @@ -15,13 +14,6 @@ import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam; */ public interface IOutpatientRecordService { - /** - * 获取门诊记录初期数据列表 - * - * @return 门诊记录初期数据列表 - */ - OutpatientRecordInitDto getOutpatientRecordInit(); - /** * 分页查询门诊记录 * @@ -33,4 +25,10 @@ public interface IOutpatientRecordService { Page getPatient(OutpatientRecordSearchParam outpatientRecordSearchParam, Integer pageNo, Integer pageSize); + /** + * 获取医生名字列表 + * + * @return 医生名字列表 + */ + List getDoctorNames(); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/OutpatientRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/OutpatientRecordServiceImpl.java index 2a64c4bf..71261560 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/OutpatientRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/appservice/impl/OutpatientRecordServiceImpl.java @@ -2,7 +2,8 @@ package com.openhis.web.patientmanage.appservice.impl; import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; +import javax.annotation.Resource; + import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -11,12 +12,9 @@ import com.openhis.common.enums.EncounterSubjectStatus; import com.openhis.common.utils.EnumUtils; import com.openhis.web.patientmanage.appservice.IOutpatientRecordService; import com.openhis.web.patientmanage.dto.OutpatientRecordDto; -import com.openhis.web.patientmanage.dto.OutpatientRecordInitDto; import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam; import com.openhis.web.patientmanage.mapper.PatientManageMapper; -import javax.annotation.Resource; - /** * 门诊记录查询 应用实现 * @@ -29,20 +27,6 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService { @Resource PatientManageMapper patientManageMapper; - /** - * 获取门诊记录初期数据列表 - * - * @return 门诊记录初期数据列表 - */ - @Override - public OutpatientRecordInitDto getOutpatientRecordInit() { - - OutpatientRecordInitDto intoDto = new OutpatientRecordInitDto(); - // 获取医生名字列表 - intoDto.setDoctorNames(patientManageMapper.getDoctorNames()); - return intoDto; - } - /** * 分页查询门诊记录 * @@ -74,4 +58,13 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService { return outpatientRecordPage; } + /** + * 获取医生名字列表 + * + * @return 医生名字列表 + */ + public List getDoctorNames() { + return patientManageMapper.getDoctorNames(); + } + } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java index e8930adc..8580e873 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/OutpatientRecordController.java @@ -36,7 +36,7 @@ public class OutpatientRecordController { @GetMapping("/init") public R getDoctorNames() { // 获取医生名字列表 - return R.ok(outpatientRecordService.getOutpatientRecordInit()); + return R.ok(outpatientRecordService.getDoctorNames()); } /** diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordInitDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordInitDto.java deleted file mode 100644 index bd96ec4f..00000000 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/dto/OutpatientRecordInitDto.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.openhis.web.patientmanage.dto; - -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * 门诊记录初始化 - * - * @author liuhr - * @date 2025/3/17 - */ -@Data -@Accessors(chain = true) -public class OutpatientRecordInitDto { - - //获取医生姓名列表 - private List doctorNames; - -}