修改详情查询条件
This commit is contained in:
parent
70c96391f2
commit
9959ea3270
@ -1948,9 +1948,9 @@ public class InspectPatientController {
|
||||
@GetMapping("/getworkload")
|
||||
@Operation(summary = "根据日期获取卫生院体检统计")
|
||||
public CommonResult<List<WorkloadStatisticsVO>> getWorkload(@RequestParam("dates") @DateTimeFormat(pattern = "yyyy-MM-dd") List<LocalDate> dates,
|
||||
@RequestParam(value = "examhosname", required = false) String examhosname) {
|
||||
@RequestParam(value = "hospitalNo", required = false) String hospitalNo) {
|
||||
// 获取指定日期范围内的所有患者补充信息,如果有医院名称则在数据库层面直接过滤
|
||||
List<PatientSupplementVO> supplements = patientService.getPatientSupplementsByDatesAndHospital(dates, examhosname);
|
||||
List<PatientSupplementVO> supplements = patientService.getPatientSupplementsByDatesAndHospital(dates, hospitalNo);
|
||||
|
||||
// 使用Map来存储统计结果,key为卫生院名称+行政村名称
|
||||
Map<String, WorkloadStatisticsVO> statisticsMap = new HashMap<>();
|
||||
|
@ -20,4 +20,7 @@ public class PatientDetailsVO {
|
||||
@Schema(description = "所属机构")
|
||||
private String orgid;
|
||||
|
||||
@Schema(description = "送检机构")
|
||||
private String hospitalNo;
|
||||
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public interface InspectPatientService {
|
||||
* @param examhosname 医院名称(可选)
|
||||
* @return 患者补充信息列表
|
||||
*/
|
||||
List<PatientSupplementVO> getPatientSupplementsByDatesAndHospital(List<LocalDate> dates, String examhosname);
|
||||
List<PatientSupplementVO> getPatientSupplementsByDatesAndHospital(List<LocalDate> dates, String hospitalNo);
|
||||
|
||||
void exportStatistics(List<LocalDate> dates, HttpServletResponse response);
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
InspectPatientDO::getGender,
|
||||
InspectPatientDO::getPName,
|
||||
InspectPatientDO::getCardId,
|
||||
InspectPatientDO::getOrgname,
|
||||
InspectPatientDO::getHospitalNo,
|
||||
InspectPatientDO::getDistrictname,
|
||||
InspectPatientDO::getOldmanflag,
|
||||
InspectPatientDO::getHtnflag,
|
||||
@ -221,9 +221,9 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
queryWrapper.eq(InspectPatientDO::getDistrictname, detailsVO.getAddname());
|
||||
}
|
||||
}
|
||||
if(detailsVO.getExamhosname()!=null && !detailsVO.getExamhosname().isEmpty())
|
||||
if(detailsVO.getHospitalNo()!=null && !detailsVO.getHospitalNo().isEmpty())
|
||||
{
|
||||
queryWrapper.eq(InspectPatientDO::getOrgname, detailsVO.getExamhosname());
|
||||
queryWrapper.eq(InspectPatientDO::getHospitalNo, detailsVO.getHospitalNo());
|
||||
}
|
||||
if(detailsVO.getOrgid()!=null&& !detailsVO.getOrgid().isEmpty())
|
||||
{
|
||||
@ -907,7 +907,7 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PatientSupplementVO> getPatientSupplementsByDatesAndHospital(List<LocalDate> dates, String examhosname) {
|
||||
public List<PatientSupplementVO> getPatientSupplementsByDatesAndHospital(List<LocalDate> dates, String hospitalNo) {
|
||||
if (dates == null || dates.isEmpty() || dates.size() < 2) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@ -933,8 +933,8 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
.between(InspectPatientDO::getPrinttime, startDate.atStartOfDay(), endDate.atTime(23, 59, 59));
|
||||
|
||||
// 如果医院名称有效,添加筛选条件
|
||||
if (examhosname != null && !examhosname.isEmpty() && !"null".equals(examhosname)) {
|
||||
queryWrapper.eq(InspectPatientDO::getExamhosname, examhosname);
|
||||
if (hospitalNo != null && !hospitalNo.isEmpty() && !"null".equals(hospitalNo)) {
|
||||
queryWrapper.eq(InspectPatientDO::getHospitalNo, hospitalNo);
|
||||
}
|
||||
|
||||
// 查询患者信息
|
||||
|
Loading…
Reference in New Issue
Block a user