廖井涛
2025-11-17 fcbce36f8734813b13c8f9c5b26b4bd192274534
north-glass-erp/src/main/java/com/example/erp/service/pp/GlassOptimizeService.java
@@ -18,6 +18,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -45,6 +46,9 @@
    GlassOptimizeMapper glassOptimizeMapper;
    @Autowired
    SysErrorService sysErrorService;
    @Value("${mesIp:localhost}")  // 注入mesIp配置,默认值为10.153.19.31
    private String mesIp;
    RabbitMQUtil rabbitMQUtil;
    //模拟计算
@@ -1243,8 +1247,7 @@
        boolean  saveState=false;
        try {
            // 1. 创建URL对象
            URL url = new URL("http://10.153.19.31:88/api/loadGlass/engineering/importEngineer");
//            URL url = new URL("http://localhost:88/api/loadGlass/engineering/importEngineer");
            URL url = new URL("http://" + mesIp + ":88/api/loadGlass/engineering/importEngineer");
            // 2. 打开连接
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
@@ -1482,7 +1485,7 @@
        try {
            // 1. 创建URL对象
            URL url = new URL("http://10.153.19.31:88/api/loadGlass/engineering/optimizeCancelTask");
            URL url = new URL("http://" + mesIp + ":88/api/loadGlass/engineering/optimizeCancelTask");
//            URL url = new URL("http://localhost:88/api/loadGlass/engineering/optimizeCancelTask");