自动化立体仓库 - WMS系统
zhangc
2025-01-04 12d4bcc3e31ee19ba0aea18fcd874a291072ddf0
src/main/java/com/zy/asrs/task/handler/ReportDataHandler.java
@@ -57,6 +57,9 @@
    @Value("${mes.pakoutReportPath}")
    private String pakoutReportPath;
    @Value("${mes.stock}")
    private String stock;
    @Transactional
    public ReturnT<String> start(ReportData data, Map<String, Object> mesTokenInfo) {
@@ -90,7 +93,7 @@
    private String doHttpRequest(String requestParam, Map<String, Object> headParam, String namespace, String url, String path, String appkey, String ip) {
        String response = "false";
        String response = "fail";
        boolean success = false;
        try {
@@ -103,14 +106,22 @@
                throw new CoolException("mes接口调用失败,返回信息:" + jsonObject);
            }
            success = true;
            return "true";
            return null;
        } catch (Exception e) {
            log.error(e.getMessage());
            log.error("mes接口调用失败,返回信息:{}", e.getMessage());
            //throw new CoolException(e.getMessage());
        } finally {
            apiLogService.save(namespace, url + path, appkey, ip, requestParam, response, success);
        }
        return response;
    }
    @Transactional
    public ReturnT<String> stock(Map<String, Object> mesTokenInfo) {
        String result = doHttpRequest("{}", mesTokenInfo, "同步MES库存", url, stock, null, "127.0.0.1");
        return SUCCESS;
    }
}