Эх сурвалжийг харах

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

jiakai 2 сар өмнө
parent
commit
38d6a28133
14 өөрчлөгдсөн 62 нэмэгдсэн , 23 устгасан
  1. 4 0
      commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountChangeLog.java
  2. 3 0
      commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementReportQueryVo.java
  3. 1 0
      commons/src/main/java/com/jzg/commons/service/impl/OperatorTrajectoryServiceImpl.java
  4. 14 0
      commons/src/main/java/com/jzg/quotation/commons/constant/SpElMapping.java
  5. 0 1
      commons/src/main/java/com/jzg/quotation/commons/utils/SpElFieldExtractor.java
  6. 1 1
      commons/src/main/java/com/jzg/quotation/summary/aop/aspect/OrderOperationLog.java
  7. 2 0
      commons/src/main/java/com/jzg/quotation/summary/constants/QuoteNumberConstant.java
  8. 9 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsFeeAuditController.java
  9. 1 3
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsOrderAdjustController.java
  10. 1 1
      tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java
  11. 10 0
      tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java
  12. 1 1
      tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserAccountIncomeLogMapper.java
  13. 14 14
      tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java
  14. 1 1
      tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

+ 4 - 0
commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountChangeLog.java

@@ -47,6 +47,10 @@ public class SysUserAccountChangeLog extends BaseModel {
     @Schema(description = "jzg_info表的序号")
     private String jzgInfoId;
 
+    @ExcelProperty("车牌号")
+    @Schema(description = "车牌号")
+    private String licenseNo;
+
     @ExcelProperty("操作前金额")
     @Schema(description = "操作前金额")
     private BigDecimal amountBefore;

+ 3 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementReportQueryVo.java

@@ -13,6 +13,9 @@ import java.util.List;
 
 @Data
 public class SettlementReportQueryVo extends PageRequest {
+    @Schema(description = "应收项/10车险20非车险30全部")
+    private String accountsReceivable;
+
     @Schema(description = "保险公司id")
     private String companyId;
 

+ 1 - 0
commons/src/main/java/com/jzg/commons/service/impl/OperatorTrajectoryServiceImpl.java

@@ -66,6 +66,7 @@ public class OperatorTrajectoryServiceImpl implements OperatorTrajectoryService
         lambdaQueryWrapper.like(StringUtils.isNotEmpty(logParam.getOperator()),OperatorTrajectory::getCreateBy,logParam.getOperator());
         lambdaQueryWrapper.like(StringUtils.isNotEmpty(logParam.getFunction()),OperatorTrajectory::getModuleName,logParam.getFunction());
         lambdaQueryWrapper.like(StringUtils.isNotEmpty(logParam.getContent()),OperatorTrajectory::getOperationContent,logParam.getContent());
+        lambdaQueryWrapper.orderByDesc(OperatorTrajectory::getCreateTime);
         if (CollectionUtils.isNotEmpty(logParam.getOperatingTime())) {
             List<LocalDate> dates = logParam.getOperatingTime();
             if (dates.size() >= 2) {

+ 14 - 0
commons/src/main/java/com/jzg/quotation/commons/constant/SpElMapping.java

@@ -0,0 +1,14 @@
+package com.jzg.quotation.commons.constant;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class SpElMapping {
+
+    private String fieldName;   // 最终生成日志的字段名,如 "orderId"
+    private String spel;        // SpEL 表达式,如 "#ret.data.orderId"
+}

+ 0 - 1
tenant/insurance/quotation-commons/src/main/java/com/jzg/quotation/commons/utils/SpElFieldExtractor.java → commons/src/main/java/com/jzg/quotation/commons/utils/SpElFieldExtractor.java

@@ -1,6 +1,5 @@
 package com.jzg.quotation.commons.utils;
 
-import com.alibaba.fastjson2.JSON;
 import com.jzg.quotation.commons.constant.SpElMapping;
 import org.springframework.expression.EvaluationContext;
 import org.springframework.expression.ExpressionParser;

+ 1 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/OrderOperationLog.java → commons/src/main/java/com/jzg/quotation/summary/aop/aspect/OrderOperationLog.java

@@ -1,4 +1,4 @@
-package com.jzg.quotation.summary.aop;
+package com.jzg.quotation.summary.aop.aspect;
 
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 

+ 2 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/constants/QuoteNumberConstant.java → commons/src/main/java/com/jzg/quotation/summary/constants/QuoteNumberConstant.java

@@ -93,6 +93,8 @@ public class QuoteNumberConstant {
         OPT_TYPE_12(12,"批改审核"),
         OPT_TYPE_13(13,"撤销批改"),
         OPT_TYPE_14(14,"订单审核"),
+        OPT_TYPE_15(15,"费用调整"),
+        OPT_TYPE_16(16,"批量修改比例"),
         ;
         private Integer code;
         private String desc;

+ 9 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsFeeAuditController.java

@@ -12,7 +12,7 @@ import com.jzg.commons.entity.orders.vo.AuditCostInfoVo;
 import com.jzg.commons.entity.orders.vo.FeeAuditVo;
 import com.jzg.commons.entity.quote.vo.aggregated.QuoteEchoVo;
 import com.jzg.commons.entity.vo.PtlAgreementCostRatioVo;
-import com.jzg.quotation.summary.aop.OrderOperationLog;
+import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 import com.jzg.quotation.summary.service.InsFeeAuditService;
 import io.swagger.v3.oas.annotations.Operation;
@@ -184,6 +184,14 @@ public class InsFeeAuditController {
      * 保存调整的费用
      * @return HttpResult<String>
      */
+    @OrderOperationLog(
+            module = "订单审核",
+            subModule = "我的审核",
+            optType = QuoteNumberConstant.QuoteOptType.OPT_TYPE_15,
+            description = "费用调整",
+            orderSpEl = "#quoteVo",
+            feedbackSpEl = "#ret.code + ' - ' + #ret.msg+ ' - ' + #ret.data"
+    )
     @PostMapping("/saveCostInfo")
     @Operation(summary = "保存调整的费用")
     public HttpResult<String> saveCostInfo(@RequestBody PtlAgreementCostRatioVo param){

+ 1 - 3
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/InsOrderAdjustController.java

@@ -8,15 +8,13 @@ import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.dto.*;
 import com.jzg.commons.entity.orders.po.InsOrderAdjust;
-import com.jzg.commons.entity.orders.po.InsOrderAdjustInfo;
 import com.jzg.commons.entity.orders.po.InsOrders;
-import com.jzg.commons.entity.vo.AdjustAllRefundInfoVo;
 import com.jzg.commons.entity.vo.AdjustAllRefundVo;
 import com.jzg.commons.entity.vo.OrderAdjustVo;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.commons.util.EasyExcelUtils;
 import com.jzg.commons.util.ServletUtils;
-import com.jzg.quotation.summary.aop.OrderOperationLog;
+import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 import com.jzg.quotation.summary.service.InsOrderAdjustInfoService;
 import com.jzg.quotation.summary.service.InsOrderAdjustService;

+ 1 - 1
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/controller/UnifyOrderManager.java

@@ -46,7 +46,7 @@ import com.jzg.quotation.commons.service.QuotationCrawlerBaseService;
 import com.jzg.quotation.commons.utils.SnowFlakeUtil;
 import com.jzg.quotation.guoren.crawler.service.GuoRenCrawlerRequest;
 import com.jzg.quotation.summary.aop.AuditVerification;
-import com.jzg.quotation.summary.aop.OrderOperationLog;
+import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
 import com.jzg.quotation.summary.aop.QuoteVerification;
 import com.jzg.quotation.summary.async.AsyncGetPayLink;
 import com.jzg.quotation.summary.classifier.QuoteInfoParameterFilling;

+ 10 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java

@@ -15,6 +15,8 @@ import com.jzg.commons.entity.orders.po.InsOrderAdjust;
 import com.jzg.commons.request.RequestSingleParam;
 import com.jzg.commons.util.AssertionUtils;
 import com.jzg.organization.service.ReceivableService;
+import com.jzg.quotation.summary.aop.aspect.OrderOperationLog;
+import com.jzg.quotation.summary.constants.QuoteNumberConstant;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.slf4j.Logger;
@@ -542,6 +544,14 @@ public class ReceivableController {
      * @author lipf
      * @date 2026/5/27 20:25
      */
+    @OrderOperationLog(
+            module = "私有协议应收",
+            subModule = "订单审核",
+            optType = QuoteNumberConstant.QuoteOptType.OPT_TYPE_16,
+            description = "费用调整",
+            orderSpEl = "#quoteVo",
+            feedbackSpEl = "#ret.code + ' - ' + #ret.msg+ ' - ' + #ret.data"
+    )
     @PostMapping("batchModify")
     @Operation(summary = "批量修改")
     public HttpResult<String> batchModify(@RequestBody BatchModifyVo batchModifyVo){

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserAccountIncomeLogMapper.java

@@ -20,6 +20,6 @@ public interface SysUserAccountIncomeLogMapper extends BaseMapper<SysUserAccount
      * @author lipf
      * @date 2026/6/8 17:25
      */
-    @Select("select * from sys_user_account_change_log a where a.user_id = #{ywyUserId} and a.create_time >= #{beginDate} and a.create_time < #{endDate} and a.is_delete = 0 order by a.create_time desc")
+    @Select("select ioci.license_no , a.* from sys_user_account_change_log a  left join ins_orders_car_info ioci on a.related_order_id = ioci.order_no where a.user_id = #{ywyUserId} and a.create_time >= #{beginDate} and a.create_time < #{endDate} and a.is_delete = 0 order by a.create_time desc")
     List<SysUserAccountChangeLog> queryYwyIORecs(String ywyUserId, LocalDate beginDate, LocalDate endDate);
 }

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

@@ -5425,18 +5425,18 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(1, 3), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType());
         Map<String, BigDecimal> sxfInvoicedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
         Map<String, BigDecimal> sxfOverinflatedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getOverinflatedAmount, (o1,o2)->o1));
-        calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(2, 4), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType());
-        Map<String, BigDecimal> gdfInvoicedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
+//        calRes = baseMapper.queryInvoicedAmount(systemCode, List.of(2, 4), queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType());
+//        Map<String, BigDecimal> gdfInvoicedAmountMap = calRes.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getAmount, (o1,o2)->o1));
 
         // 结算费用 
         List<CalRes> sxfList = baseMapper.querySettledAmount(systemCode, queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType(), CollUtil.newArrayList("1", "3"));
-        List<CalRes> gdfList = baseMapper.querySettledAmount(systemCode, queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType(), CollUtil.newArrayList("2", "4"));
+        // List<CalRes> gdfList = baseMapper.querySettledAmount(systemCode, queryVo.getInvoiceStartTime(), queryVo.getInvoiceEndTime(), queryVo.getAgreementType(), CollUtil.newArrayList("2", "4"));
         Map<String, BigDecimal> sxfSettledAmountMap = CollUtil.isNotEmpty(sxfList) ? sxfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getSettlement, (o1,o2)->o1)) : new HashMap<>();
         // 手续费的回款差额汇总
         Map<String, BigDecimal> sxfSettledDiffAmountMap = CollUtil.isNotEmpty(sxfList) ? sxfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getOverinflatedAmount, (o1,o2)->o1)) : new HashMap<>();
-        Map<String, BigDecimal> gdfSettledAmountMap = CollUtil.isNotEmpty(gdfList) ? gdfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getSettlement, (o1,o2)->o1)) : new HashMap<>();
+        //Map<String, BigDecimal> gdfSettledAmountMap = CollUtil.isNotEmpty(gdfList) ? gdfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getSettlement, (o1,o2)->o1)) : new HashMap<>();
         // 跟单费的回款差额汇总
-        Map<String, BigDecimal> gdfSettledDiffAmountMap = CollUtil.isNotEmpty(gdfList) ? gdfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getOverinflatedAmount, (o1,o2)->o1)) : new HashMap<>();
+        //Map<String, BigDecimal> gdfSettledDiffAmountMap = CollUtil.isNotEmpty(gdfList) ? gdfList.stream().collect(Collectors.toMap(CalRes::getCompanyId, CalRes::getOverinflatedAmount, (o1,o2)->o1)) : new HashMap<>();
 
         // 计算已开票和未开票
         for (String companyId : companyMap.keySet()) {
@@ -5446,37 +5446,37 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             companySuperviseSettlementReportDto.setSxfInvoicedAmount(Objects.toString(sxf,BigDecimal.ZERO+""));
             BigDecimal sxfOverinflatedAmount = sxfOverinflatedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
             companySuperviseSettlementReportDto.setTotalOverinflatedAmount(Objects.toString(sxfOverinflatedAmount,BigDecimal.ZERO+""));
-            BigDecimal gdf = gdfInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
-            companySuperviseSettlementReportDto.setGdfInvoicedAmount(Objects.toString(gdf,BigDecimal.ZERO+""));
+//            BigDecimal gdf = gdfInvoicedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
+            //companySuperviseSettlementReportDto.setGdfInvoicedAmount(Objects.toString(gdf,BigDecimal.ZERO+""));
             // 平台就没有未结算的,只要结算就是已结算的
             companySuperviseSettlementReportDto.setPtInvoicedAmount(companySuperviseSettlementReportDto.getTotalReceivable());
 
             CompanySuperviseSettlementReportDto dto;
             dto = companyMap.get(companyId);
             companySuperviseSettlementReportDto.setSxfUnInvoicedAmount(BigDecimalUtil.subtract(new BigDecimal(dto.getSuperviseFee()),BigDecimalUtil.subtract(sxf, new BigDecimal(dto.getTotalOverinflatedAmount()))).toString());
-            companySuperviseSettlementReportDto.setGdfUnInvoicedAmount(BigDecimalUtil.subtract(new BigDecimal(dto.getFollowFee()),BigDecimalUtil.subtract(gdf,new BigDecimal(dto.getTotalOverinflatedAmount()))).toString());
+            //companySuperviseSettlementReportDto.setGdfUnInvoicedAmount(BigDecimalUtil.subtract(new BigDecimal(dto.getFollowFee()),BigDecimalUtil.subtract(gdf,new BigDecimal(dto.getTotalOverinflatedAmount()))).toString());
             companySuperviseSettlementReportDto.setPtUnInvoicedAmount(BigDecimal.ZERO.toString());
 
             BigDecimal sxfS = sxfSettledAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
-            BigDecimal gdfS = gdfSettledAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
+            //BigDecimal gdfS = gdfSettledAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
             BigDecimal overinflatedAmount = sxfOverinflatedAmountMap.getOrDefault(companyId, BigDecimal.ZERO);
             companySuperviseSettlementReportDto.setSxfSettledAmount(Objects.toString(sxfS, BigDecimal.ZERO+""));
             companySuperviseSettlementReportDto.setSxfUnSettledAmount(BigDecimalUtil.subtract(sxf,BigDecimalUtil.add(sxfS,sxfSettledDiffAmountMap.getOrDefault(companyId, BigDecimal.ZERO))).toString());
             companySuperviseSettlementReportDto.setTotalOverinflatedAmount(Objects.toString(overinflatedAmount, BigDecimal.ZERO+""));
             companySuperviseSettlementReportDto.setSettlementPaymentDifference(Objects.toString(sxfSettledDiffAmountMap.getOrDefault(companyId, BigDecimal.ZERO)) );
 
-            companySuperviseSettlementReportDto.setGdfSettledAmount(Objects.toString(gdfS, BigDecimal.ZERO+""));
-            companySuperviseSettlementReportDto.setGdfUnSettledAmount(BigDecimalUtil.subtract(gdf,gdfS).toString());
+            //companySuperviseSettlementReportDto.setGdfSettledAmount(Objects.toString(gdfS, BigDecimal.ZERO+""));
+            //companySuperviseSettlementReportDto.setGdfUnSettledAmount(BigDecimalUtil.subtract(gdf,gdfS).toString());
 
             // 当起始日期有值的时候,计算的没有意义
             if(StrUtil.isNotEmpty(queryVo.getInvoiceStartTime())){
                 companySuperviseSettlementReportDto.setSxfUnInvoicedAmount("-");
-                companySuperviseSettlementReportDto.setGdfUnInvoicedAmount("-");
+                //companySuperviseSettlementReportDto.setGdfUnInvoicedAmount("-");
                 companySuperviseSettlementReportDto.setPtUnInvoicedAmount("-");
             }
             if(StrUtil.isNotEmpty(queryVo.getSettlementStartTime())){
                 companySuperviseSettlementReportDto.setSxfUnSettledAmount("-");
-                companySuperviseSettlementReportDto.setGdfUnSettledAmount("-");
+                // companySuperviseSettlementReportDto.setGdfUnSettledAmount("-");
             }
         }
         return new ArrayList<>(companyMap.values().stream().toList());
@@ -5726,7 +5726,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                     InsPlyIncomeInvoiceSettlementVo insPlyIncomeInvoiceSettlementVo = baseMapper.querySettledAmountByInvoiceIds(invoiceIdList);
                     action.setSettledAmount(Objects.toString(insPlyIncomeInvoiceSettlementVo.getActualReceivedAmount(),"0"));
                     action.setTotalPaymentDifference(insPlyIncomeInvoiceSettlementVo.getSettlementPaymentDifference());
-                    action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),insPlyIncomeInvoiceSettlementVo.getActualReceivedAmount()).toString());
+                    action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),BigDecimalUtil.subtract(insPlyIncomeInvoiceSettlementVo.getActualReceivedAmount(),insPlyIncomeInvoiceSettlementVo.getSettlementPaymentDifference())).toString());
                 }else{
                     action.setSettledAmount("0");
                     action.setUnSettledAmount(BigDecimalUtil.subtract(new BigDecimal(action.getTotalReceivable()),BigDecimal.ZERO).toString());

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

@@ -665,7 +665,7 @@
         MAX(ipiis.actual_received_amount) AS actual_received_amount,
         MAX(ipiis.receive_payment_date) AS receive_payment_date,
         MAX(ipiis.create_by) AS create_by,
-        MAX(ipiis.create_time) AS create_time
+        MAX(ipiis.create_time) AS create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason, ipii.receivable_supervise_premium
         FROM ins_ply_income_invoice_settlement ipiis
         LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
         LEFT JOIN ins_ply_income_invoice_link ipil ON ipil.invoice_id = ipiis.invoice_id AND ipil.is_delete = 0