|
@@ -14,11 +14,14 @@ import com.github.zuihou.business.operationManagementCenter.entity.Plan;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.OrderService;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.PlanService;
|
|
|
import com.github.zuihou.business.operationManagementCenter.service.TaskService;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.entity.AAutoNodeLog;
|
|
|
+import com.github.zuihou.business.productionReadyCenter.service.AAutoNodeLogService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.entity.Repair;
|
|
|
import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.RepairService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.service.ZZoneService;
|
|
|
import com.github.zuihou.business.websocket.WebSocketServer;
|
|
|
+import com.github.zuihou.common.util.DateUtil;
|
|
|
import com.github.zuihou.common.util.StringUtil;
|
|
|
import com.github.zuihou.context.BaseContextHandler;
|
|
|
import com.github.zuihou.database.mybatis.conditions.Wraps;
|
|
@@ -39,10 +42,7 @@ import org.springframework.web.client.RestTemplate;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.lang.reflect.ParameterizedType;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Iterator;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Component
|
|
|
public class DashboardJob {
|
|
@@ -71,6 +71,9 @@ public class DashboardJob {
|
|
|
@Autowired
|
|
|
private RepairService repairService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AAutoNodeLogService autoNodeLogService;
|
|
|
+
|
|
|
@Value("${zuihou.database.tenantDatabasePrefix}")
|
|
|
private String database;
|
|
|
|
|
@@ -137,6 +140,18 @@ public class DashboardJob {
|
|
|
repairMap.put("repairData", repairData);
|
|
|
dataScreenMap.put("repairMap", repairMap);
|
|
|
|
|
|
+ QueryWrap<AAutoNodeLog> warnWrap = this.handlerWrapper(null, params);
|
|
|
+ LbqWrapper<AAutoNodeLog> warnWrapper = warnWrap.lambda();
|
|
|
+ Date start = new Date();
|
|
|
+ Date end = DateUtil.stringToDate7(DateUtil.dateToString(new Date()) + " 23:59:59");
|
|
|
+ warnWrapper.between(AAutoNodeLog::getCreateTime,start, end);
|
|
|
+ warnWrapper.and(condition -> condition.isNull(AAutoNodeLog::getExeResult).or().eq(AAutoNodeLog::getExeResult,"0")).orderByDesc(AAutoNodeLog::getCreateTime);
|
|
|
+ IPage<AAutoNodeLog> warnData = autoNodeLogService.pageList(new Page<AAutoNodeLog>(), warnWrapper);
|
|
|
+
|
|
|
+ Map warnMap = Maps.newHashMap();
|
|
|
+ warnMap.put("warnData", warnData);
|
|
|
+ dataScreenMap.put("warnMap", warnMap);
|
|
|
+
|
|
|
Map<String, Object> pushMap = new HashMap<>();
|
|
|
pushMap.put("type", WebSocketServer.PUSH_TYPE_DATA_SCREEN);
|
|
|
pushMap.put("data", dataScreenMap);
|