Browse Source

报销详情显示修改

anderx 1 year ago
parent
commit
bfcf115e2c

+ 8 - 8
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -1423,13 +1423,13 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
             }
             if (e.getOrderNo()!=null){
                 List<ExpenseAccount> expenseAccounts = expenseAccountMapper.selectByOrderNo(e.getOrderNo());
+                int year = LocalDate.now().getYear();
+                BigDecimal count = BigDecimal.ZERO;
+                BigDecimal yxyCount = BigDecimal.ZERO;
+                BigDecimal zxsCount = BigDecimal.ZERO;
+                BigDecimal qtCount = BigDecimal.ZERO;
+                TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(e.getOrderNo(), String.valueOf(year));
                 if(!expenseAccounts.isEmpty()){
-                    int year = LocalDate.now().getYear();
-                    TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(e.getOrderNo(), String.valueOf(year));
-                    BigDecimal count = BigDecimal.ZERO;
-                    BigDecimal yxyCount = BigDecimal.ZERO;
-                    BigDecimal zxsCount = BigDecimal.ZERO;
-                    BigDecimal qtCount = BigDecimal.ZERO;
                     for (ExpenseAccount ea : expenseAccounts) {
                         count=count.add(ea.getAmount());
                         Admin admin = adminMapper.selectByPrimaryKey(ea.getAid());
@@ -1443,9 +1443,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                             }
                         }
                     }
-                    String str = getString(e, out, count, yxyCount, zxsCount,qtCount);
-                    e.setCountStr(str);
                 }
+                String str = getString(e, out, count, yxyCount, zxsCount,qtCount);
+                e.setCountStr(str);
             }
         }