diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java index f36ccaf4..11f5850e 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java @@ -2,12 +2,12 @@ package com.openhis.web.outpatientmanage.appservice; import java.util.List; +import javax.servlet.http.HttpServletRequest; + import com.baomidou.mybatisplus.core.metadata.IPage; import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto; import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto; -import javax.servlet.http.HttpServletRequest; - /** * 门诊管理——输液实现类 * @@ -19,14 +19,13 @@ public interface IOutpatientInfusionRecordService { /** * 获取门诊输液记录的患者列表 * - * @param infusionPatientDto 输液患者实体 * @param searchKey 模糊查询关键字 * @param pageNo 当前页 * @param pageSize 每页多少条 * @return 分页查询 */ - IPage getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto, - String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request); + IPage getOutpatientInfusionPatientList(String searchKey, Integer pageNo, + Integer pageSize, HttpServletRequest request); /** * 点击患者,查询该患者的输液记录 @@ -59,6 +58,6 @@ public interface IOutpatientInfusionRecordService { * @param historyFlag 查询的是否为执行履历 * @return 门诊输液记录列表 */ - List getPatientInfusionPerformRecord(HttpServletRequest request,boolean historyFlag); + List getPatientInfusionPerformRecord(HttpServletRequest request, boolean historyFlag); } 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 19022515..22aa6af8 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 @@ -64,22 +64,21 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR /** * 获取门诊输液记录的患者列表 * - * @param infusionPatientDto 输液患者实体 * @param searchKey 模糊查询关键字 * @param pageNo 当前页 * @param pageSize 每页多少条 * @return 分页查询 */ @Override - public IPage getOutpatientInfusionPatientList( - OutpatientInfusionPatientDto infusionPatientDto, String searchKey, Integer pageNo, Integer pageSize, - HttpServletRequest request) { + public IPage getOutpatientInfusionPatientList(String searchKey, Integer pageNo, + Integer pageSize, HttpServletRequest request) { // 构建查询条件 - QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(infusionPatientDto, searchKey, - new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientBusNo, - CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.PatientName)), - request); + QueryWrapper queryWrapper = + HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), searchKey, + new HashSet<>(Arrays.asList(CommonConstants.FieldName.PatientBusNo, + CommonConstants.FieldName.EncounterBusNo, CommonConstants.FieldName.PatientName)), + request); IPage outpatientInfusionPatientDto = outpatientManageMapper.getOutpatientInfusionPatient(new Page<>(pageNo, pageSize), queryWrapper); @@ -113,11 +112,11 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(null, null, null, request); + HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), null, null, request); queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId()); // based_on_id 是为空的 - queryWrapper.eq(CommonConstants.FieldName.BasedOnId, null); + queryWrapper.isNull(CommonConstants.FieldName.BasedOnId); // 状态是未完成的 queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.IN_PROGRESS.getValue()); @@ -315,7 +314,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(null, null, null, request); + HisQueryUtils.buildQueryWrapper(new OutpatientInfusionRecordDto(), null, null, request); // 执行历史查询的条件 if (historyFlag) { diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java index c4d563fb..9f7f3e7d 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java @@ -36,20 +36,18 @@ public class OutpatientInfusionRecordController { /** * 查询门诊输液的患者列表 * - * @param infusionPatientDto 患者实体 * @param searchKey 模糊查询关键字 * @param pageNo 当前页 * @param pageSize 每页多少条 * @return 返回门诊输液的患者列表 */ @GetMapping(value = "/infusion-patient-list") - public R getOutpatientInfusionPatientList(OutpatientInfusionPatientDto infusionPatientDto, - @RequestParam(value = "searchKey", defaultValue = "") String searchKey, + public R getOutpatientInfusionPatientList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { return R - .ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(infusionPatientDto,searchKey, pageNo, pageSize, request)); + .ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(searchKey, pageNo, pageSize, request)); } /** diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java index 752e2031..4fc0a2aa 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java @@ -1,5 +1,6 @@ package com.openhis.web.outpatientmanage.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; @@ -51,6 +52,6 @@ public class OutpatientInfusionPatientDto { private String ageString; /** 开单时间 */ - private Date createTime; + private String createTime; } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionRecordDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionRecordDto.java index e9228231..8c2d9496 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionRecordDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionRecordDto.java @@ -3,6 +3,7 @@ package com.openhis.web.outpatientmanage.dto; import java.math.BigDecimal; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.openhis.common.annotation.Dict; @@ -119,6 +120,6 @@ public class OutpatientInfusionRecordDto { private String skinTestFlag_enumText; /** 开单时间 */ - private Date createTime; + private String createTime; } diff --git a/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml index 96afe984..87ce0209 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml @@ -157,8 +157,8 @@ pt.name AS patient_name, --病人姓名 pt.id_card AS id_card, --病人身份证号 sr.tenant_id, - pt.gender_enum AS gender_enum, --病人性别 - mr.create_time AS create_time --开单时间 + pt.gender_enum, --病人性别 + to_char(mr.create_time, 'YYYY-MM-DD HH24:MI:SS') AS create_time--开单时间 FROM wor_service_request sr LEFT JOIN adm_encounter e ON e.id = sr.encounter_id @@ -172,7 +172,7 @@ AND sr.based_on_id is null ORDER BY - mr.create_time,e.bus_no,pt.bus_no + create_time,e.bus_no,pt.bus_no ) AS T1 ${ew.customSqlSegment} @@ -241,7 +241,7 @@ sr.performer_id, --执行护士 to_char(sr.occurrence_start_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrence_start_time, --预计执行时间 to_char(sr.occurrence_end_time, 'YYYY-MM-DD HH24:MI:SS') AS occurrence_end_time, --预计结束时间 - mr.create_time --开单时间 + to_char(mr.create_time, 'YYYY-MM-DD HH24:MI:SS') AS create_time--开单时间 FROM wor_service_request sr LEFT JOIN adm_encounter e ON e.id = sr.encounter_id @@ -257,7 +257,7 @@ ORDER BY - mr.create_time desc,e.bus_no,pt.bus_no + create_time desc,e.bus_no,pt.bus_no ) AS T1 ${ew.customSqlSegment}