自动化立体仓库 - WMS系统
野心家
2024-07-07 3c8343535bec2a53855956e25598e2271fc84c0d
src/main/java/com/zy/asrs/utils/PostMesDataUtils.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.impl.ApiLogServiceImpl;
@@ -14,8 +15,6 @@
@Slf4j
public class PostMesDataUtils extends AbstractHandler<String> {
    private ApiLogService apiLogService = new ApiLogServiceImpl();
    public ReturnT<String> postMesData(String name,String URL,String mesPath, Object combParam){
//        if (true){
@@ -45,12 +44,13 @@
                    throw new CoolException("上报"+name);
                }
            } catch (Exception e) {
                log.error("上报失败");
                log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response);
//                      TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                return FAIL.setMsg(e.getMessage());
            } finally {
                try {
                    // 保存接口日志
                    ApiLogService apiLogService = SpringUtils.getBean(ApiLogService.class);
                    apiLogService.save(
                            "上报"+name,
                            URL +"/"+ mesPath,
@@ -60,7 +60,8 @@
                            response,
                            success
                    );
                } catch (Exception e) { log.error("", e); }
                } catch (Exception e) {
                    log.error("", e); }
            }
        }
        return SUCCESS;