bug修改
This commit is contained in:
@ -3,6 +3,7 @@ package org.dromara.bigscreen.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||
@ -141,11 +142,12 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
// 获取大屏数据
|
||||
ProjectPeopleVo vo = new ProjectPeopleVo();
|
||||
// 获取施工人员总数
|
||||
Long count = constructionUserService.lambdaQuery()
|
||||
List<SubConstructionUser> list = constructionUserService.lambdaQuery()
|
||||
.eq(SubConstructionUser::getProjectId, projectId)
|
||||
.eq(SubConstructionUser::getUserRole, "0")
|
||||
.isNotNull(SubConstructionUser::getTeamId)
|
||||
.count();
|
||||
.isNotNull(SubConstructionUser::getTeamId).list();
|
||||
List<Long> sysUserIdList = list.stream().map(SubConstructionUser::getSysUserId).toList();
|
||||
int count = list.size();
|
||||
BigDecimal countDec = BigDecimal.valueOf(count);
|
||||
vo.setPeopleCount(countDec);
|
||||
// 获取考勤数据
|
||||
@ -159,13 +161,16 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
List<BusProjectTeamMember> memberList = projectTeamMemberService.lambdaQuery()
|
||||
.select(BusProjectTeamMember::getId, BusProjectTeamMember::getTeamId)
|
||||
.eq(BusProjectTeamMember::getProjectId, projectId)
|
||||
.in(BusProjectTeamMember::getMemberId, sysUserIdList)
|
||||
.list();
|
||||
Map<Long, List<BusProjectTeamMember>> memberMap = memberList.stream()
|
||||
.collect(Collectors.groupingBy(BusProjectTeamMember::getTeamId));
|
||||
// 统计班组考勤数据
|
||||
Map<Long, List<SubConstructionUser>> userTeamMap = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(attendancePeopleList)) {
|
||||
List<SubConstructionUser> users = constructionUserService.listByIds(attendancePeopleList);
|
||||
List<SubConstructionUser> users = constructionUserService.lambdaQuery()
|
||||
.in(SubConstructionUser::getSysUserId, attendancePeopleList)
|
||||
.list();
|
||||
userTeamMap = users.stream()
|
||||
.collect(Collectors.groupingBy(SubConstructionUser::getTeamId));
|
||||
}
|
||||
@ -176,7 +181,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
String punchTime = "";
|
||||
if (punchRange != null) {
|
||||
String start = punchRange.split(",")[0];
|
||||
punchTime = LocalDate.now() + " " + start;
|
||||
punchTime = LocalDate.now() + " ";
|
||||
}
|
||||
List<ProjectTeamAttendanceVo> listVo = new ArrayList<>();
|
||||
for (BusProjectTeam projectTeam : teamList) {
|
||||
|
||||
Reference in New Issue
Block a user