|
@@ -5,15 +5,15 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.fjhx.account.entity.account.dto.AccountRequestFundsSelectDto;
|
|
import com.fjhx.account.entity.account.dto.AccountRequestFundsSelectDto;
|
|
|
|
+import com.fjhx.account.entity.account.enums.PaymentStatusEnum;
|
|
|
|
+import com.fjhx.account.entity.account.enums.PaymentTypeEnum;
|
|
import com.fjhx.account.entity.account.po.AccountPayment;
|
|
import com.fjhx.account.entity.account.po.AccountPayment;
|
|
import com.fjhx.account.entity.account.po.AccountRemainder;
|
|
import com.fjhx.account.entity.account.po.AccountRemainder;
|
|
|
|
+import com.fjhx.account.entity.account.po.AccountRunningWater;
|
|
import com.fjhx.account.entity.account.vo.AccountRequestFundsVo;
|
|
import com.fjhx.account.entity.account.vo.AccountRequestFundsVo;
|
|
import com.fjhx.account.mapper.account.AccountPaymentMapper;
|
|
import com.fjhx.account.mapper.account.AccountPaymentMapper;
|
|
-import com.fjhx.account.service.account.AccountManagementService;
|
|
|
|
-import com.fjhx.account.service.account.AccountPaymentService;
|
|
|
|
|
|
+import com.fjhx.account.service.account.*;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
-import com.fjhx.account.service.account.AccountRemainderService;
|
|
|
|
-import com.fjhx.account.service.account.AccountRequestFundsDetailService;
|
|
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
import com.fjhx.common.entity.corporation.po.Corporation;
|
|
import com.fjhx.common.entity.corporation.po.Corporation;
|
|
import com.fjhx.common.service.corporation.CorporationService;
|
|
import com.fjhx.common.service.corporation.CorporationService;
|
|
@@ -60,6 +60,9 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
@Autowired
|
|
@Autowired
|
|
private AccountRemainderService accountRemainderService;
|
|
private AccountRemainderService accountRemainderService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private AccountRunningWaterService accountRunningWaterService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Page<AccountRequestFundsVo> getPage(AccountRequestFundsSelectDto dto) {
|
|
public Page<AccountRequestFundsVo> getPage(AccountRequestFundsSelectDto dto) {
|
|
QueryWrapper<Object> wrapper = Wrappers.query();
|
|
QueryWrapper<Object> wrapper = Wrappers.query();
|
|
@@ -144,6 +147,9 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
//修改账户-余额表的中余额
|
|
//修改账户-余额表的中余额
|
|
accountRemainder.setRemainder( accountRemainder.getRemainder().subtract(accountPaymentDto.getAmount()));
|
|
accountRemainder.setRemainder( accountRemainder.getRemainder().subtract(accountPaymentDto.getAmount()));
|
|
accountRemainderService.add(accountRemainder);
|
|
accountRemainderService.add(accountRemainder);
|
|
|
|
+
|
|
|
|
+ //添加资金流水表的数据
|
|
|
|
+ addAccountRunningWater(accountPaymentDto);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -156,5 +162,24 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
this.removeById(id);
|
|
this.removeById(id);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 添加资金流水表的数据
|
|
|
|
+ */
|
|
|
|
+ private void addAccountRunningWater(AccountPaymentDto accountPaymentDto){
|
|
|
|
+
|
|
|
|
+ AccountRunningWater accountRunningWater = new AccountRunningWater();
|
|
|
|
+ accountRunningWater.setAccountManagementId(accountPaymentDto.getAccountManagementId());
|
|
|
|
+ accountRunningWater.setStatus("20");
|
|
|
|
+ accountRunningWater.setAmount(accountPaymentDto.getAmount());
|
|
|
|
+ accountRunningWater.setCurrency(accountPaymentDto.getCurrency());
|
|
|
|
+ accountRunningWater.setOpeningBank(accountPaymentDto.getOpeningBank());
|
|
|
|
+ accountRunningWater.setAccountOpening(accountPaymentDto.getAccountOpening());
|
|
|
|
+ accountRunningWater.setName(accountPaymentDto.getName());
|
|
|
|
+ accountRunningWater.setTransactionTime(accountPaymentDto.getExpensesTime());
|
|
|
|
+ accountRunningWater.setRemarks(accountPaymentDto.getRemark());
|
|
|
|
+ accountRunningWaterService.save(accountRunningWater);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|