|
|
|
@ -16,6 +16,7 @@ import digital.laboratory.platform.entrustment.entity.Entrustment; |
|
|
|
|
import digital.laboratory.platform.entrustment.entity.EntrustmentIdentificationMaterial; |
|
|
|
|
import digital.laboratory.platform.entrustment.enums.EntrustmentStatusConstants; |
|
|
|
|
import digital.laboratory.platform.entrustment.mapper.EntrustMaterialCheckoutResultMapper; |
|
|
|
|
import digital.laboratory.platform.entrustment.mapper.EntrustmentIdentificationMaterialMapper; |
|
|
|
|
import digital.laboratory.platform.entrustment.query.EntrustMaterialCheckoutResultQuery; |
|
|
|
|
import digital.laboratory.platform.entrustment.service.CommonFeignService; |
|
|
|
|
import digital.laboratory.platform.entrustment.service.EntrustMaterialCheckoutResultService; |
|
|
|
@ -23,6 +24,7 @@ import digital.laboratory.platform.entrustment.service.EntrustmentIdentification |
|
|
|
|
import digital.laboratory.platform.entrustment.service.EntrustmentService; |
|
|
|
|
import digital.laboratory.platform.entrustment.vo.DetectionRateVO; |
|
|
|
|
import digital.laboratory.platform.entrustment.vo.EntrustMaterialCheckoutResultVO; |
|
|
|
|
import digital.laboratory.platform.entrustment.vo.EntrustmentIdentificationMaterialVO; |
|
|
|
|
import digital.laboratory.platform.sys.entity.Area; |
|
|
|
|
import digital.laboratory.platform.sys.entity.DrugLite; |
|
|
|
|
import org.apache.poi.ss.usermodel.*; |
|
|
|
@ -58,6 +60,8 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus |
|
|
|
|
@Resource |
|
|
|
|
private CommonFeignService commonFeignService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private EntrustmentIdentificationMaterialMapper entrustmentIdentificationMaterialMapper; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 构建委托材料检验结果字符串 |
|
|
|
@ -378,6 +382,7 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus |
|
|
|
|
// 根据年份构建查询起始时间
|
|
|
|
|
LocalDateTime startTime = getStartTime(year); |
|
|
|
|
List<String> entrustIdList = getEntrustIdListByOrgId(orgId); |
|
|
|
|
|
|
|
|
|
// 查询所有非空且不为空的定性结果,且创建时间大于等于起始时间
|
|
|
|
|
List<EntrustMaterialCheckoutResult> list = this.list(Wrappers.<EntrustMaterialCheckoutResult>lambdaQuery() |
|
|
|
|
.in(CollUtil.isNotEmpty(entrustIdList), EntrustMaterialCheckoutResult::getEntrustId, entrustIdList) |
|
|
|
@ -444,6 +449,7 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus |
|
|
|
|
LocalDateTime startTime = getStartTime(year); |
|
|
|
|
List<String> entrustIdList = getEntrustIdListByOrgId(orgId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询所有非空且不为空的定性结果,且创建时间大于等于起始时间
|
|
|
|
|
List<EntrustmentIdentificationMaterial> materialList = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() |
|
|
|
|
.in(CollUtil.isNotEmpty(entrustIdList), EntrustmentIdentificationMaterial::getEntrustmentId, entrustIdList) |
|
|
|
@ -484,7 +490,28 @@ public class EntrustMaterialCheckoutResultServiceImpl extends ServiceImpl<Entrus |
|
|
|
|
return vo ; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// public IPage<EntrustmentIdentificationMaterialVO> getMaterialBy
|
|
|
|
|
@Override |
|
|
|
|
public IPage<EntrustmentIdentificationMaterialVO> getMaterialByDetection(String drugName, Integer year, Page page){ |
|
|
|
|
|
|
|
|
|
List<EntrustMaterialCheckoutResult> list = this.list(Wrappers.<EntrustMaterialCheckoutResult>lambdaQuery() |
|
|
|
|
.like(EntrustMaterialCheckoutResult::getQualitativeResult, drugName)); |
|
|
|
|
|
|
|
|
|
ArrayList<String> materialIdList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
for (EntrustMaterialCheckoutResult result : list) { |
|
|
|
|
materialIdList.add(result.getId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LocalDateTime startTime = this.getStartTime(year); |
|
|
|
|
|
|
|
|
|
Page materialPage = entrustmentIdentificationMaterialService.page(page, Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery() |
|
|
|
|
.in(EntrustmentIdentificationMaterial::getId, materialIdList) |
|
|
|
|
.ge(EntrustmentIdentificationMaterial::getAcceptTime, startTime) |
|
|
|
|
.orderByDesc(EntrustmentIdentificationMaterial::getAcceptTime)); |
|
|
|
|
return materialPage; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|