|
|
@@ -226,10 +226,21 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
if (useEa.getDebitId()!=null){
|
|
|
ExpenseAccount useDebit=expenseAccountMapper.selectByPrimaryKey(useEa.getDebitId());
|
|
|
if (useDebit.getLiquidationStatus()==2){
|
|
|
- ExpenseAccount debit=new ExpenseAccount();
|
|
|
- debit.setId(useEa.getDebitId());
|
|
|
- debit.setLiquidationStatus(3);
|
|
|
- expenseAccountMapper.updateByPrimaryKeySelective(debit);
|
|
|
+ List<ExpenseAccount> expenseAccounts = expenseAccountMapper.selectByDebit(useDebit.getDebitId());
|
|
|
+ boolean flag=true;
|
|
|
+ for (ExpenseAccount expenseAccount : expenseAccounts) {
|
|
|
+ if(expenseAccount.getStatus()!=2){
|
|
|
+ flag=flag;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag){
|
|
|
+ ExpenseAccount debit=new ExpenseAccount();
|
|
|
+ debit.setId(useEa.getDebitId());
|
|
|
+ debit.setLiquidationStatus(3);
|
|
|
+ expenseAccountMapper.updateByPrimaryKeySelective(debit);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|