Преглед на файлове

出账列表加出账人

wanglang преди 4 дни
родител
ревизия
2595b0aca8

+ 12 - 2
trade-service/src/main/java/com/trade/service/finance/disbursement/service/impl/BillingDisbursementServiceImpl.java

@@ -22,6 +22,8 @@ import com.trade.service.finance.disbursement.service.BillingDisbursementService
 import com.trade.service.finance.disbursement.vo.BillingDisbursementPageVo;
 import com.trade.service.finance.disbursement.vo.ReceivePaymentPageVo;
 import com.trade.service.finance.paymentcollection.domain.OrderIncomeAssociation;
+import com.trade.service.finance.paymentcollection.domain.PaymentCollectionOperate;
+import com.trade.service.finance.paymentcollection.service.PaymentCollectionOperateService;
 import com.trade.service.trade.salescontract.dto.SalesContractDto;
 import com.trade.service.trade.salescontract.service.SalesContractService;
 import org.slf4j.Logger;
@@ -44,11 +46,20 @@ public class BillingDisbursementServiceImpl extends ServiceImpl<BillingDisbursem
     private SalesContractService salesContractService;
     @Resource
     private EnterpriseBaseService enterpriseBaseService;
+    @Resource
+    private PaymentCollectionOperateService paymentCollectionOperateService;
 
     @Override
     public GridPage<BillingDisbursementPageVo> queryListByPage(DisbursementSearchDto searchDto) {
         Page<BillingDisbursementPageVo> page = PageHelper.startPage(searchDto.getPage(), searchDto.getRows());
         List<BillingDisbursementPageVo> voList = this.baseMapper.selectByPage(searchDto);
+        for (BillingDisbursementPageVo billingDisbursementPageVo : voList) {
+            PaymentCollectionOperate paymentCollectionOperate = paymentCollectionOperateService
+                    .getBusinessInfo(billingDisbursementPageVo.getId(), 2);
+            if (paymentCollectionOperate != null) {
+                billingDisbursementPageVo.setBiller(paymentCollectionOperate.getReviewer());
+            }
+        }
         return new GridPage<>(searchDto.getPage(), searchDto.getRows(), page.getTotal(), voList);
     }
 
@@ -114,8 +125,7 @@ public class BillingDisbursementServiceImpl extends ServiceImpl<BillingDisbursem
         billingDisbursement.setStatus(BillingConstant.DISBURSEMENT_STATUS_CONFIRMED);
         billingDisbursement.setSource(orderIncomeAssociation.getSource());
         billingDisbursement.setPayeeType(BillingConstant.PAYEE_TYPE_CUSTOMER);
-        Enterprise enterprise = enterpriseBaseService
-                .getEnterpriseByCustomerId(salesContractDto.getCustomerUserId());
+        Enterprise enterprise = enterpriseBaseService.getEnterpriseByCustomerId(salesContractDto.getCustomerUserId());
         if (enterprise != null) {
             billingDisbursement.setTradeParticipantsIdentifier(enterprise.getName());
         }

+ 2 - 0
trade-service/src/main/java/com/trade/service/finance/disbursement/vo/BillingDisbursementPageVo.java

@@ -66,4 +66,6 @@ public class BillingDisbursementPageVo {
     private LocalDateTime gmtCreate;
     @ApiModelProperty(name = "tradeParticipantsIdentifier", value = "贸易参与方标识/收款方名称")
     private String tradeParticipantsIdentifier;
+    @ApiModelProperty(name = "biller", value = "出账人")
+    private String biller;
 }