| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.md.entity.*; |
| | | import com.mes.md.mapper.MachineMapper; |
| | | import com.mes.md.entity.KBBTJPDrawingBP; |
| | | import com.mes.md.entity.Tasking; |
| | | import com.mes.md.mapper.TaskingMapper; |
| | | import com.mes.md.service.*; |
| | | import com.mes.service.ModbusTcp; |
| | | import com.mes.service.PlcAgreement; |
| | | import com.mes.service.PlcParameter; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.utils.HexUtil; |
| | | import com.mes.utils.Result; |
| | | import com.mes.md.service.KBBTJPDrawingBPService; |
| | | import com.mes.md.service.ProjectService; |
| | | import com.mes.md.service.TaskingLogService; |
| | | import com.mes.websocket.WebSocketServer; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author SNG-010 |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | List<KBBTJPDrawingBP> list =kBBTJPDrawingBPService.notReceiveKBBTJPDrawingBP(); |
| | | jsonObject.append("content", list); |
| | | ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("notReceiveTask"); |
| | | List<WebSocketServer> sendwServer = WebSocketServer.SESSIONMAP.get("notReceiveTask"); |
| | | if (sendwServer != null) { |
| | | for (WebSocketServer webserver : sendwServer) { |
| | | if (webserver != null) { |
| | | try { |
| | | webserver.sendMessage(jsonObject.toString()); |
| | | webserver.sendToWeb("",jsonObject.toString()); |
| | | List<String> messages = webserver.getMessages(); |
| | | if (!messages.isEmpty()) { |
| | | // // 将最后一个消息转换为整数类型的列表 |