| | |
| | |
|
| | | import cn.hutool.json.JSONObject;
|
| | |
|
| | | import com.mes.shelfrack.entity.request.RawUsageAndShelfRack;
|
| | | import com.mes.shelfrack.service.ShelfRackService;
|
| | | import com.mes.storagetask.entity.request.StorageTaskRequest;
|
| | | import com.mes.storagetask.service.StorageTaskService;
|
| | | import com.mes.tools.WebSocketServer;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | |
| | | import lombok.extern.slf4j.Slf4j;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
| | | log.info("发送任务信息和架子信息");
|
| | | JSONObject jsonObject = new JSONObject();
|
| | |
|
| | | List<Map<String, Object>> rack = shelfRackService.selectshelf_rack();
|
| | | List<Map<String, Object>> tasks = storageTaskService.Tasks();
|
| | | List<RawUsageAndShelfRack> rack = shelfRackService.selectshelf_rack();
|
| | | List<StorageTaskRequest> tasks = storageTaskService.Tasks();
|
| | |
|
| | | jsonObject.append("rack",rack);
|
| | | jsonObject.append("tasks",tasks);
|
| | | log.info(jsonObject.toString());
|
| | |
| | | for (WebSocketServer webserver : sendwServer) {
|
| | | if (webserver != null&&webserver.session.isOpen()) {
|
| | | log.info("已发送");
|
| | | webserver.sendMessage(jsonObject.toString());
|
| | | webserver.sendMessage(String.valueOf(jsonObject));
|
| | | }
|
| | | }
|
| | | }
|