12-18-人员管理大屏-修复循环注入版-修复timeType版-消息回复-完善-修复版-优化分包公司查询版-修复数据-优化查询-完善
This commit is contained in:
@ -3002,12 +3002,17 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
ryglWebSocketVo.setZzId(info.getContractorId());
|
ryglWebSocketVo.setZzId(info.getContractorId());
|
||||||
//分包组织名称
|
//分包组织名称
|
||||||
if (info.getContractorId() != null) {
|
if (info.getContractorId() != null) {
|
||||||
|
boolean flag = false;
|
||||||
for (SubContractor subContractor : SubContractors) {
|
for (SubContractor subContractor : SubContractors) {
|
||||||
if (subContractor.getId().equals(info.getContractorId())) {
|
if (subContractor.getId().equals(info.getContractorId())) {
|
||||||
|
flag = true;
|
||||||
ryglWebSocketVo.setZzmc(subContractor.getName());
|
ryglWebSocketVo.setZzmc(subContractor.getName());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!flag){
|
||||||
|
ryglWebSocketVo.setZzmc("暂无名称");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//总人数 先设置1
|
//总人数 先设置1
|
||||||
ryglWebSocketVo.setZrs(finalTime);
|
ryglWebSocketVo.setZrs(finalTime);
|
||||||
@ -3027,7 +3032,11 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
//班组组织id
|
//班组组织id
|
||||||
ryglWebSocketVo.setZzId(info.getTeamId());
|
ryglWebSocketVo.setZzId(info.getTeamId());
|
||||||
//班组组织名称
|
//班组组织名称
|
||||||
ryglWebSocketVo.setZzmc(info.getTeamName());
|
if (info.getTeamName() != null) {
|
||||||
|
ryglWebSocketVo.setZzmc(info.getTeamName());
|
||||||
|
}else {
|
||||||
|
ryglWebSocketVo.setZzmc("暂无班组名称");
|
||||||
|
}
|
||||||
//总人数
|
//总人数
|
||||||
ryglWebSocketVo.setZrs(finalTime);
|
ryglWebSocketVo.setZrs(finalTime);
|
||||||
ryglWebSocketVo.setDgrs(getDgrs(info.getSysUserId(),finalTime,projectId,attendanceList));
|
ryglWebSocketVo.setDgrs(getDgrs(info.getSysUserId(),finalTime,projectId,attendanceList));
|
||||||
@ -3045,28 +3054,9 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
|||||||
* 获取到岗人数 根据时间类型 返回到岗次数
|
* 获取到岗人数 根据时间类型 返回到岗次数
|
||||||
*/
|
*/
|
||||||
private Long getDgrs(Long userId,Long time,Long projectId,List<BusAttendance> attendanceList) {
|
private Long getDgrs(Long userId,Long time,Long projectId,List<BusAttendance> attendanceList) {
|
||||||
// 今天所有用户的打卡记录
|
// 过滤出该用户的打卡记录
|
||||||
List<BusAttendance> busAttendances = attendanceList.stream().filter(item -> Objects.equals(item.getUserId(), userId)).toList();
|
List<BusAttendance> busAttendances = attendanceList.stream().filter(item -> Objects.equals(item.getUserId(), userId)).toList();
|
||||||
// List<BusAttendance> attendanceList;
|
|
||||||
// LambdaQueryWrapper<BusAttendance> lqw = new LambdaQueryWrapper<BusAttendance>()
|
|
||||||
// .eq(BusAttendance::getProjectId, projectId)
|
|
||||||
// .eq(BusAttendance::getUserId, userId);
|
|
||||||
// if (time == 1L) {
|
|
||||||
// lqw.eq(BusAttendance::getClockDate, LocalDate.now());
|
|
||||||
// } else if (time == 2L) {
|
|
||||||
// // 获取本周一到今天的日期
|
|
||||||
// LocalDate today = LocalDate.now();
|
|
||||||
// LocalDate monday = today.with(DayOfWeek.MONDAY);
|
|
||||||
// lqw.between(BusAttendance::getClockDate, monday, today);
|
|
||||||
// }else if (time == 3L){
|
|
||||||
// // 获取本月1号到今天的日期
|
|
||||||
// LocalDate today = LocalDate.now();
|
|
||||||
// LocalDate firstDayOfMonth = today.with(TemporalAdjusters.firstDayOfMonth());
|
|
||||||
// lqw.between(BusAttendance::getClockDate, firstDayOfMonth, today);
|
|
||||||
// }
|
|
||||||
// lqw.in(BusAttendance::getClockStatus, ATTENDANCE_STATUS)
|
|
||||||
// .apply(" user_id not in (select sys_user_id from sub_construction_user where project_id = {0} and user_role != '0' )", projectId);
|
|
||||||
// attendanceList = this.list(lqw);
|
|
||||||
if (busAttendances.isEmpty()){
|
if (busAttendances.isEmpty()){
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user