From f6513ffa7e2efe2a4dc81626c7aab9cf643f8f41 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期四, 14 三月 2024 10:14:28 +0800 Subject: [PATCH] 1.增加牌号作为唯一物料条件 (当前牌号 批号 包号可以筛选出唯一物料) 2.增加移库接口 3.订单出库可替换物料 4.页面ui完善 --- src/main/java/com/zy/asrs/task/AbstractHandler.java | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/AbstractHandler.java b/src/main/java/com/zy/asrs/task/AbstractHandler.java index 7dd306c..5a6e371 100644 --- a/src/main/java/com/zy/asrs/task/AbstractHandler.java +++ b/src/main/java/com/zy/asrs/task/AbstractHandler.java @@ -1,21 +1,31 @@ package com.zy.asrs.task; import com.core.exception.CoolException; +import com.zy.asrs.task.core.AsrsException; +import com.zy.asrs.task.core.ReturnT; +import lombok.extern.slf4j.Slf4j; + +import java.text.MessageFormat; /** * Created by vincent on 2020/7/4 */ -public abstract class AbstractHandler { +@Slf4j +public abstract class AbstractHandler<T> { - public void run(){ - boolean start = start(); - System.out.println(start); - } + public final ReturnT<T> SUCCESS = new ReturnT<>(200, null); + public final ReturnT<T> FAIL = new ReturnT<>(500, null); - protected abstract boolean start(); +// protected abstract ReturnT<T> start(); protected void exceptionHandle(String errorMsg){ - throw new CoolException("231"); + log.error(errorMsg); + exceptionHandle(errorMsg, (Object) null); + } + + protected void exceptionHandle(String errorMsg, Object... args){ + log.error(errorMsg); + throw new CoolException(MessageFormat.format(errorMsg, args)); } } -- Gitblit v1.9.1