huang
16 小时以前 9c489617b002e71859597097c9d1d2f1b9fc0e56
mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/GlassInfoImportController.java
@@ -1,5 +1,6 @@
package com.mes.device.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mes.device.entity.EngineeringSequence;
import com.mes.device.entity.GlassInfo;
import com.mes.device.service.EngineeringSequenceService;
@@ -10,6 +11,7 @@
import org.springframework.http.ResponseEntity;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.ResourceAccessException;
import org.springframework.web.client.RestTemplate;
import java.util.*;
@@ -116,7 +118,7 @@
            // 7. 返回MES的响应
            return ResponseEntity.status(mesResp.getStatusCode()).body(mesBody);
        } catch (org.springframework.web.client.ResourceAccessException e) {
        } catch (ResourceAccessException e) {
            // 连接超时或无法连接
            log.error("转发 MES 导入接口失败(连接问题) url={}, error={}", glassInfoService.getMesEngineeringImportUrl(), e.getMessage(), e);
            errorResponse.put("code", 500);
@@ -204,7 +206,7 @@
            
            // 2. 删除engineering_sequence表中的工程号记录(逻辑删除)
            EngineeringSequence sequence = engineeringSequenceService.getOne(
                new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<EngineeringSequence>()
                new LambdaQueryWrapper<EngineeringSequence>()
                    .eq(EngineeringSequence::getEngineeringId, engineeringId)
                    .eq(EngineeringSequence::getIsDeleted, 0) // 只查询未删除的记录
                    .last("LIMIT 1")