|
@@ -1118,6 +1118,8 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
List<String> sampleIds = baseMapper.selectSelfSampleRecord(id);
|
|
List<String> sampleIds = baseMapper.selectSelfSampleRecord(id);
|
|
if (sampleIds.size() > 0) {
|
|
if (sampleIds.size() > 0) {
|
|
List<TrialSampleInfo> trialSampleInfos = trialSampleInfoMapper.selectBatchIds(sampleIds);
|
|
List<TrialSampleInfo> trialSampleInfos = trialSampleInfoMapper.selectBatchIds(sampleIds);
|
|
|
|
+ List<EntrustInfo> entrustInfoList = entrustInfoService.list(Wrappers.<EntrustInfo>lambdaQuery().in(EntrustInfo::getSampleId, sampleIds));
|
|
|
|
+ Map<Long, EntrustInfo> entrustInfoMap = entrustInfoList.stream().collect(Collectors.toMap(EntrustInfo::getSampleId, item -> item, (v1, v2) -> v1));
|
|
Map<Long, User> map = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
|
Map<Long, User> map = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, Function.identity()));
|
|
if (trialSampleInfos.size() > 0) {
|
|
if (trialSampleInfos.size() > 0) {
|
|
for (TrialSampleInfo trialSampleInfo : trialSampleInfos) {
|
|
for (TrialSampleInfo trialSampleInfo : trialSampleInfos) {
|
|
@@ -1126,6 +1128,20 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
TrialSampleInfoVO trialSampleInfoVO = BeanUtil.copyProperties(trialSampleInfo, TrialSampleInfoVO.class);
|
|
TrialSampleInfoVO trialSampleInfoVO = BeanUtil.copyProperties(trialSampleInfo, TrialSampleInfoVO.class);
|
|
if (trialSampleInfoVO != null) {
|
|
if (trialSampleInfoVO != null) {
|
|
trialSampleInfoVO.setUserName(ObjectUtil.isNotEmpty(user.getName()) ? user.getName() : user.getRealName());
|
|
trialSampleInfoVO.setUserName(ObjectUtil.isNotEmpty(user.getName()) ? user.getName() : user.getRealName());
|
|
|
|
+ EntrustInfo entrustInfo = entrustInfoMap.get(trialSampleInfo.getId());
|
|
|
|
+ if (entrustInfo != null && entrustInfo.getSampleStatus() != null) {
|
|
|
|
+ if (entrustInfo.getSampleStatus().equals("6")) {
|
|
|
|
+ trialSampleInfoVO.setSampleProcessing("处理");
|
|
|
|
+ trialSampleInfoVO.setSampleProcessingResult(entrustInfo.getRepealReason() == null ? "" : entrustInfo.getRepealReason());
|
|
|
|
+ } else if (entrustInfo.getSampleStatus().equals("5")) {
|
|
|
|
+ trialSampleInfoVO.setSampleProcessing("留样");
|
|
|
|
+ Date endTime = entrustInfo.getResamEndTime();
|
|
|
|
+ Date startTime = entrustInfo.getResamStartTime();
|
|
|
|
+ if (startTime != null && endTime != null) {
|
|
|
|
+ trialSampleInfoVO.setSampleProcessingResult(DateUtil.format(startTime, "yyyy-MM-dd") + "-" + DateUtil.format(endTime, "yyyy-MM-dd"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
result.add(trialSampleInfoVO);
|
|
result.add(trialSampleInfoVO);
|
|
}
|
|
}
|
|
}
|
|
}
|