自动化立体仓库 - WMS系统
*
lsh
17 小时以前 4448779d76ff424e666d65f2f168a5890642c857
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -22,6 +22,7 @@
import com.zy.common.utils.HttpHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -50,6 +51,11 @@
    private WrkDetlServiceImpl wrkDetlService;
    @Autowired
    private SnowflakeIdWorker snowflakeIdWorker;
    @Value("${srXghyMes.productInventoryUrl}")
    private String productInventoryUrl;
    @Value("${srXghyMes.productInventory}")
    private String productInventory;
    @Transactional
    public ReturnT<String> start(Order order) {
@@ -251,8 +257,8 @@
        boolean success = false;
        try {
            response = new HttpHandler.Builder()
                    .setUri(MesConstant.URL)
                    .setPath(MesConstant.PAKIN_URL)
                    .setUri(productInventoryUrl)
                    .setPath(productInventory)
                    .setJson(JSON.toJSONString(orderMesXGHYParam))
                    .build()
                    .doPost();
@@ -260,7 +266,7 @@
            if (jsonObject.getInteger("code").equals(200)) {
                success = true;
            } else {
                log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(orderMesXGHYParam), response);
                log.error("请求接口失败!!!url:{};request:{};response:{}", productInventoryUrl+"/"+productInventory, JSON.toJSONString(orderMesXGHYParam), response);
            }
        } catch (Exception e) {
            log.error("fail", e);
@@ -271,7 +277,7 @@
                // 保存接口日志
                apiLogService.save(
                        "成品库入库上报",
                        MesConstant.URL + MesConstant.PAKIN_URL,
                        productInventoryUrl+"/"+productInventory,
                        null,
                        "127.0.0.1",
                        JSON.toJSONString(orderMesXGHYParam),
@@ -280,7 +286,6 @@
                );
            } catch (Exception e) { log.error("", e); }
        }
//        System.out.println(orderMesXGHYParam.toString());
        return SUCCESS;
    }