Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev_jzg_lipf_v20260622' into dev_jzg_lipf_v20260622

lipf před 2 měsíci
rodič
revize
a9238b0091

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/finance/dto/ExportSuperviseSettlementExcelDto.java

@@ -61,6 +61,14 @@ public class ExportSuperviseSettlementExcelDto {
     @ExcelProperty(value = "应收金额")
     @ExcelProperty(value = "应收金额")
     private String receivableSupervisePremium;
     private String receivableSupervisePremium;
 
 
+    @Schema(description = "回款差额")
+    @ExcelProperty(value = "回款差额")
+    private String settlementPaymentDifference;
+
+    @Schema(description = "回款原因")
+    @ExcelProperty(value = "回款原因")
+    private String settlementPaymentReason;
+
     @Schema(description = "收款日期")
     @Schema(description = "收款日期")
     @ExcelProperty(value = "收款日期")
     @ExcelProperty(value = "收款日期")
     private String receivePaymentDate;
     private String receivePaymentDate;

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/FollowInvoiceAndSettlementVo.java

@@ -34,6 +34,12 @@ public class FollowInvoiceAndSettlementVo {
     @Schema(description = "差额原因")
     @Schema(description = "差额原因")
     private String paymentReason;
     private String paymentReason;
 
 
+    @Schema(description = "回款差额")
+    private BigDecimal settlementPaymentDifference;
+
+    @Schema(description = "回款原因")
+    private String settlementPaymentReason;
+
     @Schema(description = "附加id")
     @Schema(description = "附加id")
     private List<String> attachmentIds;
     private List<String> attachmentIds;
 }
 }

+ 14 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -3283,8 +3283,20 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                 action.setRemainSettlementAmount(remainSettlementAmount);
                 action.setRemainSettlementAmount(remainSettlementAmount);
                 action.setCompanyAllName(allCompanyHierarchyPaths.get(Objects.toString(action.getCompanyId(),"")));
                 action.setCompanyAllName(allCompanyHierarchyPaths.get(Objects.toString(action.getCompanyId(),"")));
                 action.setSettlementStatus(settlementStatusName);
                 action.setSettlementStatus(settlementStatusName);
-                // 开票金额
-                action.setReceivableAmount(action.getReceivableSupervisePremium().subtract(action.getOverinflatedAmount()).toString());
+                if ("2".equals(invoiceRecordQueryVo.getInvoiceType())) {
+                    LambdaQueryWrapper<InsFeeFollowOrder> insFeeFollowOrderLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                    insFeeFollowOrderLambdaQueryWrapper.eq(InsFeeFollowOrder::getYear, action.getYear());
+                    insFeeFollowOrderLambdaQueryWrapper.eq(InsFeeFollowOrder::getMonth, action.getMonth());
+                    insFeeFollowOrderLambdaQueryWrapper.eq(InsFeeFollowOrder::getPartnerCompanyId, action.getPartnerCompanyId());
+                    List<InsFeeFollowOrder> insFeeFollowOrders = insFeeFollowOrderMapper.selectList(insFeeFollowOrderLambdaQueryWrapper);
+                    if (CollUtil.isNotEmpty(insFeeFollowOrders)){
+                        InsFeeFollowOrder insFeeFollowOrder = insFeeFollowOrders.stream().findAny().get();
+                        // 开票金额
+                        action.setReceivableAmount(insFeeFollowOrder.getReceivablePremium().toString());
+                    }
+                }else if ("1".equals(invoiceRecordQueryVo.getInvoiceType())){
+                    action.setReceivableAmount(action.getReceivableSupervisePremium().subtract(action.getOverinflatedAmount()).toString());
+                }
             }).toList();
             }).toList();
             invoiceRecordList.setRecords(records);
             invoiceRecordList.setRecords(records);
         }
         }

+ 2 - 0
tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

@@ -728,6 +728,8 @@
         GROUP_CONCAT(DISTINCT ipii.invoice_type SEPARATOR ',') AS invoice_type,
         GROUP_CONCAT(DISTINCT ipii.invoice_type SEPARATOR ',') AS invoice_type,
         GROUP_CONCAT(DISTINCT ipii.invoice_party SEPARATOR ',') AS invoice_party,
         GROUP_CONCAT(DISTINCT ipii.invoice_party SEPARATOR ',') AS invoice_party,
         GROUP_CONCAT(DISTINCT ipii.tax_point SEPARATOR ',') AS tax_point,
         GROUP_CONCAT(DISTINCT ipii.tax_point SEPARATOR ',') AS tax_point,
+        GROUP_CONCAT(DISTINCT ipiis.settlement_payment_reason SEPARATOR ',') AS settlement_payment_reason,
+        MAX(ipiis.settlement_payment_difference) AS settlement_payment_difference,
         MAX(ipiis.actual_received_amount) AS actual_received_amount,
         MAX(ipiis.actual_received_amount) AS actual_received_amount,
         MAX(ipiis.receive_payment_date) AS receive_payment_date,
         MAX(ipiis.receive_payment_date) AS receive_payment_date,
         MAX(ipiis.create_by) AS create_by,
         MAX(ipiis.create_by) AS create_by,