Просмотр исходного кода

提交平安驾意险接口修改
提交统计应收数据统计接口

hxl13994548489 2 лет назад
Родитель
Сommit
9983677350

+ 7 - 0
src/main/java/com/ydtech/modules/admin/controller/financialReceivables/FinancialReceivablesController.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.admin.controller.financialReceivables;
 
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesAllVo;
+import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesQueryMonthVo;
 import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesQueryVo;
 import com.ydtech.modules.fnc.service.InsPlyIncomeService;
 import com.ydtech.modules.fnc.vo.InsPlyIncomeVo;
@@ -45,6 +46,12 @@ public class FinancialReceivablesController {
         return HttpResult.ok(insPlyIncomeService.queryDateByType(financialReceivablesQueryVo));
     }
 
+
+    @PostMapping("/queryDateByType")
+    @ApiModelProperty(value = "获取平台私有数据列表")
+    public HttpResult<FinancialReceivablesAllVo> queryDateByTypeByMonth(@RequestBody FinancialReceivablesQueryMonthVo financialReceivablesQueryVo) {
+        return HttpResult.ok(insPlyIncomeService.queryDateByTypeByMonth(financialReceivablesQueryVo));
+    }
     /**
      *
      * @param insPlyIncomeVo

+ 46 - 0
src/main/java/com/ydtech/modules/admin/model/report/financialReceivables/FinancialReceivablesAllMonthVo.java

@@ -0,0 +1,46 @@
+package com.ydtech.modules.admin.model.report.financialReceivables;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *  @version 
+ *  @author: hxl
+ *  @Date: 2024/8/1 9:20
+ *  @Description:   应收出参
+ */
+@Data
+@ApiModel("应收月份查询参数")
+public class FinancialReceivablesAllMonthVo {
+
+    @ApiModelProperty("年份")
+    private  String  yearAndMonth;
+
+    @ApiModelProperty("应收金额")
+    private  String  ysSumAmount;
+
+    @ApiModelProperty("已收金额")
+    private  String  yisSumAmount;
+
+    @ApiModelProperty("未收金额")
+    private  String  wsSumAmount;
+
+    @ApiModelProperty("数据列表")
+    private List<FinancialReceivablesMonthVo> list =new ArrayList<>();
+
+    public FinancialReceivablesAllMonthVo() {
+    }
+
+    public FinancialReceivablesAllMonthVo(String ysSumAmount, String  yisSumAmount,String  wsSumAmount,  String yearAndMonth, List<FinancialReceivablesMonthVo> list) {
+        this.ysSumAmount = ysSumAmount;
+        this.yisSumAmount = yisSumAmount;
+        this.wsSumAmount = wsSumAmount;
+        this.yearAndMonth = yearAndMonth;
+        this.list = list;
+    }
+}

+ 42 - 0
src/main/java/com/ydtech/modules/admin/model/report/financialReceivables/FinancialReceivablesMonthVo.java

@@ -0,0 +1,42 @@
+package com.ydtech.modules.admin.model.report.financialReceivables;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ *  @version 
+ *  @author: hxl
+ *  @Date: 2024/8/1 9:20
+ *  @Description:   应收出参
+ */
+@Data
+@ApiModel("应收月份返回参数")
+public class FinancialReceivablesMonthVo {
+
+    @ApiModelProperty("年份")
+    private  String  yearAndMonth;
+
+    @ApiModelProperty("公司名称")
+    private  String  companyName;
+
+    @ApiModelProperty("地区名称")
+    private  String  areaName;
+
+    @ApiModelProperty("应收")
+    private String  commissionFeevalue;
+
+    @ApiModelProperty("已收")
+    private String  noInvoicCommissionFeevalue;
+
+    @ApiModelProperty("未收")
+    private String  readyCommissionFeevalue;
+
+    @ApiModelProperty("开票未结算")
+    private String  settlementAmount;
+
+    @ApiModelProperty("未开票金额")
+    private String  noSettlementAmount;
+
+}

+ 29 - 0
src/main/java/com/ydtech/modules/admin/model/report/financialReceivables/FinancialReceivablesQueryMonthVo.java

@@ -0,0 +1,29 @@
+package com.ydtech.modules.admin.model.report.financialReceivables;
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ *  @version 
+ *  @author: hxl
+ *  @Date: 2024/8/1 9:20
+ *  @Description:   应收出参
+ */
+@Data
+@ApiModel("应收查询参数")
+public class FinancialReceivablesQueryMonthVo {
+
+    @ApiModelProperty("年份+月份  yyyy-mm")
+    private  String  yearAndMonth;
+
+    @ApiModelProperty("类型 1.平台  2.私有  默认是1 必传")
+    private String  type;
+
+    @ApiModelProperty("前台不需要传递后台使用")
+    private String beginDate;
+
+    @ApiModelProperty("前台不需要传递后台使用")
+    private String endDate;
+}

+ 1 - 1
src/main/java/com/ydtech/modules/admin/model/report/financialReceivables/FinancialReceivablesVo.java

@@ -12,7 +12,7 @@ import lombok.Data;
  *  @Description:   应收出参
  */
 @Data
-@ApiModel("应收查询参数")
+@ApiModel("应收返回参数")
 public class FinancialReceivablesVo {
 
     @ApiModelProperty("年份")

+ 8 - 0
src/main/java/com/ydtech/modules/fnc/service/InsPlyIncomeService.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.fnc.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesAllVo;
+import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesQueryMonthVo;
 import com.ydtech.modules.admin.model.report.financialReceivables.FinancialReceivablesQueryVo;
 import com.ydtech.modules.fnc.dto.PlatformSettlementRecordDto;
 import com.ydtech.modules.fnc.entity.InsAreaCompany;
@@ -186,4 +187,11 @@ public interface InsPlyIncomeService extends IService<InsPlyIncome> {
      *  @Description:  获取平台、私有协议数据
      */
     FinancialReceivablesAllVo queryDateByType(FinancialReceivablesQueryVo financialReceivablesQueryVo);
+    /**
+     *  @version 
+     *  @author: hxl
+     *  @Date: 2024/8/5 9:43
+     *  @Description:
+     */ 
+    FinancialReceivablesAllVo queryDateByTypeByMonth(FinancialReceivablesQueryMonthVo financialReceivablesQueryVo);
 }

+ 1 - 2
src/main/java/com/ydtech/modules/order/aop/aspect/QuoteVerificationAspect.java

@@ -7,7 +7,6 @@ import com.ydtech.constants.enums.dict.InsOrderStatusEnum;
 import com.ydtech.constants.enums.dict.agreement.ProductsType;
 import com.ydtech.constants.sys.SystemConstant;
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.admin.model.SysUserRole;
 import com.ydtech.modules.admin.service.SysUserRoleService;
@@ -174,7 +173,7 @@ public class QuoteVerificationAspect {
                     for(InsAreaCompany subOrder : insAreaList){
                         PtlAgreement ptlAgreement = ptlAgreementService.getById(subOrder.getAgreementId());
                         if(ptlAgreement!=null && ptlAgreement.getIsExternal()!=null && ptlAgreement.getIsExternal()==1){
-                            throw new SystemException("外部订单不允许报价,请到外部订单编辑页面进行编辑!!");
+                           // throw new SystemException("外部订单不允许报价,请到外部订单编辑页面进行编辑!!");
                         }
                     }
                 }

+ 2 - 0
src/main/java/com/ydtech/modules/order/components/pingan/PinganRequestApiComponents.java

@@ -269,6 +269,8 @@ public class PinganRequestApiComponents {
             InsuranceLog.infoLog(InsuranceEnum.PAIC.getPinyin(), "\n\t---------> {} \n\t---------> 返回数据:{}", requestUrl.getCode() + "--" + url + "--" + requestUrl.getDesc(), sm4DecodeResult);
             SignEleApplyResponse signEleApplyResponse =new  SignEleApplyResponse();
             signEleApplyResponse.setResultMessage(sm4DecodeResult);
+            pinganApiLog.setResponseBody(sm4DecodeResult);
+            pinganApiLogService.save(pinganApiLog);
             return (S)signEleApplyResponse;
         }else{
             CommonResponse obj = JSON.parseObject(responseBody).toJavaObject(CommonResponse.class);

+ 8 - 4
src/main/java/com/ydtech/modules/order/controller/DrivingInsuranceController.java

@@ -2,11 +2,7 @@ package com.ydtech.modules.order.controller;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.core.page.PageRequest;
 import com.ydtech.modules.base.controller.BaseController;
-import com.ydtech.modules.ins.model.guoren.CarModelResp;
-import com.ydtech.modules.ins.model.vo.CarInfoVo;
-import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
 import com.ydtech.modules.order.entity.PtlAgreementNonCarProductRule;
 import com.ydtech.modules.order.entity.vo.DrivingInsuranceQueryVo;
 import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
@@ -23,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 @Api(tags = "驾意险 API")
 @RestController
@@ -95,4 +92,11 @@ public class DrivingInsuranceController extends BaseController {
         List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVo = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceRule(insuranceQueryVo);
         return HttpResult.ok(insDrivingIntentionInsuranceVo);
     }
+
+    @ApiOperation(value = "根据规则获取平安驾意险信息")
+    @PostMapping(value = "getPingAnDrivingInsuranceRule")
+    public HttpResult<Map<String,List<InsDrivingIntentionInsuranceVo>>> getPingAnDrivingInsuranceRule(@RequestBody NoCarInsuranceQueryVo insuranceQueryVo) {
+        Map<String,List<InsDrivingIntentionInsuranceVo>> insDrivingIntentionInsuranceVo = insDrivingIntentionInsuranceService.getPingAnDrivingInsuranceRule(insuranceQueryVo);
+        return HttpResult.ok(insDrivingIntentionInsuranceVo);
+    }
 }

+ 8 - 1
src/main/java/com/ydtech/modules/order/service/InsDrivingIntentionInsuranceService.java

@@ -1,13 +1,13 @@
 package com.ydtech.modules.order.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.ydtech.modules.order.entity.InsCopyFeeOrder;
 import com.ydtech.modules.order.entity.InsDrivingIntentionInsurance;
 import com.ydtech.modules.order.entity.InsDrivingIntentionInsuranceSon;
 import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
 import com.ydtech.modules.order.entity.vo.NoCarInsuranceQueryVo;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 针对表【ins_driving_intention_insurance(驾意险)】的数据库操作Service
@@ -45,4 +45,11 @@ public interface InsDrivingIntentionInsuranceService extends IService<InsDriving
      * @return
      */
     List<InsDrivingIntentionInsuranceSon> getInsDrivingIntentionInsuranceSon(String companyId,String drivingCodeId);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/5 8:34
+     *  @Description:  获取平安的驾意外险信息
+     */
+    Map<String, List<InsDrivingIntentionInsuranceVo>> getPingAnDrivingInsuranceRule(NoCarInsuranceQueryVo insuranceQueryVo);
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/service/PingAnOrderApiService.java

@@ -156,7 +156,7 @@ public interface PingAnOrderApiService {
      *  @Date: 2024/7/18 15:00
      *  @Description:  返回驾意险信息
      */
-    public List<InsDrivingIntentionInsuranceVo> productQueryList(ProductDetailsRequest productDetailsRequest);
+    public Map<String, List<InsDrivingIntentionInsuranceVo>> productQueryList(ProductDetailsRequest productDetailsRequest);
     /**
      *  @version
      *  @author: hxl

+ 24 - 6
src/main/java/com/ydtech/modules/order/service/impl/InsDrivingIntentionInsuranceServiceImpl.java

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -114,12 +115,12 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
         //判断是否是平安
         if("PAIC1000000".equals(ptlAgreement.getInsuranceCompanyId())){
             //调用接口返回数据
-            ProductDetailsRequest productDetailsRequest  =new ProductDetailsRequest(insuranceVo.getAgreementId(), insuranceVo.getRuleUseNature() ,
-                    insuranceVo.getOwnAttribute(), insuranceVo.getRuleSeatNum(), insuranceVo.getTonNumber(),
-                    insuranceVo.getIsUseCombine(), insuranceVo.getCimodelclass(),ptlAgreement.getInsuranceCompanyId());
-            List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVos = pingAnOrderApiService.productQueryList(productDetailsRequest);
-            return insDrivingIntentionInsuranceVos;
-
+          //  ProductDetailsRequest productDetailsRequest  =new ProductDetailsRequest(insuranceVo.getAgreementId(), insuranceVo.getRuleUseNature() ,
+          //          insuranceVo.getOwnAttribute(), insuranceVo.getRuleSeatNum(), insuranceVo.getTonNumber(),
+          //          insuranceVo.getIsUseCombine(), insuranceVo.getCimodelclass(),ptlAgreement.getInsuranceCompanyId());
+           // List<InsDrivingIntentionInsuranceVo> insDrivingIntentionInsuranceVos = pingAnOrderApiService.productQueryList(productDetailsRequest);
+           // return insDrivingIntentionInsuranceVos;
+            return null;
         }else{
             LambdaQueryWrapper<PtlAgreementNonCarProductRule> query = new LambdaQueryWrapper<PtlAgreementNonCarProductRule>();
             ProductsType productType = InsuranceRisk.determineInsuranceInformation(insuranceVo.getKind(), insuranceVo.getRisk());
@@ -192,4 +193,21 @@ public class InsDrivingIntentionInsuranceServiceImpl extends ServiceImpl<InsDriv
                         .eq(InsDrivingIntentionInsuranceSon::getDrivingCodeId, drivingCodeId)));
         return insDrivingIntentionInsuranceSons;
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/8/5 8:36
+     *  @Description:  获取平安驾意险信息
+     */
+    @Override
+    public Map<String, List<InsDrivingIntentionInsuranceVo>> getPingAnDrivingInsuranceRule(NoCarInsuranceQueryVo insuranceVo) {
+        // 添加平安的驾意险的险种信息   2024-07-18
+        PtlAgreement ptlAgreement = ptlAgreementService.getById(insuranceVo.getAgreementId());
+        //调用接口返回数据
+        ProductDetailsRequest productDetailsRequest = new ProductDetailsRequest(insuranceVo.getAgreementId(), insuranceVo.getRuleUseNature(),
+                insuranceVo.getOwnAttribute(), insuranceVo.getRuleSeatNum(), insuranceVo.getTonNumber(),
+                insuranceVo.getIsUseCombine(), insuranceVo.getCimodelclass(), ptlAgreement.getInsuranceCompanyId());
+        Map<String, List<InsDrivingIntentionInsuranceVo>> insDrivingIntentionInsuranceVos = pingAnOrderApiService.productQueryList(productDetailsRequest);
+        return insDrivingIntentionInsuranceVos;
+    }
 }

+ 15 - 7
src/main/java/com/ydtech/modules/order/service/impl/PingAnOrderApiServiceImpl.java

@@ -85,7 +85,7 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
 
     private final InsUploadFilesService insUploadFilesService;
 
-
+    private final PinganApiLogService   pinganApiLogService;
 
 
     /**
@@ -1122,7 +1122,8 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
      * @Date: 2024/7/18 14:45
      * @Description: 组合成驾意外险信息
      */
-    public List<InsDrivingIntentionInsuranceVo> productQueryList(ProductDetailsRequest productDetailsRequest) {
+    public  Map<String, List<InsDrivingIntentionInsuranceVo>> productQueryList(ProductDetailsRequest productDetailsRequest) {
+        Map<String, List<InsDrivingIntentionInsuranceVo>>  map=new HashMap<String, List<InsDrivingIntentionInsuranceVo>>();
         //参数验证
         if (StringUtils.isBlank(productDetailsRequest.getAgreementId())) {
             new SystemException("协议id不能为空!!");
@@ -1174,11 +1175,11 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             List<InsDrivingIntentionInsuranceVo> cyList = getCYAndXWList(unAutoListInfo, productDetailsRequest.getSeats(), productDetailsRequest.getCompanyId());
             List<InsDrivingIntentionInsuranceVo> xwList = getCYAndXWList(xiaoWeiListInfo, productDetailsRequest.getSeats(), productDetailsRequest.getCompanyId());
             List<InsDrivingIntentionInsuranceVo> zhList = getCHList(combinationInfoList, productDetailsRequest.getSeats(), productDetailsRequest.getCompanyId());
-            all.addAll(cyList);
-            all.addAll(xwList);
-            all.addAll(zhList);
+            map.put("1",cyList);
+            map.put("2",xwList);
+            map.put("3",zhList);
         }
-        return all;
+        return map;
     }
     /**
      *  @version
@@ -1553,6 +1554,13 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             String businessNo = payReturnRequest.getBusinessNo();
             InsAreaCompany insAreaCompany = insAreaCompanyService.getOne(new LambdaQueryWrapper<InsAreaCompany>()
                     .eq(InsAreaCompany::getNoticeNo, businessNo));
+            PinganApiLog pinganApiLog = new PinganApiLog(insAreaCompany.getOrderno(),insAreaCompany.getId(),insAreaCompany.getAgreementId());
+            pinganApiLog.setId(null);
+            pinganApiLog.setRequestUrl("/payReturn");
+            pinganApiLog.setRequestType("支付回调");
+            pinganApiLog.setRequestParam(payReturnRequest.toString());
+            pinganApiLog.setResponseBody(null);
+            pinganApiLogService.save(pinganApiLog);
             // 账号信息
             PtlAgreementAttribution ptlAgreementAttribution = ptlAgreementAttributionService.getById(insAreaCompany.getAgreementId());
             //查询单证状态
@@ -1567,7 +1575,7 @@ public class PingAnOrderApiServiceImpl implements PingAnOrderApiService {
             if (StringUtils.isNotBlank(forceApplyNo)) {
                 list.add(forceApplyNo);
             }
-            PinganApiLog pinganApiLog = new PinganApiLog(insAreaCompany.getOrderno(),insAreaCompany.getId(),insAreaCompany.getAgreementId());
+            pinganApiLog.setId(null);
             DocumentStatusListRequest documentStatusListRequest = new DocumentStatusListRequest(list, parameters);
             DocumentStatusListResponse documentStatusListResponse = null;
             try {