|
@@ -2,6 +2,7 @@ package com.goafanti.expenseAccount.service.impl;
|
|
|
|
|
|
|
|
import com.goafanti.common.dao.TOrderNewMapper;
|
|
import com.goafanti.common.dao.TOrderNewMapper;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
|
|
+import com.goafanti.expenseAccount.bo.ExpenseCountsBo;
|
|
|
import com.goafanti.expenseAccount.bo.ExpenseCountsInput;
|
|
import com.goafanti.expenseAccount.bo.ExpenseCountsInput;
|
|
|
import com.goafanti.expenseAccount.service.ExpenseCountsService;
|
|
import com.goafanti.expenseAccount.service.ExpenseCountsService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -9,6 +10,8 @@ import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
@Service
|
|
@Service
|
|
|
public class ExpenseCountsServiceImpl implements ExpenseCountsService {
|
|
public class ExpenseCountsServiceImpl implements ExpenseCountsService {
|
|
|
|
|
|
|
@@ -19,7 +22,13 @@ public class ExpenseCountsServiceImpl implements ExpenseCountsService {
|
|
|
public Object getCounts(ExpenseCountsInput in) {
|
|
public Object getCounts(ExpenseCountsInput in) {
|
|
|
if (in.getTargetType()==null)in.setTargetType(1);
|
|
if (in.getTargetType()==null)in.setTargetType(1);
|
|
|
if (in.getTargetType()==1){
|
|
if (in.getTargetType()==1){
|
|
|
- return tOrderNewMapper.selectExpenseCount(in);
|
|
|
|
|
|
|
+ List<ExpenseCountsBo> expenseCountsBos = tOrderNewMapper.selectExpenseCount(in);
|
|
|
|
|
+ expenseCountsBos.forEach(e->{
|
|
|
|
|
+ if (e.getMaxDuration().equals("-1")){
|
|
|
|
|
+ e.setMaxDuration("不限制");
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return expenseCountsBos;
|
|
|
}else {
|
|
}else {
|
|
|
return tOrderNewMapper.selectExpenseDepCount(in);
|
|
return tOrderNewMapper.selectExpenseDepCount(in);
|
|
|
}
|
|
}
|