Parcourir la source

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

liutao il y a 7 mois
Parent
commit
7c89396602

+ 1 - 1
src/main/java/com/sunxung/factoring/service/refundsManagement/impl/RefundManagementApprovalServiceImpl.java

@@ -267,7 +267,7 @@ public class RefundManagementApprovalServiceImpl extends ServiceImpl<RefundManag
     @Override
     public void handleCashFlow(BillingNonbusinessManageFactoringentry nobusinessManage) {
         if (nobusinessManage != null) {
-            RefundsApplyDetails refundsApplyDetails = refundsApplyDetailsService.getById(nobusinessManage.getTradeRefundManagementId());
+            RefundsApplyDetails refundsApplyDetails = refundsApplyDetailsService.getById(nobusinessManage.getRefundsApplyDetailsId());
             cashFlowComplete(refundsApplyDetails, nobusinessManage);
         }
     }

+ 12 - 5
src/main/java/com/sunxung/factoring/service/refundsManagement/impl/RefundManagementServiceImpl.java

@@ -256,11 +256,14 @@ public class RefundManagementServiceImpl extends ServiceImpl<RefundManagementMap
                 }
                 paymentCollectionBasicVoList.add(paymentCollectionBasicVo);
 
-                autoExecutor(taskVo);
             });
 
             autoPlanAndAmount(paymentCollectionBasicVoList, rows);
 
+            rows.forEach(row->{
+                autoExecutor(row);
+            });
+
         }
         return rows;
     }
@@ -508,10 +511,10 @@ public class RefundManagementServiceImpl extends ServiceImpl<RefundManagementMap
             applyDetails.setRefundManagementId(refundManagementVo.getBusinessKey());
             applyDetails.setStatus(0);
             applyDetails.setUserId(ThreadLocalUtil.getUserId());
-            applyDetails.setAmountCapitalization(NumberChineseFormatterUtils.format(applyDetails.getPaymentAmountTotal().doubleValue(), false, true));
+            applyDetails.setAmountCapitalization(MoneyToCNFormatUtil.formatToCN(applyDetails.getPaymentAmountTotal().doubleValue()));
             refundsApplyDetailsService.save(applyDetails);
 
-            if (OaFlowPaymentMatterTypeDic.ChildEnum.OA_UPSTREAM_GOODS_PAYMENT_MATTER.getCode().equals(applyDetails.getPaymentMatter())
+            if (OaFlowPaymentMatterTypeDic.ChildEnum.OA_REFUND_MATTER.getCode().equals(applyDetails.getPaymentMatter())
                     && CollectionUtil.isNotEmpty(selectedPlans)) {
                 selectedPlans.forEach(plan -> {
                     RefundsApplyDetailsPayCollPlanRef applyDetailsPayCollPlanRef = new RefundsApplyDetailsPayCollPlanRef();
@@ -632,7 +635,11 @@ public class RefundManagementServiceImpl extends ServiceImpl<RefundManagementMap
     //填充执行人
     void autoExecutor(BusinessProcessingTaskVo taskVo) {
         if (taskVo != null) {
-//            if (taskVo.getTaskName())
+            if ("退款审核".equals(taskVo.getTaskName())){
+                taskVo.setExecutor("风控经理");
+            }else if ("退款申请".equals(taskVo.getTaskName())){
+                taskVo.setExecutor("业务经理");
+            }
         }
     }
 
@@ -673,7 +680,7 @@ public class RefundManagementServiceImpl extends ServiceImpl<RefundManagementMap
                     .list();
             if (CollectionUtil.isNotEmpty(fundGoodsAssignList)) {
                 List<LedgerAccountBasicInfo> ledgerAccountBasicInfos = fundGoodsAssignList.stream().map(fundGoodsAssign ->
-                     ledgerAccountBasicInfoService.getById(fundGoodsAssign.getLedgerAccountBasicInfoId())
+                        ledgerAccountBasicInfoService.getById(fundGoodsAssign.getLedgerAccountBasicInfoId())
                 ).sorted(Comparator.comparing(LedgerAccountBasicInfo::getGmtCreate).reversed()).collect(Collectors.toList());
                 List<RefundsApplyAccountInfo> accountInfoList = new ArrayList<>();
                 if (CollectionUtil.isNotEmpty(ledgerAccountBasicInfos)) {

+ 1 - 1
src/main/java/com/sunxung/factoring/web/refundManagement/RefundManagementApiController.java

@@ -31,7 +31,7 @@ public class RefundManagementApiController {
 
     @RequestMapping("/handleCashFlow")
     @OperationLog(operationModule = "退款管理", operationType = OperationTypeEnum.INSERT, description = "sop回调")
-    public ResponseJson doCreate(BillingNonbusinessManageFactoringentry nobusinessManage) {
+    public ResponseJson doCreate(@RequestBody BillingNonbusinessManageFactoringentry nobusinessManage) {
         refundManagementApprovalService.handleCashFlow(nobusinessManage);
         return new ResponseJson("操作成功!");
     }