|
@@ -295,15 +295,30 @@ public class IotRhDailyReportServiceImpl implements IotRhDailyReportService {
|
|
|
AtomicBoolean noDeviceTeam = new AtomicBoolean(false);
|
|
AtomicBoolean noDeviceTeam = new AtomicBoolean(false);
|
|
|
|
|
|
|
|
if (ObjUtil.isEmpty(existReport)) {
|
|
if (ObjUtil.isEmpty(existReport)) {
|
|
|
-
|
|
|
|
|
// 新增日报记录 如果是 无施工设备的队伍 status auditStatus 需要单独处理
|
|
// 新增日报记录 如果是 无施工设备的队伍 status auditStatus 需要单独处理
|
|
|
if (CollUtil.isNotEmpty(teamStatusL)) {
|
|
if (CollUtil.isNotEmpty(teamStatusL)) {
|
|
|
- iotRhDailyReport.setStatus(0);
|
|
|
|
|
- iotRhDailyReport.setAuditStatus(0);
|
|
|
|
|
|
|
+ // 自动生成的日报 设置 填报完成 审批通过
|
|
|
|
|
+ iotRhDailyReport.setStatus(1);
|
|
|
|
|
+ iotRhDailyReport.setAuditStatus(20);
|
|
|
// 如果是自动生成的日报 需要根据规则设备 非生产时间
|
|
// 如果是自动生成的日报 需要根据规则设备 非生产时间
|
|
|
// 设备状态为 "动迁" 时,系统生成的日报里面,非生产时间内的 "生产组织"(rectification_time) 时间为24小时;
|
|
// 设备状态为 "动迁" 时,系统生成的日报里面,非生产时间内的 "生产组织"(rectification_time) 时间为24小时;
|
|
|
// 设备状态为 "完工" 时,系统生成的日报里面,非生产时间内的 "待命"(winter_break_time) 时间为24小时
|
|
// 设备状态为 "完工" 时,系统生成的日报里面,非生产时间内的 "待命"(winter_break_time) 时间为24小时
|
|
|
-
|
|
|
|
|
|
|
+ Set<String> dqStatuses = new HashSet<>();
|
|
|
|
|
+ Set<String> wgStatuses = new HashSet<>();
|
|
|
|
|
+ teamStatusL.forEach(status -> {
|
|
|
|
|
+ String deviceStatus = status.getDeviceStatus();
|
|
|
|
|
+ if ("dq".equals(deviceStatus)) {
|
|
|
|
|
+ dqStatuses.add(deviceStatus);
|
|
|
|
|
+ } else if ("wg".equals(deviceStatus)) {
|
|
|
|
|
+ wgStatuses.add(deviceStatus);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ if (CollUtil.isNotEmpty(dqStatuses)) {
|
|
|
|
|
+ iotRhDailyReport.setRectificationTime(BigDecimal.valueOf(24));
|
|
|
|
|
+ }
|
|
|
|
|
+ if (CollUtil.isNotEmpty(wgStatuses)) {
|
|
|
|
|
+ iotRhDailyReport.setWinterBreakTime(BigDecimal.valueOf(24));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 今天下午4点
|
|
// 今天下午4点
|