ZengTao
2023-10-27 dfce0011f8b675debd45adaefb9915c23a673d61
springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -3,18 +3,26 @@
import cn.hutool.json.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.PostMapping;
import com.example.springboot.common.Result;
import com.example.springboot.entity.Glass;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
import com.example.springboot.service.JdbcConnections;
public class Plchome extends Thread {
    private HomeMapper homeMapper;
    private SpianMapper spianMapper;
    private JdbcConnections dbserve;
    @Override
    public void run() {
        while (this != null) {
@@ -27,6 +35,7 @@
            // 注入mapper
            homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class);
            spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class);
            // 笼子使用情况
            List<StorageCage> tableData = homeMapper.selectAll();
            jsonObject.append("tableData", tableData);
@@ -56,14 +65,20 @@
            List<Short> datas1ListState = S7control.getinstance().ReadWord("DB106.8", 1);// 获取进片车状态
            boolean exist1 = datas1ListState.contains((short) 0);
            jsonObject.append("zhuangtai",exist1); 
            // 伍 获取进是否有待确认的玻璃id
            String queid = spianMapper.Selectqueueid();
            jsonObject.append("queid", queid);
            // 获取扫码位与上片位玻璃信息
            List<Glass> form2 = homeMapper.GetQueueInfo(1);
            List<Glass> form3 = homeMapper.GetQueueInfo(2);
            jsonObject.append("form2", form2);
            jsonObject.append("form3", form3);
            // List<Short> paramlists = new ArrayList<Short>();
            // short para1 = 11111;
            // short para2 = 32000;
            // paramlists.add(para1);
            // paramlists.add(para2);
            // System.out.println(paramlists);
            if(paramlist!=null){
            jsonObject.append("params", paramlist);