Bläddra i källkod

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

haoyu 2 år sedan
förälder
incheckning
e0ccec27f6
24 ändrade filer med 493 tillägg och 80 borttagningar
  1. 1 2
      src/main/java/com/ydtech/config/properties/BohaiApiConfigurationProperties.java
  2. 38 0
      src/main/java/com/ydtech/modules/admin/controller/SysUserAccountController.java
  3. 5 0
      src/main/java/com/ydtech/modules/admin/dao/SysUserAccountMapper.java
  4. 63 0
      src/main/java/com/ydtech/modules/admin/model/po/SysUserAccount.java
  5. 88 0
      src/main/java/com/ydtech/modules/admin/model/vo/SysUserAccountVo.java
  6. 3 0
      src/main/java/com/ydtech/modules/admin/service/SysUserAccountService.java
  7. 15 2
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java
  8. 9 0
      src/main/java/com/ydtech/modules/inv/controller/InvReceivableController.java
  9. 48 0
      src/main/java/com/ydtech/modules/inv/model/po/InvSettlementSource.java
  10. 13 0
      src/main/java/com/ydtech/modules/inv/model/po/InvSource.java
  11. 23 0
      src/main/java/com/ydtech/modules/inv/model/vo/InvSettlementSourceQueryVo.java
  12. 3 3
      src/main/java/com/ydtech/modules/inv/model/vo/InvSourceQueryVo.java
  13. 2 0
      src/main/java/com/ydtech/modules/inv/service/InvReceivableService.java
  14. 76 25
      src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java
  15. 8 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvSettlementSourceServiceImpl.java
  16. 1 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvSourceServiceImpl.java
  17. 2 4
      src/main/java/com/ydtech/modules/order/components/FileComponents.java
  18. 25 25
      src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java
  19. 0 2
      src/main/java/com/ydtech/modules/order/controller/BoHaiOrderApiController.java
  20. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/bohai/BoHaiEncrypted.java
  21. 12 12
      src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java
  22. 42 0
      src/main/resources/mapper/modules/admin/SysUserAccountMapper.xml
  23. 4 1
      src/main/resources/mapper/modules/inv/InvSettlementSourceMapper.xml
  24. 10 2
      src/main/resources/mapper/modules/inv/InvSourceMapper.xml

+ 1 - 2
src/main/java/com/ydtech/config/properties/BohaiApiConfigurationProperties.java

@@ -25,7 +25,6 @@ public class BohaiApiConfigurationProperties {
     // 合作方代码,由渤海分配
     private String insurerCode;
 
-    // 配置code
-    private String sysSourceCode;
+
 
 }

+ 38 - 0
src/main/java/com/ydtech/modules/admin/controller/SysUserAccountController.java

@@ -0,0 +1,38 @@
+package com.ydtech.modules.admin.controller;
+
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.po.SysUserAccount;
+import com.ydtech.modules.admin.model.vo.SysUserAccountVo;
+import com.ydtech.modules.admin.service.SysUserAccountService;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.order.entity.BasePageResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+@Api(tags = "账户余额")
+@RequestMapping("/sysUserAccount")
+@RestController
+public class SysUserAccountController extends BaseController {
+    @Autowired
+    private SysUserAccountService sysUserAccountService;
+
+
+
+    @PostMapping("/queryPage")
+    @ApiOperation(value = "用户账户表分页")
+    public HttpResult<BasePageResult<SysUserAccount>> queryPageOrder(@RequestBody @Valid SysUserAccountVo sysUserAccountVo ) {
+        BasePageResult<SysUserAccount> result = sysUserAccountService.queryByVo(sysUserAccountVo);
+        return HttpResult.ok("success", result);
+    }
+
+
+
+}

+ 5 - 0
src/main/java/com/ydtech/modules/admin/dao/SysUserAccountMapper.java

@@ -1,7 +1,10 @@
 package com.ydtech.modules.admin.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.modules.admin.model.po.SysUserAccount;
+import com.ydtech.modules.admin.model.vo.SysUserAccountVo;
+import org.apache.ibatis.annotations.Param;
 
 /**
 * @author Administrator
@@ -11,6 +14,8 @@ import com.ydtech.modules.admin.model.po.SysUserAccount;
 */
 public interface SysUserAccountMapper extends BaseMapper<SysUserAccount> {
 
+    Page<SysUserAccount> queryPageOrder(SysUserAccountVo sysUserAccountVo,@Param("page") Page page);
+
 }
 
 

+ 63 - 0
src/main/java/com/ydtech/modules/admin/model/po/SysUserAccount.java

@@ -46,10 +46,73 @@ public class SysUserAccount implements Serializable {
     @TableField(value = "create_time")
     private Date createTime;
 
+    /**
+     * 手续费提现总金额
+     */
+    @TableField(value = "handling_amount_withdrawal")
+    private BigDecimal handlingAmountWithdrawal;
+
+    /**
+     * 手续费已到账金额
+     */
+    @TableField(value = "handling_amount_account")
+    private BigDecimal handlingAmountAccount;
+
+    /**
+     * 手续费支付中金额
+     */
+    @TableField(value = "handling_amount_payment")
+    private BigDecimal handlingAmountPayment;
+
+    /**
+     * 非跟单费提现总金额
+     */
+    @TableField(value = "documentary_amount_withdrawal")
+    private BigDecimal documentaryAmountWithdrawal;
+
+    /**
+     * 非跟单费已到账金额
+     */
+    @TableField(value = "documentary_amount_account")
+    private BigDecimal documentaryAmountAccount;
+
+    /**
+     * 非跟单费支付中金额
+     */
+    @TableField(value = "documentary_amount_payment")
+    private BigDecimal documentaryAmountpayment;
+
+    /**
+     * 分销费提现总金额
+     */
+    @TableField(value = "promotion_amount_withdrawal")
+    private BigDecimal promotionAmountWithdrawal;
+
+    /**
+     * 分销费已到账金额
+     */
+    @TableField(value = "promotion_amount_account")
+    private BigDecimal promotionAmountAccount;
+
+    /**
+     * 分销费支付中金额
+     */
+    @TableField(value = "promotion_amount_payment")
+    private BigDecimal promotionAmountPayment;
+
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
     @TableField(exist = false)
     private  String  documentaryStatus;
     @TableField(exist = false)
     private String  suborderId;
+
+    @TableField(exist = false)
+    private  String  deptName;
+    @TableField(exist = false)
+    private  String  name;
+
+    @TableField(exist = false)
+    private  String  deptId;
 }

+ 88 - 0
src/main/java/com/ydtech/modules/admin/model/vo/SysUserAccountVo.java

@@ -0,0 +1,88 @@
+package com.ydtech.modules.admin.model.vo;
+
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel("查询Vo")
+public class SysUserAccountVo {
+
+    @ApiModelProperty(value = "用户id")
+    private String userId;
+
+
+    @ApiModelProperty(value = "手续费佣金")
+    private BigDecimal handlingFee;
+
+    @ApiModelProperty(value = "非跟单佣金")
+    private BigDecimal documentary;
+
+
+    @ApiModelProperty(value = "推广佣金")
+    private BigDecimal promotion;
+
+
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @TableField(value = "create_time",fill = FieldFill.INSERT_UPDATE)
+    private Date createTime;
+
+    @ApiModelProperty(value = "手续费提现总金额")
+    private BigDecimal handlingAmountWithdrawal;
+
+    @ApiModelProperty(value = "手续费已到账金额")
+    private BigDecimal handlingAmountAccount;
+
+    @ApiModelProperty(value = "手续费支付中金额")
+    private BigDecimal handlingAmountPayment;
+
+    @ApiModelProperty(value = "非跟单费提现总金额")
+    private BigDecimal documentaryAmountWithdrawal;
+
+    @ApiModelProperty(value = "非跟单费已到账金额")
+    private BigDecimal documentaryAmountAccount;
+
+    @ApiModelProperty(value = "非跟单费支付中金额")
+    private BigDecimal documentaryAmountPayment;
+
+    @ApiModelProperty(value = "分销费提现总金额")
+    private BigDecimal promotionAmountWithdrawal;
+
+    @ApiModelProperty(value = "分销费已到账金额")
+    private BigDecimal promotionAmountAccount;
+
+    @ApiModelProperty(value = "分销费支付中金额")
+    private BigDecimal promotionAmountPayment;
+
+
+    @ApiModelProperty(value = "部门id")
+    private String  deptId;
+
+    @ApiModelProperty(value = "部门id")
+    private String  deptName;
+
+
+
+
+
+    @ApiModelProperty(value = "每页页数")
+    @Min(value = 20, message = "页数最小为20")
+    @Max(value = 100, message = "页数最大为100")
+    private int pageSize;
+
+    @ApiModelProperty(value = "页数")
+    @Min(value = 1, message = "页数最小为1")
+    private int pageNum;
+}

+ 3 - 0
src/main/java/com/ydtech/modules/admin/service/SysUserAccountService.java

@@ -2,6 +2,8 @@ package com.ydtech.modules.admin.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.modules.admin.model.po.SysUserAccount;
+import com.ydtech.modules.admin.model.vo.SysUserAccountVo;
+import com.ydtech.modules.order.entity.BasePageResult;
 
 /**
 * @author Administrator
@@ -12,4 +14,5 @@ public interface SysUserAccountService extends IService<SysUserAccount> {
 
     void addOrUpdate(SysUserAccount sysUserAccount);
 
+    BasePageResult<SysUserAccount> queryByVo(SysUserAccountVo sysUserAccountVo);
 }

+ 15 - 2
src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java

@@ -1,15 +1,19 @@
 package com.ydtech.modules.admin.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.modules.admin.dao.SysUserAccountMapper;
 import com.ydtech.modules.admin.model.po.SysUserAccount;
 import com.ydtech.modules.admin.model.po.SysUserAccountHistory;
 import com.ydtech.modules.admin.model.po.SysUserBankCard;
+import com.ydtech.modules.admin.model.vo.SysUserAccountVo;
 import com.ydtech.modules.admin.service.SysUserAccountHistoryService;
 import com.ydtech.modules.admin.service.SysUserAccountService;
 import com.ydtech.modules.admin.service.SysUserService;
 import com.ydtech.modules.esm.model.EsmUserReferrer;
 import com.ydtech.modules.esm.service.EsmUserReferrerService;
+import com.ydtech.modules.order.entity.BasePageResult;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,7 +39,6 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
     @Override
     @Transactional
     public void addOrUpdate(SysUserAccount sysUserAccount) {
-        SysUserAccountHistory sysUserAccountHistory = new SysUserAccountHistory();
 
 //      如果用户id有值则累加   没有则 新增
         BigDecimal handlingFee = BigDecimal.ZERO;
@@ -82,7 +85,7 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
             if (sysUserAccountEntity.getPromotion() == null) {
                 sysUserAccountEntity.setPromotion(handlingFee);
             } else {
-                remainingAmount = remainingAmount.add(sysUserAccountEntity.getPromotion());
+                    remainingAmount = remainingAmount.add(sysUserAccountEntity.getPromotion());
 
             }
             sysUserAccountEntity.setHandlingFee(sysUserAccount.getHandlingFee().add(sysUserAccountEntity.getHandlingFee()));
@@ -111,6 +114,16 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
 
     }
 
+    @Override
+    public BasePageResult<SysUserAccount> queryByVo(SysUserAccountVo sysUserAccountVo) {
+        Page<SysUserAccount> page = new Page<>(sysUserAccountVo.getPageNum(), sysUserAccountVo.getPageSize());
+        QueryWrapper<SysUserAccount> wrapper = new QueryWrapper<>();
+
+        Page<SysUserAccount> sysUserAccountHistoryPage  = baseMapper.queryPageOrder(sysUserAccountVo,page);
+        return new BasePageResult<>(sysUserAccountVo.getPageNum(), page.getSize(), sysUserAccountHistoryPage.getTotal(), page.getPages(),
+                sysUserAccountHistoryPage.getRecords());
+    }
+
     private void judgeLevel(String userId, SysUserAccount sysUserAccountEntity, SysUserAccount newAccount) {
         if (!ObjectUtils.isNotEmpty(sysUserAccountEntity)) {
             sysUserAccountEntity = newAccount;

+ 9 - 0
src/main/java/com/ydtech/modules/inv/controller/InvReceivableController.java

@@ -136,6 +136,15 @@ public class InvReceivableController extends BaseController {
         return HttpResult.ok(uploadUrl + "excel/" + fileName);
     }
 
+    @ApiOperation("结算导入新增")
+    @PostMapping("addSettlement")
+    public HttpResult addSettlement(@RequestBody InvSettlementSource invSettlementSource){
+        Boolean b = invReceivableService.addSettlement(invSettlementSource);
+        return b ? HttpResult.ok("新增成功") : HttpResult.error("新增失败");
+    }
+
+
+
     @ApiOperation("结算导入删除")
     @PostMapping("deleteSettlement")
     public HttpResult deleteSettlement(@RequestBody String[] ids) {

+ 48 - 0
src/main/java/com/ydtech/modules/inv/model/po/InvSettlementSource.java

@@ -224,6 +224,54 @@ public class InvSettlementSource implements Serializable {
     @ExcelProperty("代理结算时间")
     private String agencySettlementTime;
 
+    /**
+     * 导入日期
+     */
+    @TableField(value = "revenue_time")
+    @ApiModelProperty("导入日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ExcelProperty("导入日期")
+    private String revenueTime;
+
+    /**
+     * 导入人名字
+     */
+    @TableField(value = "revenue_name")
+    @ApiModelProperty("导入人名字")
+    @ExcelProperty("导入人名字")
+    private String revenueName;
+
+    /**
+     * 导入人Id
+     */
+    @TableField(value = "revenue_userid")
+    @ApiModelProperty("导入人Id")
+    @ExcelProperty("导入人Id")
+    private String revenueUserId;
+
+
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
+
+    public void builder(){
+        if(null == this.getJqPremiumTax()){
+            this.setJqPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getSyPremiumTax()){
+            this.setSyPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getNonCarPremiumTax()){
+            this.setNonCarPremiumTax(new BigDecimal(0));
+        }
+        if(null == this.getCompulsoryExportRatio()){
+            this.setCompulsoryExportRatio(new BigDecimal(0));
+        }
+        if(null == this.getCommercialExportRatio()){
+            this.setCommercialExportRatio(new BigDecimal(0));
+        }
+        if(null == this.getNonVehicleExportRatio()){
+            this.setNonVehicleExportRatio(new BigDecimal(0));
+        }
+    }
 }

+ 13 - 0
src/main/java/com/ydtech/modules/inv/model/po/InvSource.java

@@ -360,6 +360,19 @@ public class InvSource implements Serializable {
     @ExcelProperty("导入人名字")
     private String revenueName;
 
+    /**
+     * 导入人Id
+     */
+    @TableField(value = "revenue_name")
+    @ApiModelProperty("导入人Id")
+    @ExcelProperty("导入人Id")
+    private String revenueUserId;
+
+    @TableField(value = "inv_source_type")
+    @ApiModelProperty("应收类型(平台,私有)")
+    @ExcelProperty("应收类型")
+    private String invSourceType;
+
     @TableField(exist = false)
     private String[] ids;
 

+ 23 - 0
src/main/java/com/ydtech/modules/inv/model/vo/InvSettlementSourceQueryVo.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.inv.model.vo;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -181,6 +182,28 @@ public class InvSettlementSourceQueryVo extends PageRequest implements Serializa
     @JsonFormat(pattern = "yyyy-MM-dd")
     private String agencySettlementTime;
 
+    /**
+     * 导入日期
+     */
+    @TableField(value = "revenue_time")
+    @ApiModelProperty("导入日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String revenueTime;
+
+    /**
+     * 导入人名字
+     */
+    @TableField(value = "revenue_name")
+    @ApiModelProperty("导入人名字")
+    private String revenueName;
+
+    /**
+     * 导入人Id
+     */
+    @TableField(value = "revenue_userid")
+    @ApiModelProperty("导入人Id")
+    private String revenueUserId;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 }

+ 3 - 3
src/main/java/com/ydtech/modules/inv/model/vo/InvSourceQueryVo.java

@@ -310,10 +310,10 @@ public class InvSourceQueryVo extends PageRequest implements Serializable {
     @ApiModelProperty("导入人名字")
     private String revenueName;
 
+    @TableField(value = "inv_source_type")
+    @ApiModelProperty("应收类型")
+    private String invSourceType;
 
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
-
-
-
 }

+ 2 - 0
src/main/java/com/ydtech/modules/inv/service/InvReceivableService.java

@@ -53,6 +53,8 @@ public interface InvReceivableService {
 
     Boolean addReceivable(InvSource invSource);
 
+    Boolean addSettlement(InvSettlementSource invSettlementSource);
+
     List<String> dataMatching();
 
     Boolean deleteSettlement(String[] ids);

+ 76 - 25
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -616,50 +616,101 @@ public class InvReceivableServiceImpl implements InvReceivableService {
         invSource.setId(IdGenerate.nextId());
         invSource.builder();
         BigDecimal tax = new BigDecimal(1.06);
-        //处理交强不含税
-        invSource.setJqPremium(invSource.getJqPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
-        //处理商业不含税
-        invSource.setSyPremium(invSource.getSyPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
-        //处理非车不含税
-        invSource.setNonCarPremium(invSource.getNonCarPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
-
+        /**
+         * jqPremiumTax  交强险保费
+         * syPremiumTax  商业险保费
+         * nonCarPremiumTax 非车保费
+         * jqReceivableRatio 交强应收比例
+         * syReceivableRatio 商业应收比列
+         * nonCarReceivableRatio 非车应收比列
+         * jqPremium  交强险保费(不含税)
+         * syPremium  商业险保费(不含税)
+         * nonCarPremium 非车保费(不含税)
+         * jqPremiumRatio 交强手续费比例
+         * syPremiumRatio 商业手续费比例
+         * nonCarPremiumRatio 非车手续费比例
+         * jqNonCopyingRatio 交强非跟单比例
+         * syNonCopyingRatio 商业非跟单比例
+         * nonCarNonCopyingRatio 非车非跟单比例
+         */
         //处理非跟单比例
         invSource.setJqNonCopyingRatio(invSource.getJqReceivableRatio().subtract(invSource.getJqPremiumRatio()));
         invSource.setSyNonCopyingRatio(invSource.getSyReceivableRatio().subtract(invSource.getSyPremiumRatio()));
         invSource.setNonCarNonCopyingRatio(invSource.getNonCarReceivableRatio().subtract(invSource.getNonCarPremiumRatio()));
 
-        //处理手续费金额
-        invSource.setPremium(
-                invSource.getJqPremium().multiply(invSource.getJqPremiumRatio())
-                        .add(invSource.getSyPremium().multiply(invSource.getSyPremiumRatio()))
-                        .add(invSource.getNonCarPremium().multiply(invSource.getNonCarPremiumRatio())));
-        //处理非跟单金额
-        invSource.setNonCopying(
-                invSource.getJqPremium().multiply(invSource.getJqNonCopyingRatio())
-                        .add(invSource.getSyPremium().multiply(invSource.getSyNonCopyingRatio()))
-                        .add(invSource.getNonCarPremium().multiply(invSource.getNonCarNonCopyingRatio())));
-        //处理保司应收金额
-        invSource.setReceivable(
-                invSource.getJqPremium().multiply(invSource.getJqReceivableRatio())
-                        .add(invSource.getSyPremium().multiply(invSource.getSyReceivableRatio()))
-                        .add(invSource.getNonCarPremium().multiply(invSource.getNonCarReceivableRatio())));
         //处理补贴金额
         invSource.setSubsidyAmount(
                 invSource.getJqPremiumTax().multiply(invSource.getSubsidyRatio())
                         .add(invSource.getSyPremiumTax().multiply(invSource.getSubsidyRatio()))
                         .add(invSource.getNonCarPremiumTax().multiply(invSource.getSubsidyRatio())));
-        //处理应收总金额
-        invSource.setTotalReceivableAmount(
-                invSource.getReceivable().add(invSource.getSubsidyAmount()));
         //处理最大应付金额
         invSource.setMaxReceivable(
                 invSource.getJqPremiumTax().multiply(invSource.getMaxJqReceivableRatio())
                         .add(invSource.getSyPremiumTax().multiply(invSource.getMaxSyReceivableRatio()))
                         .add(invSource.getNonCarPremiumTax().multiply(invSource.getMaxNonCarReceivableRatio())));
+        //处理不含税保费
+        invSource.setJqPremium(invSource.getJqPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
+        invSource.setSyPremium(invSource.getSyPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
+        invSource.setNonCarPremium(invSource.getNonCarPremiumTax().divide(tax, 2, RoundingMode.HALF_UP));
+
+        //手续费金额  premium
+        invSource.setPremium(invSource.getJqPremium().multiply(invSource.getJqPremiumRatio())
+                .add(invSource.getSyPremium().multiply(invSource.getSyPremiumRatio())
+                        .add(invSource.getNonCarPremium().multiply(invSource.getNonCarPremiumRatio()))));
+
+        //非跟单金额  nonCopying
+        invSource.setNonCopying(invSource.getJqPremium().multiply(invSource.getJqNonCopyingRatio())
+                .add(invSource.getSyPremium().multiply(invSource.getSyNonCopyingRatio())
+                        .add(invSource.getNonCarPremium().multiply(invSource.getNonCarNonCopyingRatio()))));
+
+
+
+        //选择类型为平台类型时 应收金额 = 含税保费 * 应收比例
+        if (invSource.getInvSourceType().equals("platform")) {
+            //处理应收金额
+            invSource.setReceivable(invSource.getJqPremiumTax().multiply(invSource.getJqReceivableRatio())
+                    .add(invSource.getSyPremiumTax().multiply(invSource.getSyReceivableRatio())
+                    .add(invSource.getNonCarPremiumTax().multiply(invSource.getNonCarReceivableRatio()))));
+            //处理应收总金额
+            invSource.setTotalReceivableAmount(
+                    invSource.getReceivable().add(invSource.getSubsidyAmount()));
+        }
+
+        //选择类型为私有类型时 应收金额 = ( 不含税保费 * 手续费 )+ (不含税保费 * 非跟单比例)
+        if (invSource.getInvSourceType().equals("privately")) {
+            //应收金额
+            invSource.setReceivable(invSource.getPremium().add(invSource.getNonCopying()));
+
+            //处理应收总金额
+            invSource.setTotalReceivableAmount(
+                    invSource.getReceivable().add(invSource.getSubsidyAmount()));
+        }
+
         boolean save = invSourceMapper.insert(invSource) > 0 ? true : false;
         return save;
     }
 
+    @Override
+    public Boolean addSettlement(InvSettlementSource invSettlementSource) {
+        invSettlementSource.setId(IdGenerate.nextId());
+        invSettlementSource.builder();
+        //处理补贴金额
+        invSettlementSource.setSubsidyAmount(
+                invSettlementSource.getJqPremiumTax().multiply(invSettlementSource.getSubsidyRatio())
+                        .add(invSettlementSource.getSyPremiumTax().multiply(invSettlementSource.getSubsidyRatio()))
+                        .add(invSettlementSource.getNonCarPremiumTax().multiply(invSettlementSource.getSubsidyRatio())));
+        // 处理结算金额
+        invSettlementSource.setSettlementAmount(
+                invSettlementSource.getJqPremiumTax().multiply(invSettlementSource.getCompulsoryExportRatio())
+                        .add(invSettlementSource.getSyPremiumTax().multiply(invSettlementSource.getCommercialExportRatio())
+                        .add(invSettlementSource.getNonCarPremiumTax().multiply(invSettlementSource.getNonVehicleExportRatio())))
+        );
+        DateTime dateTime = new DateTime();
+        invSettlementSource.setRevenueTime(dateTime.toString());
+        boolean save = invSettlementSourceMapper.insert(invSettlementSource) > 0 ? true : false;
+        return save;
+    }
+
     @Override
     public List<String> dataMatching() {
         List<String> data = invSourceMapper.dataMatching();

+ 8 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvSettlementSourceServiceImpl.java

@@ -1,9 +1,12 @@
 package com.ydtech.modules.inv.service.impl;
 
+import cn.hutool.core.date.DateTime;
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.inv.dao.InvSettlementSourceMapper;
 import com.ydtech.modules.inv.model.excel.InvSettlementSourceExcel;
 import com.ydtech.modules.inv.model.po.InvSettlementSource;
@@ -60,6 +63,11 @@ public class InvSettlementSourceServiceImpl extends ServiceImpl<InvSettlementSou
                 invSettlementSource.setId(one.getId());
                 baseMapper.updateById(invSettlementSource);
             } else {
+                SysUser user = BaseController.getUser();
+                DateTime dateTime = new DateTime();
+                invSettlementSource.setRevenueTime(dateTime.toString());
+                invSettlementSource.setRevenueName(user.getName());
+                invSettlementSource.setRevenueUserId(user.getId());
                 baseMapper.insert(invSettlementSource);
             }
         }

+ 1 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvSourceServiceImpl.java

@@ -49,6 +49,7 @@ public class InvSourceServiceImpl extends ServiceImpl<InvSourceMapper, InvSource
         for (InvSource invSource : invSources) {
             invSource.setRevenueName(user.getName());
             invSource.setRevenueTime(dateTime.toString());
+            invSource.setRevenueUserId(user.getId());
         }
 
         boolean result = invSourceService.saveOrUpdateBatchWithConditions(invSources);

+ 2 - 4
src/main/java/com/ydtech/modules/order/components/FileComponents.java

@@ -4,9 +4,8 @@ import com.ydtech.utils.baidu.FileUtil;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
+import java.io.*;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
@@ -29,5 +28,4 @@ public class FileComponents {
         return FileUtil.netUrlToFile(url, dir, fileName, uploadFilePath, apiUrl + showFileUrl);
     }
 
-
 }

+ 25 - 25
src/main/java/com/ydtech/modules/order/components/bohai/BoHaiRequestApiComponent.java

@@ -47,13 +47,13 @@ public class BoHaiRequestApiComponent {
      * @param <S>    Response 响应体
      * @return <S>
      */
-    private <Q extends BoHaiBaseRequest, S extends BoHaiBaseResponse> S post(Q q, String url, Class<S> tClass) throws Exception {
+    private <Q extends BoHaiBaseRequest, S extends BoHaiBaseResponse> S post(Q q, String url, Class<S> tClass, String sysSourceCode) throws Exception {
         HttpHeaders httpHeaders = new HttpHeaders();
         httpHeaders.setContentType(MediaType.APPLICATION_JSON);
 
         String busReqString = JSON.toJSONString(q, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
         InsuranceLog.infoLog(InsuranceEnum.BPIC.getPinyin(), "\n\t---------> URl: {} \n---------> 请求参数:{}", url, busReqString);
-        BoHaiEncrypted boHaiEncrypted = new BoHaiEncrypted(busReqString, properties);
+        BoHaiEncrypted boHaiEncrypted = new BoHaiEncrypted(busReqString, properties, sysSourceCode);
         String json = JSON.toJSONString(boHaiEncrypted, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullStringAsEmpty);
         // 获取请求头signature 和加密后的内容
         Map<String, String> stringStringMap = SignatureUtils.encryptAndSign(properties.getSelfPrivateKey(),
@@ -83,8 +83,8 @@ public class BoHaiRequestApiComponent {
      * @param request 生成订单号请求实体
      * @return 返回订单号响应
      */
-    public GenerateOrderNoResponse generateOrderNo(GenerateOrderNoRequest request) throws Exception {
-        return post(request, properties.getUrl(), GenerateOrderNoResponse.class);
+    public GenerateOrderNoResponse generateOrderNo(GenerateOrderNoRequest request, String sysSourceCode) throws Exception {
+        return post(request, properties.getUrl(), GenerateOrderNoResponse.class,  sysSourceCode);
     }
 
     /**
@@ -93,8 +93,8 @@ public class BoHaiRequestApiComponent {
      * @param request 车辆查询请求实体
      * @return 响应
      */
-    public VehicleTypeQueryResponse vehicleTypeQuery(VehicleTypeQueryRequest request) throws Exception {
-        return post(request, properties.getUrl(), VehicleTypeQueryResponse.class);
+    public VehicleTypeQueryResponse vehicleTypeQuery(VehicleTypeQueryRequest request, String sysSourceCode) throws Exception {
+        return post(request, properties.getUrl(), VehicleTypeQueryResponse.class,  sysSourceCode);
     }
 
     /**
@@ -103,10 +103,10 @@ public class BoHaiRequestApiComponent {
      * @param request 车辆确认 请求实体
      * @return 响应
      */
-    public VehicleConfirmationResponse vehicleConfirmation(VehicleConfirmationReqeust request) throws Exception {
-        VehicleConfirmationResponse response = post(request, properties.getUrl(), VehicleConfirmationResponse.class);
+    public VehicleConfirmationResponse vehicleConfirmation(VehicleConfirmationReqeust request, String sysSourceCode) throws Exception {
+        VehicleConfirmationResponse response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode);
         if (ResponseCode.R_Z00002.getCode().equals(response.getResponseCode())) {
-            response = post(request, properties.getUrl(), VehicleConfirmationResponse.class);
+            response = post(request, properties.getUrl(), VehicleConfirmationResponse.class, sysSourceCode);
         }
         if (ResponseCode.R_Z00001.getCode().equals(response.getResponseCode())) {
             return response;
@@ -120,8 +120,8 @@ public class BoHaiRequestApiComponent {
      * @param imageUploadRequest 影像请求
      * @return 响应
      */
-    public ImageUploadResponse imageUpload(ImageUploadRequest imageUploadRequest) throws Exception {
-        return post(imageUploadRequest, properties.getUrl(), ImageUploadResponse.class);
+    public ImageUploadResponse imageUpload(ImageUploadRequest imageUploadRequest, String sysSourceCode) throws Exception {
+        return post(imageUploadRequest, properties.getUrl(), ImageUploadResponse.class, sysSourceCode);
     }
 
 
@@ -131,8 +131,8 @@ public class BoHaiRequestApiComponent {
      * @param request 车辆确认 请求实体
      * @return 响应
      */
-    public NonAutomotiveProductsResponse products(NonAutomotiveProductsRequest request) throws Exception {
-        return post(request, properties.getUrl(), NonAutomotiveProductsResponse.class);
+    public NonAutomotiveProductsResponse products(NonAutomotiveProductsRequest request, String sysSourceCode) throws Exception {
+        return post(request, properties.getUrl(), NonAutomotiveProductsResponse.class, sysSourceCode);
     }
 
     /**
@@ -141,8 +141,8 @@ public class BoHaiRequestApiComponent {
      * @param request 车辆确认 请求实体
      * @return 响应
      */
-    public NonAutomotiveProductsDetailsResponse productsDetails(NonAutomotiveProductsDetailsRequest request) throws Exception {
-        return post(request, properties.getUrl(), NonAutomotiveProductsDetailsResponse.class);
+    public NonAutomotiveProductsDetailsResponse productsDetails(NonAutomotiveProductsDetailsRequest request, String sysSourceCode) throws Exception {
+        return post(request, properties.getUrl(), NonAutomotiveProductsDetailsResponse.class, sysSourceCode);
     }
 
 
@@ -152,8 +152,8 @@ public class BoHaiRequestApiComponent {
      * @param request 车辆确认 请求实体
      * @return 响应
      */
-    public QuotationResponse quotation(QuotationRequest request) throws Exception {
-        return post(request, properties.getUrl(), QuotationResponse.class);
+    public QuotationResponse quotation(QuotationRequest request, String sysSourceCode) throws Exception {
+        return post(request, properties.getUrl(), QuotationResponse.class, sysSourceCode);
     }
 
     /**
@@ -162,8 +162,8 @@ public class BoHaiRequestApiComponent {
      * @param underwritingRequest 核保 请求实体
      * @return 响应
      */
-    public UnderwritingResponse underwriting(UnderwritingRequest underwritingRequest) throws Exception {
-        return post(underwritingRequest, properties.getUrl(), UnderwritingResponse.class);
+    public UnderwritingResponse underwriting(UnderwritingRequest underwritingRequest, String sysSourceCode) throws Exception {
+        return post(underwritingRequest, properties.getUrl(), UnderwritingResponse.class, sysSourceCode);
     }
 
     /**
@@ -172,8 +172,8 @@ public class BoHaiRequestApiComponent {
      * @param paymentRequest 车辆确认 请求实体
      * @return 响应
      */
-    public PaymentResponse payment(PaymentRequest paymentRequest) throws Exception {
-        return post(paymentRequest, properties.getUrl(), PaymentResponse.class);
+    public PaymentResponse payment(PaymentRequest paymentRequest, String sysSourceCode) throws Exception {
+        return post(paymentRequest, properties.getUrl(), PaymentResponse.class, sysSourceCode);
     }
 
     /**
@@ -182,8 +182,8 @@ public class BoHaiRequestApiComponent {
      * @param electronicPolicyRequest 保单请求
      * @return 响应
      */
-    public ElectronicPolicyResponse electronicPolicy(ElectronicPolicyRequest electronicPolicyRequest) throws Exception {
-        return post(electronicPolicyRequest, properties.getUrl(), ElectronicPolicyResponse.class);
+    public ElectronicPolicyResponse electronicPolicy(ElectronicPolicyRequest electronicPolicyRequest, String sysSourceCode) throws Exception {
+        return post(electronicPolicyRequest, properties.getUrl(), ElectronicPolicyResponse.class, sysSourceCode);
     }
 
     /**
@@ -192,8 +192,8 @@ public class BoHaiRequestApiComponent {
      * @param statusDocumentsRequest 单证查询
      * @return 响应
      */
-    public StatusDocumentsResponse statusDocuments(StatusDocumentsRequest statusDocumentsRequest) throws Exception {
-        StatusDocumentsResponse response = post(statusDocumentsRequest, properties.getUrl(), StatusDocumentsResponse.class);
+    public StatusDocumentsResponse statusDocuments(StatusDocumentsRequest statusDocumentsRequest, String sysSourceCode) throws Exception {
+        StatusDocumentsResponse response = post(statusDocumentsRequest, properties.getUrl(), StatusDocumentsResponse.class, sysSourceCode);
         verificationResponseCode(response.getResponseCode(), response.getResponseMsg());
         return response;
     }

+ 0 - 2
src/main/java/com/ydtech/modules/order/controller/BoHaiOrderApiController.java

@@ -112,7 +112,6 @@ public class BoHaiOrderApiController {
         return this.boHaiOrderApiService.auditCallback(approvedRequest);
     }
 
-
     @PostMapping("/policyResultCallback")
     @ApiOperation(value = "保单回调")
     public String policyResultCallback(@RequestBody BoHaiEncrypted s) throws Exception {
@@ -121,5 +120,4 @@ public class BoHaiOrderApiController {
         return this.boHaiOrderApiService.policyResultCallback(policyResultCallbackRequest);
     }
 
-
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/bohai/BoHaiEncrypted.java

@@ -38,10 +38,10 @@ public class BoHaiEncrypted implements Serializable {
     private String sysSourceCode;
 
 
-    public BoHaiEncrypted(String bizContent, BohaiApiConfigurationProperties properties) {
+    public BoHaiEncrypted(String bizContent, BohaiApiConfigurationProperties properties, String sysSourceCode) {
         this.bizContent = bizContent;
         this.insurerCode = properties.getInsurerCode();
-        this.sysSourceCode = properties.getSysSourceCode();
+        this.sysSourceCode = sysSourceCode;
     }
 
 

+ 12 - 12
src/main/java/com/ydtech/modules/order/service/impl/BoHaiOrderApiServiceImpl.java

@@ -71,7 +71,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         BoHaiConfigureParameters parameters = configureParametersComponents.toEntity(BoHaiConfigureParameters.class,
                 ptlAgreementAttribution);
         NonAutomotiveProductsRequest nonAutomotiveProductsRequest = new NonAutomotiveProductsRequest(parameters, productQueryVo);
-        NonAutomotiveProductsResponse response = boHaiRequestApiComponent.products(nonAutomotiveProductsRequest);
+        NonAutomotiveProductsResponse response = boHaiRequestApiComponent.products(nonAutomotiveProductsRequest, parameters.getSysSourceCode());
         List<NonAutomotiveProductsResponse.DataDTO.ProductsDTO> products = response.getData().getProducts();
         return HttpResult.ok(products);
     }
@@ -85,7 +85,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
                 ptlAgreementAttribution);
         NonAutomotiveProductsDetailsRequest nonAutomotiveProductsDetailsRequest = new NonAutomotiveProductsDetailsRequest(parameters,
                 productDetailsQueryVo);
-        NonAutomotiveProductsDetailsResponse response = boHaiRequestApiComponent.productsDetails(nonAutomotiveProductsDetailsRequest);
+        NonAutomotiveProductsDetailsResponse response = boHaiRequestApiComponent.productsDetails(nonAutomotiveProductsDetailsRequest, parameters.getSysSourceCode());
         List<NonAutomotiveProductsDetailsResponse.DataDTO.CoveragesDTO> coverages = response.getData().getCoverages();
         return HttpResult.ok(coverages);
     }
@@ -102,13 +102,13 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         GenerateOrderNoRequest generateOrderNoRequest = new GenerateOrderNoRequest(parameters);
 
         // 1 生成生成订单
-        GenerateOrderNoResponse generateOrderNoResponse = boHaiRequestApiComponent.generateOrderNo(generateOrderNoRequest);
+        GenerateOrderNoResponse generateOrderNoResponse = boHaiRequestApiComponent.generateOrderNo(generateOrderNoRequest, parameters.getSysSourceCode());
         String orderNo = generateOrderNoResponse.getData().getOrderNo();
 
         // 2 车型查询接口
         CarInfoVo carInfo = quoteInfoVo.getCarInfo();
         VehicleTypeQueryRequest vehicleTypeQueryRequest = new VehicleTypeQueryRequest(parameters, carInfo.getModelcname(), orderNo);
-        VehicleTypeQueryResponse vehicleTypeQueryResponse = boHaiRequestApiComponent.vehicleTypeQuery(vehicleTypeQueryRequest);
+        VehicleTypeQueryResponse vehicleTypeQueryResponse = boHaiRequestApiComponent.vehicleTypeQuery(vehicleTypeQueryRequest, parameters.getSysSourceCode());
         List<VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO> vehicleModels = vehicleTypeQueryResponse.getData().getVehicleModels();
         VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO vehicleModelsDTO =
                 new CarModelsFilterUtils<VehicleTypeQueryResponse.DataDTO.VehicleModelsDTO>().to(vehicleModels, quoteInfoVo.getCarInfo());
@@ -126,14 +126,14 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
                 policyHolderInfo.getIdentifyNumber());
         VehicleConfirmationReqeust vehicleConfirmationReqeust = new VehicleConfirmationReqeust(parameters, quoteInfoVo, vehicleModelsDTO,
                 orderNo, ownerInfoArea, insuredPersonArea, policyHolderArea);
-        VehicleConfirmationResponse vehicleConfirmationResponse = boHaiRequestApiComponent.vehicleConfirmation(vehicleConfirmationReqeust);
+        VehicleConfirmationResponse vehicleConfirmationResponse = boHaiRequestApiComponent.vehicleConfirmation(vehicleConfirmationReqeust, parameters.getSysSourceCode());
         // 车辆实际价值
         String currentValue = vehicleConfirmationResponse.getData().getVehicleModels().get(0).getCurrentValue();
 
         // 4. 报价接口
         QuotationRequest quotationRequest = new QuotationRequest(parameters, quoteInfoVo.getRiskList(), quoteInfoVo.getKindList(),
                 currentValue, orderNo, carInfo, quoteVo.getAccidentalDrivingVo());
-        QuotationResponse response = boHaiRequestApiComponent.quotation(quotationRequest);
+        QuotationResponse response = boHaiRequestApiComponent.quotation(quotationRequest, parameters.getSysSourceCode());
         return getQuoteRespVo(response, quoteInfoVo, vehicleModelsDTO, ptlAgreementAttribution, orderNo);
     }
 
@@ -154,7 +154,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
         ImageUploadRequest imageUploadRequest = new ImageUploadRequest(parameters, insAreaCompany.getId(), insAreaCompany.getInsOrderNo()
                 , insTaskImagesBase64s);
-        ImageUploadResponse response = boHaiRequestApiComponent.imageUpload(imageUploadRequest);
+        ImageUploadResponse response = boHaiRequestApiComponent.imageUpload(imageUploadRequest, parameters.getSysSourceCode());
         if (ResponseCode.R_Z00001.getCode().equals(response.getResponseCode())) {
             return HttpResult.ok("上传成功");
         }
@@ -173,7 +173,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
         // 核保请求
         UnderwritingRequest underwritingRequest = new UnderwritingRequest(parameters, insAreaCompany.getId());
-        UnderwritingResponse underwritingResponse = boHaiRequestApiComponent.underwriting(underwritingRequest);
+        UnderwritingResponse underwritingResponse = boHaiRequestApiComponent.underwriting(underwritingRequest, parameters.getSysSourceCode());
         int i = underwritingResponse.getData().verificationUnderwriting();
         // 交强
         UnderwritingResponse.DataDTO.TrafficPolicyDTO trafficPolicy = underwritingResponse.getData().getTrafficPolicy();
@@ -190,7 +190,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
             insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
             // 支付请求
             PaymentRequest paymentRequest = new PaymentRequest(parameters, insAreaCompany.getId(), insAreaCompany.getInsOrderNo());
-            PaymentResponse paymentResponse = boHaiRequestApiComponent.payment(paymentRequest);
+            PaymentResponse paymentResponse = boHaiRequestApiComponent.payment(paymentRequest, parameters.getSysSourceCode());
             String payUrl = paymentResponse.getData().getQrCodeUrl();
             insAreaCompany.setPaymentLink(payUrl);
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
@@ -221,7 +221,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
 
         ElectronicPolicyRequest electronicPolicyRequest = new ElectronicPolicyRequest(parameters, insAreaCompany.getId(),
                 insAreaCompany.getJqpolicyno(), insAreaCompany.getSypolicyno());
-        ElectronicPolicyResponse response = boHaiRequestApiComponent.electronicPolicy(electronicPolicyRequest);
+        ElectronicPolicyResponse response = boHaiRequestApiComponent.electronicPolicy(electronicPolicyRequest, parameters.getSysSourceCode());
 
         ElectronicPolicyResponse.DataDTO data = response.getData();
         CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
@@ -351,7 +351,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         BoHaiConfigureParameters parameters = configureParametersComponents.toEntity(BoHaiConfigureParameters.class,
                 ptlAgreementAttribution);
         PaymentRequest paymentRequest = new PaymentRequest(parameters, insAreaCompany.getId(), insAreaCompany.getInsOrderNo());
-        PaymentResponse paymentResponse = boHaiRequestApiComponent.payment(paymentRequest);
+        PaymentResponse paymentResponse = boHaiRequestApiComponent.payment(paymentRequest, parameters.getSysSourceCode());
         return paymentResponse.getData().getQrCodeUrl();
     }
 
@@ -366,7 +366,7 @@ public class BoHaiOrderApiServiceImpl implements BoHaiOrderApiService {
         String applyno = !StringUtils.isEmpty(insAreaCompany.getJqapplyno()) ? insAreaCompany.getJqapplyno() :
                 insAreaCompany.getSyapplyno();
         StatusDocumentsRequest statusDocumentsRequest = new StatusDocumentsRequest(parameters, insAreaCompany.getId(), applyno);
-        StatusDocumentsResponse response = boHaiRequestApiComponent.statusDocuments(statusDocumentsRequest);
+        StatusDocumentsResponse response = boHaiRequestApiComponent.statusDocuments(statusDocumentsRequest, parameters.getSysSourceCode());
         return response.getData().getDocumentList();
     }
 

+ 42 - 0
src/main/resources/mapper/modules/admin/SysUserAccountMapper.xml

@@ -10,10 +10,52 @@
             <result property="documentary" column="documentary" jdbcType="DECIMAL"/>
             <result property="promotion" column="promotion" jdbcType="DECIMAL"/>
             <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="handlingAmountWithdrawal" column="handling_amount_withdrawal" jdbcType="DECIMAL"/>
+            <result property="handlingAmountAccount" column="handling_amount_account" jdbcType="DECIMAL"/>
+            <result property="handlingAmountPayment" column="handling_amount_payment" jdbcType="DECIMAL"/>
+            <result property="documentaryAmountWithdrawal" column="documentary_amount_withdrawal" jdbcType="DECIMAL"/>
+            <result property="documentaryAmountAccount" column="documentary_amount_account" jdbcType="DECIMAL"/>
+            <result property="documentaryAmountPayment" column="documentary_amount_payment" jdbcType="DECIMAL"/>
+            <result property="promotionAmountWithdrawal" column="promotion_amount_withdrawal" jdbcType="DECIMAL"/>
+            <result property="promotionAmountAccount" column="promotion_amount_account" jdbcType="DECIMAL"/>
+            <result property="promotionAmountPayment" column="promotion_amount_payment" jdbcType="DECIMAL"/>
+
     </resultMap>
 
     <sql id="Base_Column_List">
         user_id,handling_fee,documentary,
         promotion,create_time
     </sql>
+
+    <select id="queryPageOrder"  resultType="com.ydtech.modules.admin.model.po.SysUserAccount">
+        select
+          a.user_id as "userId",
+          a.handling_fee as "handlingFee",
+          a.documentary as "documentary",
+          a.promotion as "promotion",
+          a.create_time as "createTime",
+          a.handling_amount_withdrawal as "handlingAmountWithdrawal",
+          a.handling_amount_account as "handlingAmountAccount",
+          a.handling_amount_payment as "handlingAmountPayment",
+          a.documentary_amount_withdrawal as "documentaryAmountWithdrawal",
+          a.documentary_amount_account as "documentaryAmountAccount",
+          a.documentary_amount_payment as "documentaryAmountPayment",
+          a.promotion_amount_withdrawal as "promotionAmountWithdrawal",
+          a.promotion_amount_account as "promotionAmountAccount",
+          a.promotion_amount_payment as "promotionAmountPayment",
+          b.dept_id  as  "deptId",
+          b.name  as  "name",
+          sd.name  as  "deptName"
+        from
+        sys_user_account a
+        left join   sys_user  b  on  a.user_id  = b.id
+        left join   sys_dept  sd  on  sd.id =b.dept_id
+        <where>
+            <if test="sysUserAccountVo.userId != null and sysUserAccountVo.userId != ''">
+                and a.user_id = #{sysUserAccountVo.userId}
+            </if>
+        </where>
+    </select>
+
+
 </mapper>

+ 4 - 1
src/main/resources/mapper/modules/inv/InvSettlementSourceMapper.xml

@@ -25,6 +25,9 @@
             <result property="nonVehicleExportRatio" column="non_vehicle_export_ratio" jdbcType="VARCHAR"/>
             <result property="settlementAmount" column="settlement_amount" jdbcType="VARCHAR"/>
             <result property="agencySettlementTime" column="agency_settlement_time" jdbcType="TIMESTAMP"/>
+            <result property="revenueTime" column="revenue_time" jdbcType="VARCHAR"/>
+            <result property="revenueName" column="revenue_name" jdbcType="VARCHAR"/>
+            <result property="revenueUserId" column="revenue_userid" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -34,6 +37,6 @@
         sy_policy_id,non_car_policy_id,jq_premium_tax,
         vehicle_tax,sy_premium_tax,non_car_premium_tax,
         compulsory_export_ratio,commercial_export_ratio,non_vehicle_export_ratio,
-        settlement_amount,agency_settlement_time
+        settlement_amount,agency_settlement_time,revenue_time,revenue_name,revenue_userid
     </sql>
 </mapper>

+ 10 - 2
src/main/resources/mapper/modules/inv/InvSourceMapper.xml

@@ -129,6 +129,7 @@
         max_receivable,
         revenue_time,
         revenue_name,
+        inv_source_type,
         CASE WHEN DATEDIFF(NOW(), signing_time) > 90 THEN 2 ELSE inv_source.clearing_state END as clearing_state,
         insurance_clearing_state
         from inv_source
@@ -171,7 +172,7 @@
             and a.insurance_clearing_state = #{param.insuranceClearingState}
         </if>
         <if test="param.insuredName != null and param.insuredName != ''">
-            and a.insured_name = #{insuredName}
+            and a.insured_name = #{param.insuredName}
         </if>
         <if test="param.revenueTimeStartTime != null and param.revenueTimeStartTime != ''">
             and a.revenue_time <![CDATA[ >= ]]> CAST(CONCAT(#{param.revenueTimeStartTime},' 00:00:00') AS datetime)
@@ -180,7 +181,10 @@
             and a.revenue_time <![CDATA[ <= ]]> CAST(CONCAT(#{param.revenueTimeEndTime},' 23:59:59') AS datetime)
         </if>
         <if test="param.revenueName != null and param.revenueName != ''">
-            and a.revenue_name = #{revenueName}
+            and a.revenue_name = #{param.revenueName}
+        </if>
+        <if test="param.invSourceType != null and param.invSourceType != ''">
+            and a.inv_source_type = #{param.invSourceType}
         </if>
 
     </select>
@@ -229,6 +233,7 @@
         max_receivable,
         revenue_time,
         revenue_name,
+        inv_source_type,
         CASE WHEN DATEDIFF(NOW(), signing_time) > 90 THEN 2 ELSE inv_source.clearing_state END as clearing_state,
         insurance_clearing_state
         from inv_source
@@ -276,5 +281,8 @@
         <if test="param.revenueName != null and param.revenueName != ''">
             and a.revenue_name = #{revenueName}
         </if>
+        <if test="param.invSourceType != null and param.invSourceType != ''">
+            and a.inv_source_type = #{invSourceType}
+        </if>
     </select>
 </mapper>