严智鑫
2024-12-11 044c32c15ee9ccac6f3b60eb6745025e2f4480f2
报工回传+库位显示
37个文件已修改
772 ■■■■ 已修改文件
JiuMuMesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/gateway/target/gateway-1.0-SNAPSHOT.jar.original 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/AppRunnerConfig.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/AddTask.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MarkingTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCCleaning.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCEdging.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCFlipSlice.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCLoad.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCRotate.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/SilkScreenTask.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingController.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/entity/PrimitiveTask.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/entity/Tasking.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineFlipSlice.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineLoad.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineRotate.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/resources/application-prod.yml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/target/classes/application-prod.yml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/target/deviceInteraction-1.0-SNAPSHOT.jar.original 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/moduleService/DeviceInteractionModule/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/config.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/lang/zh.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/utils/constants.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Edging/edging.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/FlipSlice/flipSlice.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/ManualReporting/manualReporting.vue 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Marking/marking.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/MechanicalArm/mechanicalArm.vue 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/Rotate/rotate.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/SilkScreen/SilkScreen.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
JiuMuMesParent/common/servicebase/src/main/java/com/mes/tools/WebSocketServer.java
@@ -129,7 +129,6 @@
                        int startIndex = i * maxChunkSize;
                        int endIndex = Math.min(startIndex + maxChunkSize, length);
                        String chunk = message.substring(startIndex, endIndex);
                        // 判断是否是最后一块消息
                        boolean isLastChunk = (i == chunks - 1);
                        if(isLastChunk==true){
@@ -144,7 +143,7 @@
            }
        } catch (Exception e) {
            log.error("发送消息给客户端失败:{}", e.getMessage(), e);
            //log.error("发送消息给客户端失败:{}", e.getMessage(), e);
        }
    }
JiuMuMesParent/gateway/target/gateway-1.0-SNAPSHOT.jar.original
Binary files differ
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/AppRunnerConfig.java
@@ -34,11 +34,11 @@
    @Override
    public void run(ApplicationArguments args) throws Exception {
        // TODO Auto-generated method stub
//        new MachineLoad(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start();
//        new MachineEdging(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start();
//        new MachineFlipSlice(machineMapper,taskingService).start();
//        new MachineMarking(machineMapper,taskingService).start();
//        new MachineSilkScreen(machineMapper,taskingService).start();
//        new MachineRotate(machineMapper,taskingService).start();
        new MachineLoad(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start();
        new MachineEdging(taskingMapper,machineMapper,taskingService,primitiveTaskService,lineConfigurationService).start();
        new MachineFlipSlice(machineMapper,taskingService).start();
        new MachineMarking(machineMapper,taskingService).start();
        new MachineSilkScreen(machineMapper,taskingService).start();
        new MachineRotate(machineMapper,taskingService).start();
    }
}
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/AddTask.java
@@ -2,6 +2,7 @@
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.mapper.TaskingMapper;
@@ -11,6 +12,7 @@
import com.mes.service.PlcParameter;
import com.mes.tools.WebSocketServer;
import com.mes.utils.HexUtil;
import com.mes.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
@@ -32,10 +34,20 @@
    @Autowired
    KBBTJPDrawingBPService kBBTJPDrawingBPService;
    //@Scheduled(fixedDelay = 30000)
    public void AddTasks() {
        projectService.insertProjectStandard();
    @Autowired
    TaskingMapper taskingMapper;
    @Scheduled(fixedDelay = 86400000)
    public void deleteTasking() {
        //创建Calendar实例
        Calendar cal = Calendar.getInstance();
        //设置当前时间
        cal.setTime(new Date());
        cal.add(Calendar.DATE, -5);
        int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>()
                .selectAll(Tasking.class)
                .le(Tasking::getOperationRecordTime,cal.getTime()));
       log.info("定时清除多余数据:{}",deleteCount);
    }
    //@Scheduled(fixedDelay = 1000)
    public void notReceive() {
@@ -46,11 +58,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MachineTask.java
@@ -148,11 +148,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/MarkingTask.java
@@ -156,7 +156,7 @@
        //log.info("无可执行的条件");
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void markingTasks() {
        JSONObject jsonObject = new JSONObject();
        Machine machine=machineMapper.selectById(12L);
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCCleaning.java
@@ -71,11 +71,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCEdging.java
@@ -308,8 +308,9 @@
        }
        return "";
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void EdgingTasks() {
        JSONObject jsonObject = new JSONObject();
        Machine machine=machineMapper.selectById(6L);
        List<Tasking> taskingList=taskingService.findMachineTask(machine);
@@ -320,12 +321,17 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
                }
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCFlipSlice.java
@@ -128,7 +128,7 @@
            machineMapper.updateById(machine);
        }
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void flipSliceTask() {
        //获取报警状态
        JSONObject jsonObject = new JSONObject();
@@ -141,11 +141,15 @@
        if (sendServer != null) {
            for (WebSocketServer webserver : sendServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCLoad.java
@@ -159,7 +159,7 @@
        modbusTcp1.close();
        //log.info("无可执行的条件");
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void loadTasks() {
        JSONObject jsonObject = new JSONObject();
        Machine machine=machineMapper.selectById(machineId2);
@@ -182,11 +182,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCManualReporting.java
@@ -1,10 +1,15 @@
package com.mes.job;
import cn.hutool.json.JSONObject;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.mes.common.S7object;
import com.mes.device.PlcParameterObject;
import com.mes.md.entity.LineConfiguration;
import com.mes.md.entity.Machine;
import com.mes.md.entity.PrimitiveTask;
import com.mes.md.entity.Tasking;
import com.mes.md.mapper.MachineMapper;
import com.mes.md.mapper.TaskingMapper;
import com.mes.md.service.PrimitiveTaskService;
import com.mes.md.service.TaskingService;
import com.mes.tools.WebSocketServer;
@@ -27,26 +32,42 @@
    @Autowired
    TaskingService taskingService;
    @Autowired
    TaskingMapper taskingMapper;
    @Autowired
    MachineMapper machineMapper;
    @Autowired
    PrimitiveTaskService primitiveTaskService;
    //@Scheduled(fixedDelay = 500)
    //@Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void manualReporting() {
        JSONObject jsonObject = new JSONObject();
        List<PrimitiveTask> taskingList = primitiveTaskService.selectPrimitiveTask(new PrimitiveTask());
        Machine machine=machineMapper.selectById(24L);
        List<Tasking> taskingList=taskingMapper.selectJoinList(Tasking.class,new MPJLambdaWrapper<Tasking>()
                .selectAll(Tasking.class)
                .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId)
                .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId)
                .eq(LineConfiguration::getMachineId,machine.getId())
                .eq(Tasking::getGlassState,"正常")
                .eq(Tasking::getState,"线上")
                .ne(Tasking::getWorkState,"完工")
                .orderByDesc(Tasking::getOperationRecordTime));
        //List<PrimitiveTask> taskingList = primitiveTaskService.selectPrimitiveTask(new PrimitiveTask());
        jsonObject.append("taskingList", taskingList);
        jsonObject.append("machine", machine);
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("manualReporting");
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/PLCRotate.java
@@ -125,7 +125,7 @@
            machineMapper.updateById(machine);
        }
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void rotateTask() {
        //获取报警状态
        JSONObject jsonObject = new JSONObject();
@@ -138,11 +138,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/job/SilkScreenTask.java
@@ -218,7 +218,7 @@
        //log.info("无可执行的条件");
    }
    @Scheduled(fixedDelay = 1000)
    @Scheduled(fixedDelay = 500)
    public void SilkScreenTasks() {
        JSONObject jsonObject = new JSONObject();
        Machine machine=machineMapper.selectById(14L);
@@ -230,11 +230,15 @@
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                    List<String> messages = webserver.getMessages();
                    if (!messages.isEmpty()) {
                        // // 将最后一个消息转换为整数类型的列表
                        webserver.clearMessages();
                    try {
                        webserver.sendMessage(jsonObject.toString());
                        List<String> messages = webserver.getMessages();
                        if (!messages.isEmpty()) {
                            // // 将最后一个消息转换为整数类型的列表
                            webserver.clearMessages();
                        }
                    }catch (Exception e) {
                    }
                } else {
                    log.info("Home is closed");
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/controller/TaskingController.java
@@ -1,9 +1,15 @@
package com.mes.md.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.mes.md.entity.KBBTLensSorting;
import com.mes.md.entity.LineConfiguration;
import com.mes.md.entity.Machine;
import com.mes.md.entity.Tasking;
import com.mes.md.mapper.KBBTLensSortingMapper;
import com.mes.md.mapper.MachineMapper;
import com.mes.md.mapper.TaskingMapper;
import com.mes.md.service.ProjectService;
import com.mes.md.service.TaskingService;
import com.mes.utils.Result;
@@ -12,6 +18,7 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * <p>
@@ -30,7 +37,65 @@
        private ProjectService projectService;
        @Autowired
        private MachineMapper machineMapper;
        @Autowired
        private TaskingMapper taskingMapper;
        @Autowired
        private KBBTLensSortingMapper kBBTLensSortingMapper;
        @ApiOperation("查询库位信息 返回结果")
        @PostMapping("/findKBBTLensSorting")
        @ResponseBody
        public Result findKBBTLensSorting(@RequestBody Map<String, String> map) {
            try {
                String scanId=map.get("scanId").toString();
                if (!scanId.isEmpty()){
                    List<KBBTLensSorting> list=kBBTLensSortingMapper.selectList(new QueryWrapper<KBBTLensSorting>().lambda()
                            .eq(KBBTLensSorting::getBarcode,scanId));
                    return Result.build(200,"成功",list);
                }
                return Result.build(199,"前端传值NULL",map);
            }catch (Exception e){
                return Result.build(199,"异常",map);
            }
        }
        @ApiOperation("扫码成功后返回结果 machineId,scanId")
        @PostMapping("/scanMachineAdd")
        @ResponseBody
        public Result scanMachineAdd(@RequestBody Map<String, String> map) {
            try {
                String machineId=map.get("machineId").toString();
                String scanId=map.get("scanId").toString();
                if (!scanId.isEmpty()&&!machineId.isEmpty()){
                    Machine machine = machineMapper.selectById(machineId);
                    int addCount =taskingService.scanMachineAdd(machine,scanId);
                    return Result.build(200,"成功",addCount);
                }
                return Result.build(199,"前端传值NULL",map);
            }catch (Exception e){
                return Result.build(199,"异常",map);
            }
        }
        @ApiOperation("报工提交 ")
        @PostMapping("/reportForWork")
        @ResponseBody
        public Result reportForWork(@RequestBody Machine machine) {
            try {
                int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>()
                        .selectAll(Tasking.class)
                        .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId)
                        .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId)
                        .eq(LineConfiguration::getMachineId,machine.getId())
                        .eq(Tasking::getGlassState,"正常")
                        .eq(Tasking::getState,"线上")
                        .ne(Tasking::getWorkState,"完工"));
                return Result.build(200,"成功",deleteCount);
            }catch (Exception e){
                return Result.build(199,"异常",machine);
            }
        }
        @ApiOperation("查询当前设备,未完工状态的线上任务")
        @PostMapping("/findMachineTask")
        @ResponseBody
@@ -107,5 +172,13 @@
            return Result.build(200,"修改成功:"+count,count);
        }
        @ApiOperation("提交 扫码报工 ")
        @PostMapping("/scanReport")
        @ResponseBody
        public Result scanReport(@RequestBody Tasking tasking) {
            int count =taskingService.stopTasking(tasking);
            return Result.build(200,"修改成功:"+count,count);
        }
}
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/entity/PrimitiveTask.java
@@ -168,28 +168,13 @@
    private Date endTime;
    /**
     * 结束时 任务执行状态【等待/工作/完成】
     */
    private String workState;
    /**
     * 结束时 所在工艺 id (线路ID)
     */
    private Long lineConfigurationId;
    /**
     * 结束时 生产状态【线上/线下】
     */
    private String state;
    /**
     * 结束时 玻璃状态【正常/破损】
     */
    private String glassState;
    /**
     * 领取线路
     */
    private Integer getLine;
    /**
     * 补单数量
     */
    private Integer unusualCount;
}
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/entity/Tasking.java
@@ -3,6 +3,8 @@
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -165,9 +167,28 @@
     * R角4-2(左下角)
     */
    private Double r_4_2;
    /**
     * 总表ID
     */
    private Long primitiveTaskId;
    /**
     * 操作时间
     */
    private Date operationRecordTime;
    /**
     * 操作者
     */
    private String operationRecord;
    /**
     * 操作类型   【开始/结束】
     */
    private String operationMode;
    /**
     * 库位
     */
    private String warehouse;
}
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/TaskingServiceImpl.java
@@ -7,6 +7,7 @@
import com.mes.md.entity.*;
import com.mes.md.mapper.*;
import com.mes.md.service.*;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -45,6 +46,9 @@
    private MachineMapper machineMapper;
    @Autowired
    private LineConfigurationService lineConfigurationService;
    @Autowired
    KBBTLensSortingMapper kBBTLensSortingMapper;
    /**
     * @param machine
@@ -169,6 +173,10 @@
        List<Tasking> list=this.findMachineWorkStateTask(machine,"等待");
        if(!list.isEmpty()){
            Tasking tasking=list.get(0);
            LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
            tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
            tasking.setOperationRecordTime(new Date());
            tasking.setOperationMode("开始");
            tasking.setWorkState("正在工作");
            if(baseMapper.updateById(tasking)>0){
                return tasking;
@@ -187,6 +195,10 @@
        if(!list.isEmpty()){
            Tasking tasking=list.get(0);
            if(scan_id.equals(tasking.getScanId())){
                LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
                tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
                tasking.setOperationRecordTime(new Date());
                tasking.setOperationMode("开始");
                tasking.setWorkState("正在工作");
                if(baseMapper.updateById(tasking)>0){
                    return tasking;
@@ -229,8 +241,14 @@
                machine.setTodayCount(taskSequence);
                machineMapper.updateById(machine);
                tasking.setTaskSequence(taskSequence);
                tasking.setWorkState("正在工作");
                tasking.setLineConfigurationId(machineLineConfiguration.get(0).getId());
                //记录设备开始时间
                tasking.setOperationRecord(machineLineConfiguration.get(0).getRemark()+machineLineConfiguration.get(0).getLineId());
                tasking.setOperationRecordTime(new Date());
                tasking.setOperationMode("开始");
                if(baseMapper.updateById(tasking)>0){
                    finishMachineTask(machine);
                    return tasking;
@@ -273,6 +291,10 @@
            if(!list.isEmpty()){
                Tasking tasking=list.get(0);
                if (!listLineConfiguration.isEmpty()){
                    LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
                    tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
                    tasking.setOperationRecordTime(new Date());
                    tasking.setOperationMode("结束");
                    tasking.setLineConfigurationId(listLineConfiguration.get(0).getId());
                    tasking.setWorkState("等待");
                    return baseMapper.updateById(tasking);
@@ -308,12 +330,19 @@
            );
            if(!list.isEmpty()){
                Tasking tasking=list.get(0);
                LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
                tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
                tasking.setOperationRecordTime(new Date());
                tasking.setOperationMode("结束");
                if (!listLineConfiguration.isEmpty()){
                    tasking.setLineConfigurationId(listLineConfiguration.get(0).getId());
                    tasking.setWorkState("等待");
                    return baseMapper.updateById(tasking);
                }else{
                    return this.stopTasking(tasking);
                }
                else{
                    tasking.setWorkState("完工");
                    return baseMapper.updateById(tasking);
                    //return this.stopTasking(tasking);
                }
            }
@@ -338,6 +367,10 @@
                .orderByDesc(Tasking::getTaskSequence));
        if(!list.isEmpty()){
            Tasking tasking=list.get(0);
            LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
            tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
            tasking.setOperationRecordTime(new Date());
            tasking.setOperationMode("人工");
            tasking.setWorkState("等待");
            return baseMapper.updateById(tasking);
        }
@@ -356,6 +389,10 @@
                .orderByDesc(Tasking::getTaskSequence));
        if(!list.isEmpty()){
            Tasking tasking=list.get(0);
            LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(tasking.getLineConfigurationId());
            tasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
            tasking.setOperationRecordTime(new Date());
            tasking.setOperationMode("自动");
            tasking.setState("线下");
            return baseMapper.updateById(tasking);
        }
@@ -370,6 +407,10 @@
    public int damagedTask(Tasking tasking) {
        Tasking oldTasking=baseMapper.selectById(tasking);
        if(!Objects.isNull(oldTasking)){
            LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(oldTasking.getLineConfigurationId());
            oldTasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
            oldTasking.setOperationRecordTime(new Date());
            oldTasking.setOperationMode("人工");
            oldTasking.setGlassState("破损");
            return baseMapper.updateById(oldTasking);
        }
@@ -384,6 +425,10 @@
    public int glassDownLine(Tasking tasking) {
        Tasking oldTasking=baseMapper.selectById(tasking);
        if (!Objects.isNull(oldTasking)){
            LineConfiguration thisLineConfiguration=lineConfigurationMapper.selectById(oldTasking.getLineConfigurationId());
            oldTasking.setOperationRecord(thisLineConfiguration.getRemark()+thisLineConfiguration.getLineId());
            oldTasking.setOperationRecordTime(new Date());
            oldTasking.setOperationMode("人工");
            oldTasking.setState("线下");
            return baseMapper.updateById(oldTasking);
        }
@@ -449,14 +494,27 @@
        if(!Objects.isNull(scanId)){
            List<PrimitiveTask> primitiveTaskList=primitiveTaskMapper.selectList(new QueryWrapper<PrimitiveTask>().lambda()
                    .eq(PrimitiveTask::getScanId,scanId));
            if(primitiveTaskList.isEmpty()){
                int insertCount=projectService.insertProjectCustomization(scanId);
                errorStr="扫码ID:"+scanId+" 九牧IT数据库未下发";
                if (insertCount<1&&!errorStr.equals(machine.getRemark())){
                    machine.setRemark(errorStr);
                    machineMapper.updateById(machine);
                    return 0;
                }
            }
            primitiveTaskList=primitiveTaskMapper.selectList(new QueryWrapper<PrimitiveTask>().lambda()
                    .eq(PrimitiveTask::getScanId,scanId));
            if(!primitiveTaskList.isEmpty()){
                PrimitiveTask primitiveTask=primitiveTaskList.get(0);
                LineConfiguration lineConfiguration=lineConfigurationService.machineLineConfiguration(machine);
                List<Tasking> listTasking=baseMapper.selectList(new QueryWrapper<Tasking>().lambda()
                        .eq(Tasking::getScanId,scanId)
                        .ne(Tasking::getLineConfigurationId,113)
                        .ne(Tasking::getState,"线下")
                        .ne(Tasking::getGlassState,"破损"));
                if(listTasking.size()<primitiveTaskList.get(0).getTaskQuantity()){
                if((listTasking.size()<primitiveTaskList.get(0).getTaskQuantity())||machine.getMode()==3){
                    Tasking tasking=primitiveTaskService.convertListTasking(primitiveTask,lineConfiguration.getId());
                    Integer taskSequence=1;
                    if (machine.getTodayCount()>0&&machine.getTodayCount()<5000){
@@ -465,6 +523,20 @@
                        taskSequence=1;
                    }
                    machine.setTodayCount(taskSequence);
                    String Warehouse="";
                    if (machine.getId()==24){
                        List<KBBTLensSorting> list=kBBTLensSortingMapper.selectList(new QueryWrapper<KBBTLensSorting>().lambda()
                                .eq(KBBTLensSorting::getBarcode,scanId)
                                .notLike(KBBTLensSorting::getProductionOrder,"防碎膜"));
                        if (list.size()>0){
                            Warehouse=list.get(0).getWarehouse();
                        }
                    }
                    tasking.setWarehouse(Warehouse);
                    tasking.setOperationRecord(lineConfiguration.getRemark()+lineConfiguration.getLineId());
                    tasking.setOperationRecordTime(new Date());
                    tasking.setOperationMode("插入数据");
                    tasking.setTaskSequence(taskSequence);
                    machineMapper.updateById(machine);
                    return baseMapper.insert(tasking);
@@ -474,19 +546,14 @@
                    machine.setRemark(errorStr);
                    machineMapper.updateById(machine);
                }
            }else{
                int insertCount=projectService.insertProjectCustomization(scanId);
                errorStr="扫码ID:"+scanId+" 九牧IT数据库未下发";
                if (insertCount<1&&!errorStr.equals(machine.getRemark())){
                    machine.setRemark(errorStr);
                    machineMapper.updateById(machine);
                }
            }
        }
        return 0;
    }
    @Override
    public Boolean insertTasking(String status) {
        Tasking tasking = new Tasking();
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineEdging.java
@@ -83,6 +83,7 @@
                String send= HexUtil.intTo2ByteHex(0);
                modbusTcp1.writeString(send,HexUtil.intTo2ByteHex(mesSend.getAddressStart()/2));
                log.info("发送字 清空成功;内容:{},发送起始地址:{}",send,HexUtil.intTo2ByteHex(mesSend.getAddressStart()));
                errorMachine(machine,"");
                modbusTcp1.close();
                return;
            }
@@ -104,7 +105,7 @@
                modbusTcp1.close();
                return;
            }
            if(1==plcReport.getValueInt()&&0==mesConfirm.getValueInt()){
            if((1==plcReport.getValueInt()&&0==mesConfirm.getValueInt())){
                int finishCount=taskingService.finishMachineTask(machine);
                log.info("3、任务完成");
                if(finishCount>0) {//有任务
@@ -176,9 +177,9 @@
            }
            List<Tasking> taskingCount=taskingService.findMachineWorkStateTask(machine,"正在工作");
            if((1==plcRequest.getValueInt()&&0==mesSend.getValueInt())
            if(((1==plcRequest.getValueInt()&&0==mesSend.getValueInt())
                    &&"开工".equals(machine.getState())
                    &&taskingCount.size()<machine.getMaxTaskCount()){
                    &&taskingCount.size()<machine.getMaxTaskCount())){
                Machine loadMachine=machineMapper.selectById(2L);
                Tasking tasking;
                String scan_id="";
@@ -211,7 +212,7 @@
                }else{
                    //定制模式
                    String PlcRequestID_=clientTCPSocket();
                    //String PlcRequestID_=",,46607221";
                    //String PlcRequestID_=",,46408889";
                    if (PlcRequestID_==null||PlcRequestID_.lastIndexOf(",")<0){
                        modbusTcp1.close();
                        errorMachine(machine,("扫不到码:"+PlcRequestID_));
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineFlipSlice.java
@@ -56,11 +56,13 @@
            //发送字置0
            log.info("1.发送类型字置零,清除上次发送的类型数据{}->0",mesSendType.getValue());
            s7objectMachine.plccontrol.writeWord(mesSendType.getAddress(), 0);
            return;
        }
        if ("0".equals(plcRequest.getValue())&&!"0".equals(mesSend.getValue())) {
            //发送字置0
            int finishCount=taskingService.finishMachineTask(machine);
            nullMachine(machine);
            log.info("2.发送字置零,清除上次发送的数据{},{},{},{},{}"
                    ,finishCount
                    ,length.getValue()
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineLoad.java
@@ -111,7 +111,6 @@
                    &&"开工".equals(machine.getState())){
                int loadCount=0;
                if(machine.getMode()==1){
                    //标准模式  找已领取未完成的第一条任务
                    LineConfiguration lineConfiguration=lineConfigurationService.machineLineConfiguration(machine);
                    List<PrimitiveTask> findPrimitiveTasking=primitiveTaskService.findPrimitiveTasking(machine,lineConfiguration.getLineId());
@@ -119,9 +118,13 @@
                        //任务数>已上数量
                        List<Tasking> taskingTopList=taskingMapper.selectList(new QueryWrapper<Tasking>().lambda()
                                .eq(Tasking::getScanId,primitiveTask.getScanId())
                                .eq(Tasking::getState,"线上")
                                .eq(Tasking::getGlassState,"正常")
                        );
                        loadCount=primitiveTask.getTaskQuantity()-taskingTopList.size();
                        loadCount=(loadCount>0?loadCount:0);
                        if (primitiveTask.getTaskQuantity()>primitiveTask.getReportCount()){
                            loadCount=primitiveTask.getTaskQuantity()-taskingTopList.size();
                            loadCount=(loadCount>0?loadCount:0);
                        }
                        break;
                    }
                }else{
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/plcTaskThread/MachineRotate.java
@@ -60,6 +60,7 @@
        if ("0".equals(plcRequest.getValue())&&!"0".equals(mesSend.getValue())) {
            //发送字置0
            int finishCount=taskingService.finishMachineTask(machine);
            nullMachine(machine);
            log.info("1.发送字置零,清除上次发送的数据{},{},{},{},{}"
                    ,finishCount
                    ,length.getValue()
@@ -71,6 +72,7 @@
            s7objectMachine.plccontrol.writeWord(mesSendId.getAddress(), 0);
            s7objectMachine.plccontrol.writeWord(rotateType.getAddress(), 0);
            s7objectMachine.plccontrol.writeWord(mesSend.getAddress(), 0);
            return;
        }
        if ("1".equals(plcRequestType.getValue())&&"0".equals(mesSendType.getValue())) {
JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/resources/application-prod.yml
@@ -9,16 +9,16 @@
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        salve_JomooKBB:
          url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB
          username: sa
          password: beibo.123/
          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#        salve_JomooKBB:
#          url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB
#          username: thok
#          password: jomoo@123
#          url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB
#          username: sa
#          password: beibo.123/
#          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
        salve_JomooKBB:
          url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB
          username: thok
          password: jomoo@123
          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
  cloud:
    nacos:
      discovery:
JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
@@ -4,10 +4,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.mes.md.entity.*;
import com.mes.md.mapper.AccountMapper;
import com.mes.md.mapper.KBBTJPDrawingBPMapper;
import com.mes.md.mapper.MachineMapper;
import com.mes.md.mapper.PrimitiveTaskMapper;
import com.mes.md.mapper.*;
import com.mes.md.service.AccountService;
import com.mes.md.service.PrimitiveTaskService;
import com.mes.md.service.ProjectService;
@@ -29,10 +26,7 @@
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.*;
/**
 * @Author : yanzhixin
@@ -69,36 +63,41 @@
    @Autowired
    MachineMapper machineMapper;
    @Autowired
    TaskingMapper taskingMapper;
    @Autowired
    KBBTLensSortingMapper kBBTLensSortingMapper;
    /**
     * 测试 扫码后库位
     */
    @Test
    public void testStr() {
        String str=new String("4、发送任务  任务数据:{}, ".getBytes(),StandardCharsets.UTF_8);
        int a=1;
        log.info(str,1);
        //创建Calendar实例
        Calendar cal = Calendar.getInstance();
        //设置当前时间
        cal.setTime(new Date());
        cal.add(Calendar.DATE, -3);
        int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>()
                .selectAll(Tasking.class)
                .le(Tasking::getOperationRecordTime,cal.getTime()));
        log.info("{},删除数据:{}",cal.getTime(),deleteCount);
    }
    @Test
    public void testSaoMa3() {
        try {
// 创建TCP客户端并连接到服务器
            String serverAddress = "192.168.1.8";
            int serverPort = 2001;
            Socket clientSocket = new Socket(serverAddress, serverPort);
            // 创建输入流和输出流
            InputStream inputStream = clientSocket.getInputStream();
            OutputStream outputStream = clientSocket.getOutputStream();
            // 发送数据给服务器
            String message = "start";
            outputStream.write(message.getBytes());
            // 读取服务器响应的数据
            byte[] buffer = new byte[1024];
            int bytesRead = inputStream.read(buffer);
            String receivedMessage = new String(buffer, 0, bytesRead);
            System.out.println("收到服务器响应:" + receivedMessage);
            // 关闭连接
            clientSocket.close();
        }catch (Exception e){
            log.info("扫码异常");
        }
        int deleteCount=taskingMapper.deleteJoin(new MPJLambdaWrapper<Tasking>()
                .selectAll(Tasking.class)
                .innerJoin(LineConfiguration.class,LineConfiguration::getId,Tasking::getLineConfigurationId)
                .innerJoin(Machine.class,Machine::getId,LineConfiguration::getMachineId)
                .eq(LineConfiguration::getMachineId,24L)
                .eq(Tasking::getGlassState,"正常")
                .eq(Tasking::getState,"线上")
                .ne(Tasking::getWorkState,"完工"));
        log.info("{}",deleteCount);
    }
    @Test
JiuMuMesParent/moduleService/DeviceInteractionModule/target/classes/application-prod.yml
@@ -9,16 +9,16 @@
          username: root
          password: beibo.123/
          driver-class-name: com.mysql.cj.jdbc.Driver
        salve_JomooKBB:
          url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB
          username: sa
          password: beibo.123/
          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#        salve_JomooKBB:
#          url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB
#          username: thok
#          password: jomoo@123
#          url: jdbc:sqlserver://localhost:1433;databasename=JomooKBB
#          username: sa
#          password: beibo.123/
#          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
        salve_JomooKBB:
          url: jdbc:sqlserver://172.18.19.85:1433;databasename=JomooKBB
          username: thok
          password: jomoo@123
          driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
  cloud:
    nacos:
      discovery:
JiuMuMesParent/moduleService/DeviceInteractionModule/target/deviceInteraction-1.0-SNAPSHOT.jar.original
Binary files differ
JiuMuMesParent/moduleService/DeviceInteractionModule/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -14,6 +14,7 @@
com\mes\md\controller\WorkTaskDetailController.class
com\mes\md\controller\MenuController.class
com\mes\md\entity\OrderOriginalPiece.class
com\mes\md\mapper\KBBTLensSortingMapper.class
com\mes\md\service\MenuService.class
com\mes\md\mapper\KBBTJPDrawingBPMapper.class
com\mes\md\controller\GlassInfoController.class
@@ -86,6 +87,7 @@
com\mes\md\entity\RoleMenu.class
com\mes\md\controller\TaskLogController.class
com\mes\md\service\impl\TaskingServiceImpl.class
com\mes\md\entity\KBBTLensSorting.class
com\mes\md\service\impl\KBBTJPDrawingBPServiceImpl.class
com\mes\md\mapper\ProjectMapper.class
com\mes\job\PLCScanQrCodesReport.class
JiuMuMesParent/moduleService/DeviceInteractionModule/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -26,6 +26,7 @@
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\PrimitiveTaskServiceImpl.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\edgstoragecage\service\EdgStorageCageService.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\EdgeGrindingLog.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\mapper\KBBTLensSortingMapper.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\controller\TaskingController.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\TaskLogServiceImpl.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\impl\TaskingServiceImpl.java
@@ -72,6 +73,7 @@
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\job\AddTask.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\job\PLCMechanicalArm.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\mapper\LineMapper.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\KBBTLensSorting.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\ProjectLog.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\entity\KBBTJPDrawingBP.java
D:\workfile\JiuMuMES\JiuMuMesParent\moduleService\DeviceInteractionModule\src\main\java\com\mes\md\service\PageService.java
UI-Project/config.js
@@ -1,11 +1,17 @@
export default {
  serverUrl: "localhost:88/api",
  serverUrl2: "localhost:88"
  // serverUrl: "10.36.164.200:88/api",
  // serverUrl2: "10.36.164.200:88"
//  serverUrl: "10.153.19.29:88/api",
 //serverUrl: "10.36.164.201:88/api",
  serverUrl: "localhost:88/api",
//  serverUrl: "127.0.0.1:88/api",
  // serverUrl2: "10.153.19.29:88"
  //serverUrl2: "10.36.164.201:88"
   serverUrl2: "localhost:88"
    // serverUrl2: "127.0.0.1:88"
  //serverUrl:"res.abeim.cn"
UI-Project/src/lang/zh.js
@@ -145,8 +145,10 @@
        state: '生产状态',
        glassState: '玻璃状态',
        reportCount: '报工数量',
        operationRecordTime:"最新时间",
        sendTime: '发送时间',
        sendContent: '发送内容',
        warehouse:'仓库'
    },
    machine: {
        mechanicalArm:'自动上片机',
UI-Project/src/utils/constants.js
@@ -1,5 +1,5 @@
  export const WebSocketHost = "localhost";
//export const WebSocketHost = "10.36.164.201";
// export const WebSocketHost = "10.36.164.200";
// export const WebSocketHost = "10.153.19.29";
// export const WebSocketHost = "127.0.0.1";
export const host = "88";
UI-Project/src/views/Edging/edging.vue
@@ -6,6 +6,7 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost, host } from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
const requestData = reactive({
@@ -322,6 +323,7 @@
        <el-table-column prop="width" :label="$t('glassInfo.width')" />
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" />
        <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{
UI-Project/src/views/FlipSlice/flipSlice.vue
@@ -6,6 +6,9 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost, host } from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
const requestData = reactive({
@@ -357,6 +360,7 @@
        <el-table-column prop="width" :label="$t('glassInfo.width')" />
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" />
        <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{
@@ -373,7 +377,8 @@
    </div>
    <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;">
      <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/翻片台.png"></el-image>
      <img style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../assets/翻片台.png">
      <!-- <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/翻片台.png"></el-image> -->
      <!-- <div style="width: 70%;min-width: 900px; height: 460px;background-image: url(../../src/assets/翻片台.png) ;background-size: 100% 100%;float: left;">
      </div> -->
UI-Project/src/views/ManualReporting/manualReporting.vue
@@ -6,6 +6,7 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost, host } from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter,getDataSort} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
const requestData = reactive({
@@ -15,6 +16,7 @@
const blind = ref(false)
const errorInfo = ref(true)
const loadData = ref([]);
const taskinggoruby = ref([]);
const findMachine = ref([]);
const sendRecords = ref([]);
const downLineTask = ref([]);
@@ -22,8 +24,9 @@
const scanCodeOld = ref([]);
const searcheh = ref();  
const machineId = 2;//当前页面的设备ID
const machineId = 24;//当前页面的设备ID
var errorScanId;
var errorOpen=false;
//使用WebSocket方式展示数据
let socket = null;
let socketDownLineTask = null;
@@ -32,15 +35,22 @@
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
  //taskinggoruby.value = data.taskinggoruby[0];
  //loadData.value =getDataSort(data.taskingList[0]);
  loadData.value = data.taskingList[0];
  findMachine.value = data.machine[0];
  scanCode.value = data.scanCode[0];
  sendRecords.value = data.sendRecords[0].reverse();
  
  if(scanCode.value.length>0&&scanCode.value[0].scanId.toString()!=errorScanId){
  if(findMachine.value.remark.toString()!=errorScanId&&findMachine.value.remark.toString()!=""&&findMachine.value.remark.toString()!=undefined){
    //有数据就弹窗 
    errorScanId=scanCode.value[0].scanId.toString();
    errorInfoFuntion(scanCode.value[0]);
    if(errorOpen){
      ElMessageBox.close();
    }
    errorScanId=findMachine.value.remark.toString();
    errorInfoFuntion(findMachine.value.remark.toString());
    errorOpen=true;
  }else if(findMachine.value.remark.toString()==""&&errorOpen){
    ElMessageBox.close();
    errorOpen=false;
  }
   
};
@@ -70,7 +80,7 @@
});
//报警提示
const errorInfoFuntion = async (info) => {
  let infoScancode='扫码ID:'+info.scanId+'  '+info.scanCode;
  let infoScancode=info;
  ElMessageBox.confirm(
    infoScancode,
    t('delivery.prompt'),
@@ -81,17 +91,6 @@
    }
  )
    .then(() => {
      //重新补单
      request.post("/deviceInteraction/tasking/glassAgainTopLine",
        {
          "scanId": info.scanId,
        }).then((res) => { // 替换为你的API端点
          if (res.code === 200) {
            ElMessage.success(res.message);
          } else {
            ElMessage.warning(res.message)
          }
        })
    })
    .catch(() => {
      ElMessage({
@@ -241,9 +240,27 @@
  blind.value = true; 
}
const fetchData = async () => {
  setTimeout(()=>{
    //扫码回车后延迟一秒
    //alert(searcheh.value);
    //下线接口
    let scanId= searcheh.value;
    request.post("/deviceInteraction/tasking/scanMachineAdd",
        {
          "machineId": machineId,
          "scanId": scanId
        }).then((res) => { // 替换为你的API端点
          if (res.code === 200) {
            ElMessage.success(res.message);
          } else {
            ElMessage.warning(res.message)
          }
        })
    searcheh.value="";
  },1000);
  //扫码回车提交
  alert(searcheh.value);
  searcheh.value="";
  //searcheh.value="";
}
//上线
const topLine = async (row) => {
@@ -280,6 +297,40 @@
const handleDialogClose = () => {  
    
}
//全部提交
const reportForWork = async () => {
  let infoReport = "是否提交  "+loadData.value.length+"  片玻璃?";
  ElMessageBox.confirm(
    infoReport,
    t('delivery.prompt'),
    {
      confirmButtonText: t('functionState.sure'),
      cancelButtonText: t('functionState.cancel'),
      type: 'warning',
    }
  )
    .then(() => {
      //下线接口
      request.post("/deviceInteraction/tasking/reportForWork",
        {
          "id": machineId,
        }).then((res) => { // 替换为你的API端点
          if (res.code === 200) {
            ElMessage.success(res.message);
          } else {
            ElMessage.warning(res.message)
          }
        })
    })
    .catch(() => {
      ElMessage({
        type: 'info',
        message: t('functionState.cancel'),
      })
    })
}
</script>
<template>
  <div ref="content" style="padding:0 20px;">
@@ -296,7 +347,8 @@
    <br>
    <div id="search" style="height:35px;line-height: 35px;">
      <!-- 功能 -->
      <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.reporting') }}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="reportForWork">{{ $t('functionState.reporting') }}</el-button>
      <!-- <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.reporting') }}</el-button> -->
      <el-input v-model="searcheh" type="primary" id="ReportSubmission" @keyup.enter="fetchData"
      style="width:1000px;height:35px;line-height: 35px;font-size: 35px;float: right;"></el-input>
@@ -305,7 +357,7 @@
    <div id="main-body" style="min-height:240px;">
      <!-- 表格内容 -->
      <el-table :data="loadData" stripe
      <el-table :data="taskinggoruby" stripe
        :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }">
        <!-- <el-table-column type="selection" min-width="30" /> -->
@@ -319,21 +371,16 @@
                <el-icon @click="fetchData"><CaretBottom /></el-icon>
                <el-icon color="#409efc"><Filter /></el-icon>
              </div>
              <!-- <el-input size="small" placeholder="Type to search" /> -->
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" />
        <el-table-column prop="taskQuantity" :label="$t('glassInfo.taskQuantity')" />
        <el-table-column prop="reportCount" :label="$t('glassInfo.reportCount')" />
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">{{
              $t('functionState.finish') }}</el-button>
            <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{ $t('functionState.lose')
              }}</el-button>
          </template>
@@ -350,15 +397,14 @@
        <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
        <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" />
        <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" />
        <el-table-column prop="glassId" :label="$t('glassInfo.glassId')" />
        <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" />
        <el-table-column prop="length" :label="$t('glassInfo.length')" />
        <el-table-column prop="width" :label="$t('glassInfo.width')" />
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" />
        <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column prop="warehouse" :label="$t('glassInfo.warehouse')" />
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '完工')">{{
              $t('functionState.finish') }}</el-button>
            <el-button size="mini" link type="primary" plain @click="damagedTask(scope.row)">{{ $t('functionState.lose')
              }}</el-button>
          </template>
UI-Project/src/views/Marking/marking.vue
@@ -6,6 +6,7 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
@@ -217,6 +218,7 @@
        <el-table-column prop="width" :label="$t('glassInfo.width')"/>
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')"/>
        <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')" >{{$t('functionState.anew')}}</el-button>
@@ -229,7 +231,8 @@
    </div>
    <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;">
      <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/自动打标机.png"></el-image>
      <img style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../assets/自动打标机.png">
      <!-- <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/自动打标机.png"></el-image> -->
      <!-- <div style="width: 70%;min-width: 900px; height: 460px;background-image: url('../../src/assets/自动打标机.png') ;background-size: 100% 100%;float: left;">
      </div> -->
UI-Project/src/views/MechanicalArm/mechanicalArm.vue
@@ -2,7 +2,7 @@
<script setup>
import request from "@/utils/request";
import { ElMessage, ElMessageBox } from "element-plus";
import { computed,reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import { computed, reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import { useI18n } from 'vue-i18n'
import { WebSocketHost, host } from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
@@ -62,7 +62,7 @@
});
//报警提示
const errorInfoFuntion = async (info) => {
  let infoScancode='扫码ID:'+info.scanId+'  '+info.scanCode;
  let infoScancode = '扫码ID:' + info.scanId + '  ' + info.scanCode;
  ElMessageBox.confirm(
    infoScancode,
    t('delivery.prompt'),
@@ -262,10 +262,10 @@
    })
}
const topLineShow = async () => {
  blind.value = true;
  blind.value = true;
}
//领取任务/结束任务
const startOrStopTask = async (row,line,isWorking) => {
const startOrStopTask = async (row, line, isWorking) => {
  ElMessageBox.confirm(
    t('functionState.tips'),
    t('delivery.prompt'),
@@ -285,7 +285,8 @@
        }).then((res) => { // 替换为你的API端点  
          if (res.code === 200) {
            ElMessage.success(res.message);
          } else {n
          } else {
            n
            ElMessage.warning(res.message)
          }
        })
@@ -297,20 +298,20 @@
      })
    })
}
const handleDialogClose = () => {
const handleDialogClose = () => {
}
const fetchData = async () => {
  //扫码回车提交
  alert(searchs.value);
  searchs.value="";
  //alert(searchs.value);
  searchs.value = "";
}
const filterTableData = computed(() =>
  loadData.value.filter(
    (data) =>
      !searchs.value ||data.scanId.toLowerCase().includes(searchs.value.toLowerCase())
      !searchs.value || data.scanId.toLowerCase().includes(searchs.value.toLowerCase())
  )
)
</script>
@@ -320,11 +321,13 @@
      {{ $t('machine.mechanicalArm') }}
    </div>
    <el-dialog v-model="blind" top="30vh" style="text-align: center;" @close="handleDialogClose">
        <!-- 未领取的标准任务 -->
      <el-table :data="findPrimitiveTask" stripe style="height:260px" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }" :cell-style="{ textAlign: 'center' }">
      <!-- 未领取的标准任务 -->
      <el-table :data="findPrimitiveTask" stripe style="height:260px"
        :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }">
        <!-- <el-table-column type="selection" min-width="30" /> -->
        <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
        <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" />
        <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" />
@@ -337,7 +340,7 @@
        <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="70">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row,2,1)">{{
            <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 1)">{{
              $t('functionState.getTask') }}</el-button>
          </template>
        </el-table-column>
@@ -347,17 +350,17 @@
    <br>
    <div id="search">
      <!-- 功能 -->
      <el-button :type="(findMachine['state'] == '暂停' ? 'danger' : 'success')" id="ButtonMachineStatus"
        @click="machineStatus((findMachine['state'] == '暂停' ? '开工' : '暂停'))">{{ findMachine['state'] == '开工' ?
          $t('functionState.start') : $t('functionState.stop') }}</el-button>
        $t('functionState.start') : $t('functionState.stop') }}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="topLineShow">{{ $t('functionState.getTask') }}</el-button>
      <el-button :type="(findMachine['mode'] == '定制' ? 'danger' : 'success')" id="ButtonMachineMode"
        @click="machineMode((findMachine['mode'] == 0 ? 1 : 0))">{{ findMachine['mode'] == 0 ?
         $t('functionState.modeD') : $t('functionState.modeB') }}</el-button>
        $t('functionState.modeD') : $t('functionState.modeB') }}</el-button>
    </div>
    <div id="main-body" style="min-height:240px;">
      <!-- 表格内容 -->
      <el-table :data="filterTableData" stripe style="height:260px"
@@ -368,15 +371,20 @@
        <el-table-column type="index" :label="$t('glassInfo.number')" min-width="30" />
        <el-table-column prop="batchNumber" sortable :label="$t('glassInfo.batchNumber')" />
        <el-table-column prop="taskType" sortable :label="$t('glassInfo.taskType')" />
        <el-table-column prop="scanId" sortable :label="$t('glassInfo.scanId')" >
        <template #header>
        <el-table-column prop="scanId" :label="$t('glassInfo.scanId')">
          <template #header>
            <div>
              <div>{{ $t('glassInfo.taskType') }}
                <el-icon @click="fetchData"><CaretTop /></el-icon>
                <el-icon @click="fetchData"><CaretBottom /></el-icon>
                <el-icon color="#409efc"><Filter /></el-icon>
              </div>
              <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input>
              <span>{{ $t('glassInfo.scanId') }}</span>
              <span style="margin-left:10px ;"></span>
              <el-popover placement="bottom" title="筛选" :width="200" trigger="click">
                <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input>
                <template #reference>
                  <el-icon><Filter /></el-icon>
                </template>
              </el-popover>
              <el-icon><CaretTop /></el-icon>
              <el-icon><CaretBottom /></el-icon>
              <!-- <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input> -->
              <!-- <el-input size="small" placeholder="Type to search" /> -->
            </div>
          </template>
@@ -388,7 +396,7 @@
        <el-table-column prop="isWorking" sortable :label="$t('glassInfo.isWorking')" />
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row,2,2)">{{
            <el-button size="mini" link type="primary" plain @click="startOrStopTask(scope.row, 2, 2)">{{
              $t('functionState.stopTask') }}</el-button>
          </template>
        </el-table-column>
@@ -396,7 +404,8 @@
    </div>
    <div id="main-body" style="width: 100%; height: 460px;min-width: 1200px;">
      <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/扫码识别.png"></el-image>
      <img style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../assets/扫码识别.png">
      <!-- <el-image style="width: 70%;min-width: 900px; height: 460px;float: left;" src="../../src/assets/扫码识别.png"></el-image> -->
      <!-- <div style="width: 70%;min-width: 900px; height: 460px;background-image: url(../../src/assets/扫码识别.png) ;background-size: 100% 100%;float: left;">
      </div> -->
@@ -442,11 +451,12 @@
  border: none;
  cursor: pointer;
}
.dotClass {
  width:10px;
  height:10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
  margin-left: 10px;
  margin-left: 10px;
}
</style>
UI-Project/src/views/Rotate/rotate.vue
@@ -2,10 +2,12 @@
<script setup>
import request from "@/utils/request";
import { ElMessage, ElMessageBox } from "element-plus";
import { reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import { computed,reactive, ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import { useI18n } from 'vue-i18n'
import { WebSocketHost, host } from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
const requestData = reactive({
@@ -17,6 +19,7 @@
const findMachine = ref([]);
const sendRecords = ref([]);
const downLineTask = ref([]);
const searchs = ref();
const machineId = 20;//当前页面的设备ID
var errorScanId;
@@ -299,6 +302,17 @@
const handleDialogClose = () => {  
    
}
const fetchData = async () => {
  //扫码回车提交
  //alert(searchs.value);
  searchs.value="";
}
const filterTableData = computed(() =>
  loadData.value.filter(
    (data) =>
      !searchs.value ||data.scanId.toLowerCase().includes(searchs.value.toLowerCase())
  )
)
</script>
<template>
  <div ref="content" style="padding:0 20px;">
@@ -343,7 +357,7 @@
    </div>
    <div id="main-body" style="min-height:240px;">
      <!-- 表格内容 -->
      <el-table :data="loadData" stripe style="height:680px"
      <el-table :data="filterTableData" stripe style="height:680px"
        :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }">
        <!-- <el-table-column type="selection" min-width="30" /> -->
@@ -351,11 +365,20 @@
        <el-table-column prop="batchNumber" :label="$t('glassInfo.batchNumber')" />
        <el-table-column prop="taskType" :label="$t('glassInfo.taskType')" />
        <el-table-column prop="glassId" :label="$t('glassInfo.glassId')" />
        <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" />
        <el-table-column prop="scanId" :label="$t('glassInfo.scanId')" >
        <template #header>
            <div>
              <div>{{ $t('glassInfo.scanId') }}
              </div>
              <el-input v-model="searchs" type="primary" id="ReportSubmission" @keyup.enter="fetchData"></el-input>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="length" :label="$t('glassInfo.length')" />
        <el-table-column prop="width" :label="$t('glassInfo.width')" />
        <el-table-column prop="thickness" :label="$t('glassInfo.thickness')" />
        <el-table-column prop="workState" :label="$t('glassInfo.workState')" />
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')">{{
UI-Project/src/views/SilkScreen/SilkScreen.vue
@@ -6,6 +6,7 @@
import { useI18n } from 'vue-i18n'
import { WebSocketHost ,host} from '@/utils/constants'
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import {gridDateFormatter} from '@/stores/tool';
let language = ref(localStorage.getItem('lang') || 'zh')
const { t } = useI18n()
@@ -197,7 +198,7 @@
      {{findMachine['state']=='开工'?$t('functionState.start'):$t('functionState.stop')}}</el-button>
      <el-button type="primary" id="ButtonTopLine" @click="topLine">{{$t('functionState.topLine')}}</el-button>
    </div>
    <div id="main-body" style="height:240px; min-height:240px;">
    <div id="main-body" style=" min-height:240px;">
      <!-- 表格内容 -->
      <el-table :data="loadData" stripe style="height:680px"
        :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129', textAlign: 'center' }"
@@ -214,6 +215,7 @@
        <el-table-column prop="silkScreenX" :label="$t('glassInfo.silkScreenX')"/>
        <el-table-column prop="silkScreenY" :label="$t('glassInfo.silkScreenY')"/>
        <el-table-column prop="workState" :label="$t('glassInfo.workState')"/>
        <el-table-column prop="operationRecordTime" :formatter="gridDateFormatter" :label="$t('glassInfo.operationRecordTime')" width="180"/>
        <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
          <template #default="scope">
            <el-button size="mini" link type="primary" plain @click="workStatus(scope.row, '重发')" >{{$t('functionState.anew')}}</el-button>