|
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
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.AccountManagement;
|
|
|
import com.fjhx.account.entity.account.po.AccountPayment;
|
|
|
import com.fjhx.account.entity.account.po.AccountRemainder;
|
|
|
import com.fjhx.account.entity.account.po.AccountRunningWater;
|
|
@@ -63,13 +64,16 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
@Autowired
|
|
|
private AccountRunningWaterService accountRunningWaterService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AccountManagementService accountManagementService;
|
|
|
+
|
|
|
@Override
|
|
|
- public Page<AccountRequestFundsVo> getPage(AccountRequestFundsSelectDto dto) {
|
|
|
+ public Page<AccountPaymentVo> getPage(AccountRequestFundsSelectDto dto) {
|
|
|
QueryWrapper<Object> wrapper = Wrappers.query();
|
|
|
wrapper.eq(ObjectUtil.isNotEmpty(dto.getPaymentStatus()),"ap.status",dto.getPaymentStatus());
|
|
|
wrapper.like(ObjectUtil.isNotEmpty(dto.getKeyword()),"ap.payment_remarks",dto.getKeyword());
|
|
|
wrapper.orderByDesc("ap.status","ap.payment_time","ap.create_time");
|
|
|
- Page<AccountRequestFundsVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ Page<AccountPaymentVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
|
|
|
//切换数据源
|
|
|
DynamicDataSourceContextHolder.push(SourceConstant.COMMON);
|
|
@@ -87,8 +91,8 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
|
|
|
|
|
|
//赋值部门名称、归属公司名称
|
|
|
- List<AccountRequestFundsVo> records = page.getRecords();
|
|
|
- for (AccountRequestFundsVo record : records) {
|
|
|
+ List<AccountPaymentVo> records = page.getRecords();
|
|
|
+ for (AccountPaymentVo record : records) {
|
|
|
List<SysDept> sysDepts = sysDeptMap.get(record.getDepartmentId());
|
|
|
if (ObjectUtil.isNotEmpty(sysDepts)){
|
|
|
record.setDeptName(sysDepts.get(0).getDeptName());
|
|
@@ -101,7 +105,7 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
}
|
|
|
|
|
|
// 赋值用户名称
|
|
|
- UserUtil.assignmentNickName(records, BasePo::getCreateUser,AccountRequestFundsVo::setUserName);
|
|
|
+ UserUtil.assignmentNickName(records, BasePo::getCreateUser,AccountPaymentVo::setUserName);
|
|
|
|
|
|
return page;
|
|
|
}
|
|
@@ -113,6 +117,18 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
public AccountPaymentVo detail(Long id) {
|
|
|
AccountPayment AccountPayment = baseMapper.detail(id);
|
|
|
AccountPaymentVo result = BeanUtil.toBean(AccountPayment, AccountPaymentVo.class);
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(result.getAccountManagementId())){
|
|
|
+ //查询实际打款的付款账户名称;
|
|
|
+ AccountManagement accountManagement = accountManagementService.getById(result.getAccountManagementId());
|
|
|
+ result.setAccountManagementName(accountManagement.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(result.getBusinessManagementId())){
|
|
|
+ //查询业务中选中的付款账户名称;
|
|
|
+ AccountManagement accountManagement = accountManagementService.getById(result.getBusinessManagementId());
|
|
|
+ result.setBusinessManagementName(accountManagement.getName());
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|