From 98bcd061526cad604a83241cc94994e1e225982a Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期一, 10 二月 2025 09:21:03 +0800 Subject: [PATCH] 库存明细统计增加车间,树脂类型搜索框,默认统计库存状态为(已入库+部分出库+待出库),库存重量为0不显示记录 --- src/main/java/com/zy/asrs/task/AbstractHandler.java | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/AbstractHandler.java b/src/main/java/com/zy/asrs/task/AbstractHandler.java index 2e8383a..5a6e371 100644 --- a/src/main/java/com/zy/asrs/task/AbstractHandler.java +++ b/src/main/java/com/zy/asrs/task/AbstractHandler.java @@ -1,17 +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 */ +@Slf4j public abstract class AbstractHandler<T> { public final ReturnT<T> SUCCESS = new ReturnT<>(200, null); public final ReturnT<T> FAIL = new ReturnT<>(500, null); - protected abstract ReturnT<T> start(); +// protected abstract ReturnT<T> start(); protected void exceptionHandle(String errorMsg){ - throw new AsrsException(errorMsg); + 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