|
|
@@ -1,13 +1,12 @@
|
|
|
package com.jzg.commons.entity.finance.vo.importimcome;
|
|
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
+
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.jzg.commons.entity.finance.po.InsPlyIncome;
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
import lombok.Data;
|
|
|
|
|
|
import java.io.Serial;
|
|
|
-import java.io.Serializable;
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* Excel 表格字段填充后的完整数据信息
|
|
|
@@ -15,184 +14,55 @@ import java.util.Objects;
|
|
|
* @date 2026/8/4 9:14
|
|
|
*/
|
|
|
@Data
|
|
|
-public class ImportContentExt implements Serializable {
|
|
|
+public class ImportContentExt extends ExcelContent4Platform {
|
|
|
@Serial
|
|
|
private static final long serialVersionUID = 8609830028190910294L;
|
|
|
|
|
|
- @Schema(description = "车牌号")
|
|
|
- private String licenseNo;
|
|
|
-
|
|
|
- @Schema(description = "交强险保单号")
|
|
|
- private String jqPolicyNo;
|
|
|
-
|
|
|
- @Schema(description = "商业险保单号")
|
|
|
- private String syPolicyNo;
|
|
|
-
|
|
|
- @Schema(description = "非车险保单号")
|
|
|
- private String jyPolicyNo;
|
|
|
-
|
|
|
- @Schema(description = "交强险手续费比例")
|
|
|
- private String jqSuperviseCostsProportion;
|
|
|
-
|
|
|
- @Schema(description = "交强险跟单费比例")
|
|
|
- private String jqOtherCostsProportion;
|
|
|
-
|
|
|
- @Schema(description = "商业险手续费比例")
|
|
|
- private String sySuperviseCostsProportion;
|
|
|
-
|
|
|
- @Schema(description = "商业险跟单费比例")
|
|
|
- private String syOtherCostsProportion;
|
|
|
-
|
|
|
-
|
|
|
- @Schema(description = "非车险手续费比例")
|
|
|
- private String jySuperviseCostsProportion;
|
|
|
-
|
|
|
- @Schema(description = "非车险跟单费比例")
|
|
|
- private String jyOtherCostsProportion;
|
|
|
-
|
|
|
-
|
|
|
- @Schema(description = "交强险入口比例")
|
|
|
- private String jqInletRatio;
|
|
|
-
|
|
|
- @Schema(description = "商业险入口比例")
|
|
|
- private String syInletRatio;
|
|
|
-
|
|
|
- @Schema(description = "非车险入口比例")
|
|
|
- private String jyInletRatio;
|
|
|
-
|
|
|
- @Schema(description = "选中类型")
|
|
|
- // 1 全部数据选中 2 选中部分数据
|
|
|
- private String selectedType;
|
|
|
-
|
|
|
@Schema(description = "订单号")
|
|
|
private String orderNo;
|
|
|
|
|
|
- @Schema(description = "id")
|
|
|
- private String id;
|
|
|
-
|
|
|
- @Schema(description = "签单时间")
|
|
|
- private String signingTime;
|
|
|
-
|
|
|
- @Schema(description = "协议类型")
|
|
|
- private String agreementType;
|
|
|
-
|
|
|
- @Schema(description = "险种名称")
|
|
|
- private String productName;
|
|
|
-
|
|
|
- @Schema(description = "被保险人姓名")
|
|
|
- private String insuredPerson;
|
|
|
+ @Schema(description = "保险机构")
|
|
|
+ private String parternerCompanyId;
|
|
|
|
|
|
- @Schema(description = "公司名称")
|
|
|
- private String companyName;
|
|
|
+ @Schema(description = "应收订单的ID")
|
|
|
+ private String incomeId;
|
|
|
|
|
|
@Schema(description = "对接人")
|
|
|
private String contactPerson;
|
|
|
|
|
|
- @Schema(description = "对接人手机号")
|
|
|
- private String contactPersonPhone;
|
|
|
-
|
|
|
- @Schema(description = "错误信息")
|
|
|
- private String errorMessage;
|
|
|
-
|
|
|
- @Schema(description = "协议Id")
|
|
|
- private String agreementId;
|
|
|
-
|
|
|
- @Schema(description = "协议名称")
|
|
|
- private String agreementName;
|
|
|
-
|
|
|
- @Schema(description = "租户代码")
|
|
|
- private String systemCode;
|
|
|
-
|
|
|
- @Schema(description = "保险机构")
|
|
|
- private String partnerCompanyId;
|
|
|
-
|
|
|
- @Schema(description = "交强保费")
|
|
|
- private String jqPremium;
|
|
|
-
|
|
|
- @Schema(description = "商业保费")
|
|
|
- private String syPremium;
|
|
|
+ @Schema(description = "应收订单")
|
|
|
+ private InsPlyIncome insPlyIncome;
|
|
|
|
|
|
- @Schema(description = "驾意保费")
|
|
|
- private String jyPremium;
|
|
|
+ // 20 表示平台协议 11表示车险手续费 12 表示非车险手续费
|
|
|
+ @Schema(description = "类型")
|
|
|
+ private String type;
|
|
|
|
|
|
public ImportResultVo checkEmpty(){
|
|
|
- ImportResultVo resultVo = new ImportResultVo();
|
|
|
- resultVo.setSuccess(false);
|
|
|
- // 基础必填字段校验
|
|
|
- if (StrUtil.isBlank(this.getSigningTime())) {
|
|
|
- resultVo.getMessage().add("签单时间不能为空");
|
|
|
- }
|
|
|
- if (StrUtil.isBlank(this.getOrderNo())) {
|
|
|
- resultVo.getMessage().add("订单号不能为空");
|
|
|
- }
|
|
|
- if (StrUtil.isBlank(this.getLicenseNo())) {
|
|
|
- resultVo.getMessage().add("车牌号不能为空");
|
|
|
- }
|
|
|
- if (StrUtil.isBlank(this.getProductName())) {
|
|
|
- resultVo.getMessage().add("险种名称不能为空");
|
|
|
+ ImportResultVo vo = new ImportResultVo();
|
|
|
+ if(StrUtil.isEmpty(this.orderNo)){
|
|
|
+ vo.addMessage(String.format("订单不存在,车牌号是[%s]",this.getLicenseNo()));
|
|
|
+ return vo;
|
|
|
}
|
|
|
-// if (StrUtil.isBlank(this.getInsuredPerson())) {
|
|
|
-// resultVo.getMessage().add("被保险人姓名不能为空");
|
|
|
-// }
|
|
|
- if (StrUtil.isBlank(this.getAgreementType())) {
|
|
|
- resultVo.getMessage().add("协议类型不能为空");
|
|
|
+ if (StrUtil.isEmpty(this.incomeId)) {
|
|
|
+ vo.addMessage(String.format("订单没有进入应收,车牌号是[%s]",this.getLicenseNo()));
|
|
|
+ return vo;
|
|
|
}
|
|
|
-// if (StrUtil.isBlank(this.getContactPerson())) {
|
|
|
-// resultVo.getMessage().add("对接人不能为空");
|
|
|
-// }
|
|
|
-// if (StrUtil.isBlank(this.getAgreementType())) {
|
|
|
-// resultVo.getMessage().add("对接人手机号不能为空");
|
|
|
-// }
|
|
|
-
|
|
|
- // 交强险:有保单号 → 手续费、跟单费必填
|
|
|
-// if (StrUtil.isNotBlank(this.getJqPolicyNo())
|
|
|
-// || StrUtil.isNotBlank(this.getJqSuperviseCostsProportion())
|
|
|
-// || StrUtil.isNotBlank(this.getJqOtherCostsProportion())) {
|
|
|
-// if (StrUtil.isBlank(this.getJqPolicyNo())) {
|
|
|
-// resultVo.getMessage().add("交强险保单号不能为空");
|
|
|
-// }
|
|
|
-// if (StrUtil.isBlank(this.getJqSuperviseCostsProportion())) {
|
|
|
-// resultVo.getMessage().add("交强险手续费比例不能为空");
|
|
|
-// }
|
|
|
-// if (StrUtil.isBlank(this.getJqOtherCostsProportion())) {
|
|
|
-// resultVo.getMessage().add("交强险跟单费比例不能为空");
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- // 商业险:有保单号 → 手续费、跟单费必填
|
|
|
-// if (StrUtil.isNotBlank(this.getSyPolicyNo())
|
|
|
-// || StrUtil.isNotBlank(this.getSySuperviseCostsProportion())
|
|
|
-// || StrUtil.isNotBlank(this.getSyOtherCostsProportion())) {
|
|
|
-// if (StrUtil.isBlank(this.getJqPolicyNo())) {
|
|
|
-// resultVo.getMessage().add("商业险保单号不能为空");
|
|
|
-// }
|
|
|
-// if (StrUtil.isBlank(this.getSySuperviseCostsProportion())) {
|
|
|
-// resultVo.getMessage().add("商业险手续费比例不能为空");
|
|
|
-// }
|
|
|
-// if (StrUtil.isBlank(this.getSyOtherCostsProportion())) {
|
|
|
-// resultVo.getMessage().add("商业险跟单费比例不能为空");
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- // 非车险:有保单号 → 手续费、跟单费必填
|
|
|
- if (StrUtil.isNotBlank(this.getJyPolicyNo())
|
|
|
- || StrUtil.isNotBlank(this.getJySuperviseCostsProportion())
|
|
|
- || StrUtil.isNotBlank(this.getJyOtherCostsProportion())) {
|
|
|
- if (StrUtil.isBlank(this.getJqPolicyNo())) {
|
|
|
- resultVo.getMessage().add("非车险保单号不能为空");
|
|
|
- }
|
|
|
- if (StrUtil.isBlank(this.getJySuperviseCostsProportion())) {
|
|
|
- resultVo.getMessage().add("非车险手续费比例不能为空");
|
|
|
- }
|
|
|
- if (StrUtil.isBlank(this.getJyOtherCostsProportion())) {
|
|
|
- resultVo.getMessage().add("非车险跟单费比例不能为空");
|
|
|
- }
|
|
|
+ if(this.insPlyIncome == null){
|
|
|
+ vo.addMessage(String.format("根据订单号没有匹配到应收数据. 车牌号是[%s],订单号是[%s]",this.getLicenseNo(),this.getOrderNo()));
|
|
|
+ return vo;
|
|
|
}
|
|
|
|
|
|
- if(CollUtil.isEmpty(resultVo.getMessage())){
|
|
|
- resultVo.setSuccess(true);
|
|
|
+ // TODO 校验手续费比例等信息表格里面的和数据库 ins_ply_income 里面是否一致
|
|
|
+ if("11".equals(this.type)){
|
|
|
+
|
|
|
+ }else if("20".equals(this.type)){
|
|
|
+
|
|
|
+ }else if ("12".equals(this.type)) {
|
|
|
+
|
|
|
+ }else{
|
|
|
+
|
|
|
}
|
|
|
- return resultVo;
|
|
|
+ return vo;
|
|
|
}
|
|
|
|
|
|
}
|