From 9de954bafc2cfe186eaefc0e99fa5fc292a8d45b Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期一, 09 九月 2024 18:13:04 +0800 Subject: [PATCH] 一机一档注册率档案考核比优化 --- ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java index 1b5c7fa..61ebd1f 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwUnitServiceImpl.java @@ -216,8 +216,18 @@ @Override public Result workList(DistributeWorkOrderQuery query) { - List<YwUnitVO> entities = baseMapper.workList(query); - return Result.ok().data(entities); + List<YwUnit> ywUnits = baseMapper.selectList(null); + List<YwUnitVO> lists = ywUnits.stream().map(item -> { + YwUnitVO vo = new YwUnitVO(); + BeanUtils.copyProperties(item, vo); + return vo; + }).collect(Collectors.toList()); + for (YwUnitVO ywUnit : lists) { + query.setUnitId(ywUnit.getId()); + Integer workOrderNum = baseMapper.workList(query); + ywUnit.setWorkOrderCount(workOrderNum); + } + return Result.ok().data(lists); } @Override -- Gitblit v1.8.0