|
|
|
|
@ -7,6 +7,7 @@ import com.alibaba.nacos.common.utils.CollectionUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.github.binarywang.utils.qrcode.QrcodeUtils; |
|
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
@ -741,7 +742,8 @@ public class EntrustController extends BladeController { |
|
|
|
|
Integer tgNum = 0; |
|
|
|
|
//计数器计算校核通过的检测
|
|
|
|
|
for (Examine examine1 : list) { |
|
|
|
|
if (examine1.getStatus() == 1) { |
|
|
|
|
//新增取消功能 过滤到已取消检测项目
|
|
|
|
|
if (examine1.getStatus() == 1 || examine1.getStatus() == 2) { |
|
|
|
|
tgNum += 1; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -1699,6 +1701,52 @@ public class EntrustController extends BladeController { |
|
|
|
|
wrapper.ne(Entrust::getEntrustStatus, "-1"); |
|
|
|
|
wrapper.orderByDesc(Entrust::getCreateTime); |
|
|
|
|
IPage<Entrust> page = service.page(Condition.getPage(query), wrapper); |
|
|
|
|
|
|
|
|
|
//添加委托单属性
|
|
|
|
|
List<Entrust> allList = page.getRecords(); |
|
|
|
|
if (allList != null && allList.size() > 0) { |
|
|
|
|
for (Entrust entrust : allList) { |
|
|
|
|
List<String> examines = new ArrayList<>(); |
|
|
|
|
List<ExamineResult> examineList = new ArrayList<>(); |
|
|
|
|
LambdaQueryWrapper<Examine> wrappers = new LambdaQueryWrapper<>(); |
|
|
|
|
wrappers.eq(Examine::getEntrustId, entrust.getId()); |
|
|
|
|
List<Examine> allMatchList = examineService.list(wrappers); |
|
|
|
|
for (Examine examine : allMatchList) { |
|
|
|
|
Long examineItemId = examine.getExamineItemId(); |
|
|
|
|
Long examineWayId = examine.getExamineWayId(); |
|
|
|
|
ExamineWay byId1 = examineWayService.getById(examineWayId); |
|
|
|
|
ExamineItem byId = examineItemService.getById(examineItemId); |
|
|
|
|
QueryWrapper<ExamineResult> resultQueryWrapper = new QueryWrapper<>(); |
|
|
|
|
resultQueryWrapper.eq("examine_id", examine.getId()); |
|
|
|
|
ExamineResult examineResult = examineResultService.getOne(resultQueryWrapper, false); |
|
|
|
|
examine.setExamineResult(examineResult); |
|
|
|
|
if (byId != null) { |
|
|
|
|
examines.add(byId.getName()); |
|
|
|
|
examine.setExamineItemName(byId.getName()); |
|
|
|
|
entrust.setExamineItemName(byId.getName()); |
|
|
|
|
} |
|
|
|
|
if (byId1 != null) { |
|
|
|
|
examine.setExamineWayName(byId1.getName()); |
|
|
|
|
examine.setInputMode(byId1.getInputMode()); |
|
|
|
|
} |
|
|
|
|
examineList.add(examineResult); |
|
|
|
|
} |
|
|
|
|
entrust.setExamineItemName(String.join(",", examines)); |
|
|
|
|
entrust.setExamineList(allMatchList); |
|
|
|
|
} |
|
|
|
|
// 按检测项目名称内存过滤
|
|
|
|
|
if (StringUtils.isNotBlank(entry.getExamineItemName())) { |
|
|
|
|
allList = allList.stream() |
|
|
|
|
.filter(e -> e.getExamineItemName() != null |
|
|
|
|
&& e.getExamineItemName().contains(entry.getExamineItemName())) |
|
|
|
|
.collect(java.util.stream.Collectors.toList()); |
|
|
|
|
page.setRecords(allList); |
|
|
|
|
page.setTotal(allList.size()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return R.data(page); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|