|
@@ -16,8 +16,13 @@ import com.fjhx.account.entity.account.po.AccountPaymentRecords;
|
|
|
import com.fjhx.account.entity.account.po.AccountRunningWater;
|
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentRecordsVo;
|
|
|
import com.fjhx.account.entity.account.vo.AccountPaymentVo;
|
|
|
+import com.fjhx.account.entity.payment.po.PaymentType;
|
|
|
import com.fjhx.account.mapper.account.AccountPaymentMapper;
|
|
|
-import com.fjhx.account.service.account.*;
|
|
|
+import com.fjhx.account.service.account.AccountManagementService;
|
|
|
+import com.fjhx.account.service.account.AccountPaymentRecordsService;
|
|
|
+import com.fjhx.account.service.account.AccountPaymentService;
|
|
|
+import com.fjhx.account.service.account.AccountRunningWaterService;
|
|
|
+import com.fjhx.account.service.payment.PaymentTypeService;
|
|
|
import com.fjhx.common.service.corporation.CorporationService;
|
|
|
import com.fjhx.common.utils.Assert;
|
|
|
import com.fjhx.file.utils.ObsFileUtil;
|
|
@@ -31,8 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@@ -52,8 +56,6 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
@Autowired
|
|
|
private ISysDeptService sysDeptService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private AccountRemainderService accountRemainderService;
|
|
|
|
|
|
@Autowired
|
|
|
private AccountRunningWaterService accountRunningWaterService;
|
|
@@ -64,6 +66,9 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
@Autowired
|
|
|
private AccountPaymentRecordsService accountPaymentRecordsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PaymentTypeService paymentTypeService;
|
|
|
+
|
|
|
@Override
|
|
|
public Page<AccountPaymentVo> getPage(AccountRequestFundsSelectDto dto) {
|
|
|
|
|
@@ -118,9 +123,33 @@ public class AccountPaymentServiceImpl extends ServiceImpl<AccountPaymentMapper,
|
|
|
List<SysDept> sysDeptList = sysDeptService.list();
|
|
|
Map<Long, String> deptMap = sysDeptList.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName));
|
|
|
|
|
|
+ //付款类型
|
|
|
+ Map<Long, String> paymentTypeMap = paymentTypeService.mapKV(PaymentType::getId, PaymentType::getName, q -> q.orderByAsc(PaymentType::getId));
|
|
|
+
|
|
|
for (AccountPaymentVo record : records) {
|
|
|
- record.setCorporationName(deptMap.get(record.getCompanyId()));
|
|
|
+ List<String> nameList = new ArrayList<>();
|
|
|
+
|
|
|
+ String companyIds = record.getCompanyIds();
|
|
|
+ if (ObjectUtil.isNull(companyIds)) {
|
|
|
+ companyIds = "";
|
|
|
+ }
|
|
|
+ List<Long> collect = Arrays.stream(companyIds.split(","))
|
|
|
+ .filter(item -> ObjectUtil.isNotEmpty(item)).map(Long::valueOf).collect(Collectors.toList());
|
|
|
+ collect.add(record.getCompanyId());
|
|
|
+ collect = collect.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
|
+ for (Long aLong : collect) {
|
|
|
+ nameList.add(deptMap.getOrDefault(aLong, String.valueOf(aLong)));
|
|
|
+ }
|
|
|
+
|
|
|
+ record.setCorporationName(nameList.stream().collect(Collectors.joining(",")));
|
|
|
record.setDeptName(deptMap.get(record.getDepartmentId()));
|
|
|
+
|
|
|
+ //赋值付款类型
|
|
|
+ String type = record.getType();
|
|
|
+ if (ObjectUtil.isNotEmpty(type) && type.matches("\\d+")) {
|
|
|
+ record.setTypeName(paymentTypeMap.get(Long.valueOf(type)));
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return page;
|