|
|
@@ -710,7 +710,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
BigDecimal count = new BigDecimal(0);
|
|
|
List<String> typeList = new ArrayList<String>();
|
|
|
for (ExpenseAccount e : list) {
|
|
|
- count.add(e.getTotalAmount());
|
|
|
+ count=count.add(e.getTotalAmount());
|
|
|
StringBuffer types=new StringBuffer();
|
|
|
if (e.getType()!=0){
|
|
|
types=types.append(EATypes.getDescByCode(e.getType()));
|
|
|
@@ -721,10 +721,10 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
if (e.getSecondaryType()==13){
|
|
|
types=types.append(e.getSecondaryTypeOther());
|
|
|
}else{
|
|
|
- types=types.append(EAsecondaryTypes.getDescByCode(e.getSecondaryType()));
|
|
|
+ types=types.append("-").append(EAsecondaryTypes.getDescByCode(e.getSecondaryType()));
|
|
|
}
|
|
|
}
|
|
|
- if (typeList.contains(types.toString()))typeList.add(types.toString());
|
|
|
+ if (!typeList.contains(types.toString()))typeList.add(types.toString());
|
|
|
}
|
|
|
in.setTotalAmount(count);
|
|
|
in.setRealAmount(count);
|
|
|
@@ -744,6 +744,16 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
@Override
|
|
|
public MainExpenseAccount mainExpense(Integer id) {
|
|
|
MainExpenseAccount res = expenseAccountMapper.selectByMainId(id);
|
|
|
+ res.setExamine(0);
|
|
|
+ if (TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)&&(res.getProcessStatus()==1)){
|
|
|
+ res.setExamine(1);
|
|
|
+ }else if (TokenManager.hasRole(AFTConstants.FINANCE)&&(res.getProcessStatus()==2)){
|
|
|
+ res.setExamine(1);
|
|
|
+ }else if (TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN)&&(res.getProcessStatus()==3)){
|
|
|
+ res.setExamine(1);
|
|
|
+ }else if (TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)&&(res.getProcessStatus()==4)){
|
|
|
+ res.setExamine(1);
|
|
|
+ }
|
|
|
return res;
|
|
|
}
|
|
|
|