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