Răsfoiți Sursa

pms 瑞都 日报详情显示 填报人

zhangcl 1 zi în urmă
părinte
comite
dfc2302b21

+ 8 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotrddailyreport/IotRdDailyReportController.java

@@ -326,6 +326,7 @@ public class IotRdDailyReportController {
 
             Set<Long> deviceIds = task.getDeviceIds();
             Set<Long> responsiblePersonIds = task.getResponsiblePerson();
+            Set<Long> submitterIds = task.getSubmitter();
             // 日报对应的任务中的设备列表
             Set<String> carDeviceCodes = new HashSet<>();
             // 中航北斗车辆id集合
@@ -478,6 +479,13 @@ public class IotRdDailyReportController {
                         .collect(Collectors.joining(","));   // 用逗号拼接所有名称
                 dailyReportVO.setResponsiblePersonNames(userNames);
             }
+            if (CollUtil.isNotEmpty(submitterIds)) {
+                List<AdminUserRespDTO> users = adminUserApi.getUserList(submitterIds);
+                String userNames = users.stream()
+                        .map(AdminUserRespDTO::getNickname) // 提取每个员工的nickName
+                        .collect(Collectors.joining(","));   // 用逗号拼接所有名称
+                dailyReportVO.setSubmitterNames(userNames);
+            }
             // 填报日报时 查询当前日报关联的任务中的车辆 查询中航北斗指定日报区间范围内的油耗数据 子表 主表
             List<IotDailyReportFuelDO> tobeAddedReportFuels = new ArrayList<>();
             if (!hasFuels) {