|
|
@ -2,6 +2,7 @@ package com.docus.server.infrastructure.dao.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
import com.docus.infrastructure.core.db.dao.impl.BaseDaoImpl;
|
|
|
|
import com.docus.infrastructure.core.db.dao.impl.BaseDaoImpl;
|
|
|
|
import com.docus.infrastructure.web.request.SearchDTO;
|
|
|
|
import com.docus.infrastructure.web.request.SearchDTO;
|
|
|
|
import com.docus.infrastructure.web.response.PageResult;
|
|
|
|
import com.docus.infrastructure.web.response.PageResult;
|
|
|
@ -86,16 +87,25 @@ public class OcrBasicTestDaoImpl extends BaseDaoImpl<OcrBasicTestMapper, OcrBasi
|
|
|
|
Date endTime = searchDTO.getEndTime();
|
|
|
|
Date endTime = searchDTO.getEndTime();
|
|
|
|
query.le(OcrBasicTest::getCreateTime, endTime);
|
|
|
|
query.le(OcrBasicTest::getCreateTime, endTime);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//关键字比较,多个列or
|
|
|
|
Object patientId = searchDTO.getParams("patientId");
|
|
|
|
//if (!StringUtils.isEmpty(searchDTO.getKeyword())) {
|
|
|
|
Object inpatientNo = searchDTO.getParams("inpatientNo");
|
|
|
|
//单个列用like
|
|
|
|
Object name = searchDTO.getParams("name");
|
|
|
|
//query. like(OcrBasicTest::getxxx, searchDTO.getKeyword());
|
|
|
|
Object ocrStatue = searchDTO.getParams("ocrStatue");
|
|
|
|
//多个列用like
|
|
|
|
|
|
|
|
//query. and(sub -> sub.like(OcrBasicTest::getxx1, searchDTO.getKeyword())
|
|
|
|
if (Func.isNotEmpty(patientId)) {
|
|
|
|
// оr(). like(OcrBasicTest::getXX2, searchDTO.getKeyword()))
|
|
|
|
query.like(OcrBasicTest::getPatientId,String.format("%s%s%s","%", patientId,"%"));
|
|
|
|
//);
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
if (Func.isNotEmpty(inpatientNo)) {
|
|
|
|
//默认createTime倒序排序
|
|
|
|
query.like(OcrBasicTest::getInpatientNo, String.format("%s%s%s","%", inpatientNo,"%"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Func.isNotEmpty(name)) {
|
|
|
|
|
|
|
|
query.like(OcrBasicTest::getName, String.format("%s%s%s","%", name,"%"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Func.isNotEmpty(ocrStatue)) {
|
|
|
|
|
|
|
|
query.eq(OcrBasicTest::getOcrStatue, ocrStatue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
query.orderByDesc(OcrBasicTest::getCreateTime);
|
|
|
|
query.orderByDesc(OcrBasicTest::getCreateTime);
|
|
|
|
List<OcrBasicTest> list = super.find(query);
|
|
|
|
List<OcrBasicTest> list = super.find(query);
|
|
|
|
return new PageResult<>(list);
|
|
|
|
return new PageResult<>(list);
|
|
|
|