Junjie
昨天 3a633a83c866feed08d192c74c7d86cc66440916
src/main/java/com/zy/core/plugin/store/StoreInTaskPolicy.java
@@ -38,10 +38,6 @@
        return RedisKeyType.GENERATE_IN_TASK_LIMIT.key + context.getStationObjModel().getStationId();
    }
    default int getSubmitLockSeconds(StoreInTaskContext context) {
        return 2;
    }
    default int getRetryLockSeconds(StoreInTaskContext context) {
        return 2;
    }
@@ -67,17 +63,24 @@
    default void afterTaskCreated(StoreInTaskContext context, WrkMast wrkMast) {
    }
    default void onApplySubmitted(StoreInTaskContext context) {
        context.getStationProtocol().setSystemWarning("请求入库中");
    }
    default void onApplyFailed(StoreInTaskContext context, AsyncInTaskResult result) {
        String warning = "请求入库失败,WMS返回=" + buildFailureMessage(result);
    default void setSystemWarning(StoreInTaskContext context, String warning) {
        if (context == null || context.getStationProtocol() == null) {
            return;
        }
        context.getStationProtocol().setSystemWarning(warning);
        syncWarningToBackStation(context, warning);
    }
    default String buildFailureMessage(AsyncInTaskResult result) {
    default void clearSystemWarning(StoreInTaskContext context) {
        setSystemWarning(context, "");
    }
    default void onApplyFailed(StoreInTaskContext context, InTaskApplyResult result) {
        String warning = "请求入库失败,WMS返回=" + buildFailureMessage(result);
        setSystemWarning(context, warning);
    }
    default String buildFailureMessage(InTaskApplyResult result) {
        if (!Cools.isEmpty(result.getResponse())) {
            return result.getResponse();
        }