bug
This commit is contained in:
@ -100,9 +100,16 @@ public class ProjectBigScreenController extends BaseController {
|
||||
LambdaQueryWrapper<BusLandTransferLedgerSon> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(BusLandTransferLedgerSon::getParentId, list1);
|
||||
List<BusLandTransferLedgerSon> sonList = busLandTransferLedgerSonService.list(lambdaQueryWrapper);
|
||||
Map<Long, BigDecimal> collect = sonList.stream().filter(vo -> "1".equals(vo.getTransferStatus()))
|
||||
.collect(Collectors.toMap(BusLandTransferLedgerSon::getParentId, BusLandTransferLedgerSon::getAreaValue));
|
||||
|
||||
Map<Long, BigDecimal> collect = sonList.stream()
|
||||
.filter(vo -> "1".equals(vo.getTransferStatus()))
|
||||
.collect(Collectors.groupingBy(
|
||||
BusLandTransferLedgerSon::getParentId,
|
||||
Collectors.reducing(
|
||||
BigDecimal.ZERO,
|
||||
BusLandTransferLedgerSon::getAreaValue,
|
||||
BigDecimal::add
|
||||
)
|
||||
));
|
||||
for (BusLandTransferLedger busLandTransferLedger : levelList) {
|
||||
BigDecimal areaValue = collect.get(busLandTransferLedger.getId());
|
||||
if (areaValue != null) {
|
||||
|
||||
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.sse.dto.SseMessageDto;
|
||||
import org.dromara.common.sse.utils.SseMessageUtils;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.dromara.quality.domain.QltQualityInspection;
|
||||
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||
@ -19,6 +21,7 @@ import org.dromara.system.service.ISysUserService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@ -52,7 +55,7 @@ public class InspectionJob {
|
||||
for (int i = 0; i < list.size(); i += batchSize) {
|
||||
int endIndex = Math.min(i + batchSize, list.size());
|
||||
List<QltQualityInspection> batch = list.subList(i, endIndex);
|
||||
|
||||
List<Long> userIds = new ArrayList<>();
|
||||
for (QltQualityInspection qualityInspection : batch) {
|
||||
Long correctorId = qualityInspection.getCorrectorId();
|
||||
String phonenumber = userService.queryById(correctorId).getPhonenumber();
|
||||
@ -63,8 +66,15 @@ public class InspectionJob {
|
||||
if (!smsResponse.isSuccess()) {
|
||||
log.error("验证码短信发送异常 => {}", smsResponse);
|
||||
}
|
||||
userIds.add(correctorId);
|
||||
}
|
||||
|
||||
if(userIds.isEmpty()){
|
||||
continue;
|
||||
}
|
||||
SseMessageDto sseMessageDto = new SseMessageDto();
|
||||
sseMessageDto.setMessage("您负责整改的质量工单已逾期,请尽快前往处理!");
|
||||
sseMessageDto.setUserIds(userIds);
|
||||
SseMessageUtils.publishMessage(sseMessageDto);
|
||||
log.info("质量工单短信提醒批次发送完成,当前批次数量: {}", batch.size());
|
||||
}
|
||||
|
||||
@ -88,6 +98,7 @@ public class InspectionJob {
|
||||
int endIndex = Math.min(i + batchSize, list.size());
|
||||
List<HseSafetyInspection> batch = list.subList(i, endIndex);
|
||||
|
||||
List<Long> userIds = new ArrayList<>();
|
||||
for (HseSafetyInspection safetyInspection : batch) {
|
||||
Long correctorId = safetyInspection.getCorrectorId();
|
||||
String phonenumber = userService.queryById(correctorId).getPhonenumber();
|
||||
@ -98,8 +109,14 @@ public class InspectionJob {
|
||||
if (!smsResponse.isSuccess()) {
|
||||
log.error("验证码短信发送异常 => {}", smsResponse);
|
||||
}
|
||||
userIds.add(correctorId);
|
||||
}
|
||||
|
||||
SseMessageDto sseMessageDto = new SseMessageDto();
|
||||
sseMessageDto.setMessage("您负责整改的安全工单已逾期,请尽快前往处理!");
|
||||
sseMessageDto.setUserIds(userIds);
|
||||
SseMessageUtils.publishMessage(sseMessageDto);
|
||||
|
||||
log.info("安全工单短信提醒批次发送完成,当前批次数量: {}", batch.size());
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +119,8 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
|
||||
// 出勤状态(正常、迟到、早退)
|
||||
private static final Set<String> ATTENDANCE_STATUS = new HashSet<>(Arrays.asList(BusAttendanceClockStatusEnum.NORMAL.getValue(),
|
||||
BusAttendanceClockStatusEnum.LATE.getValue(), BusAttendanceClockStatusEnum.LEAVEEARLY.getValue()));
|
||||
BusAttendanceClockStatusEnum.LATE.getValue(), BusAttendanceClockStatusEnum.LEAVEEARLY.getValue()
|
||||
,BusAttendanceClockStatusEnum.REISSUE.getValue()));
|
||||
|
||||
|
||||
/**
|
||||
@ -1267,9 +1268,10 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
|
||||
LocalDate now = LocalDate.now();
|
||||
|
||||
// //查询所有管理员和分包人员 排除
|
||||
//查询所有管理员和分包人员 排除
|
||||
// List<Long> excludeUserIds = constructionUserService.list(Wrappers.<SubConstructionUser>lambdaQuery()
|
||||
// .ne(SubConstructionUser::getUserRole, "0")
|
||||
// .eq()
|
||||
// ).stream().map(SubConstructionUser::getSysUserId).toList();
|
||||
|
||||
List<Long> allUserIds = constructionUserService.list(Wrappers.<SubConstructionUser>lambdaQuery()
|
||||
|
||||
Reference in New Issue
Block a user