|
|
@@ -15,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
@@ -100,6 +101,10 @@ public class ExpenseTypeServiceImpl implements ExpenseTypeService {
|
|
|
|
|
|
@Override
|
|
|
public List<ExpenseItemDO> getItemListByExpenseTypeId(Long expenseTypeId) {
|
|
|
+ if (expenseTypeId != null && expenseTypeId == 0L) {
|
|
|
+ // 约定:前端传0,表示未选择报销类型,此时费用项目返回空集合
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
return itemMapper.selectListByExpenseTypeId(expenseTypeId);
|
|
|
}
|
|
|
|