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

Merge remote-tracking branch 'origin/master'

bifrons 2 лет назад
Родитель
Сommit
967246f284
75 измененных файлов с 3403 добавлено и 521 удалено
  1. 46 0
      src/main/java/com/ydtech/constants/enums/dict/organization/OrganizationSource.java
  2. 47 0
      src/main/java/com/ydtech/constants/enums/inv/InsAccountOperateEnum.java
  3. 44 0
      src/main/java/com/ydtech/constants/enums/inv/InvPayMethodEnum.java
  4. 31 0
      src/main/java/com/ydtech/modules/admin/controller/SysUserRecruitingController.java
  5. 2 2
      src/main/java/com/ydtech/modules/admin/controller/UpdownLoadController.java
  6. 14 0
      src/main/java/com/ydtech/modules/admin/service/SysUserRecruitingService.java
  7. 31 0
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserRecruitingServiceImpl.java
  8. 1 6
      src/main/java/com/ydtech/modules/admin/service/impl/SysUserServiceImpl.java
  9. 8 2
      src/main/java/com/ydtech/modules/fee/service/FeeRuleSchemeService.java
  10. 62 0
      src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java
  11. 10 2
      src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java
  12. 25 7
      src/main/java/com/ydtech/modules/fnc/controller/InsPlySettleController.java
  13. 12 1
      src/main/java/com/ydtech/modules/fnc/dao/InsPlySettleMapper.java
  14. 4 0
      src/main/java/com/ydtech/modules/fnc/entity/InsPlySettle.java
  15. 1 1
      src/main/java/com/ydtech/modules/fnc/entity/InsPlySettleHx.java
  16. 4 2
      src/main/java/com/ydtech/modules/fnc/service/InsPlySettleService.java
  17. 45 13
      src/main/java/com/ydtech/modules/fnc/service/impl/InsPlySettleServiceImpl.java
  18. 2 2
      src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java
  19. 2 2
      src/main/java/com/ydtech/modules/fnc/vo/InsPlySettleVo.java
  20. 0 24
      src/main/java/com/ydtech/modules/ins/utils/EasyExcelUtils.java
  21. 76 0
      src/main/java/com/ydtech/modules/inv/controller/InvAccountController.java
  22. 80 0
      src/main/java/com/ydtech/modules/inv/controller/InvAccountExpensesController.java
  23. 46 0
      src/main/java/com/ydtech/modules/inv/controller/InvAccountOperateController.java
  24. 124 0
      src/main/java/com/ydtech/modules/inv/controller/invAccountExcelController.java
  25. 22 0
      src/main/java/com/ydtech/modules/inv/dao/InvAccountExcelMapper.java
  26. 24 0
      src/main/java/com/ydtech/modules/inv/dao/InvAccountExpensesMapper.java
  27. 23 0
      src/main/java/com/ydtech/modules/inv/dao/InvAccountMapper.java
  28. 23 0
      src/main/java/com/ydtech/modules/inv/dao/InvAccountOperateMapper.java
  29. 265 0
      src/main/java/com/ydtech/modules/inv/model/InvAccount.java
  30. 203 0
      src/main/java/com/ydtech/modules/inv/model/InvAccountExcel.java
  31. 90 0
      src/main/java/com/ydtech/modules/inv/model/InvAccountExpenses.java
  32. 114 0
      src/main/java/com/ydtech/modules/inv/model/InvAccountOperate.java
  33. 22 0
      src/main/java/com/ydtech/modules/inv/service/InvAccountExcelService.java
  34. 21 0
      src/main/java/com/ydtech/modules/inv/service/InvAccountExpensesService.java
  35. 18 0
      src/main/java/com/ydtech/modules/inv/service/InvAccountOperateService.java
  36. 23 0
      src/main/java/com/ydtech/modules/inv/service/InvAccountService.java
  37. 139 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountExcelServiceImpl.java
  38. 78 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountExpensesServiceImpl.java
  39. 88 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountOperateServiceImpl.java
  40. 164 0
      src/main/java/com/ydtech/modules/inv/service/impl/InvAccountServiceImpl.java
  41. 72 0
      src/main/java/com/ydtech/modules/inv/utils/EasyExcelUtils.java
  42. 241 0
      src/main/java/com/ydtech/modules/inv/utils/TransferUtils.java
  43. 1 1
      src/main/java/com/ydtech/modules/largescreen/controller/DataController.java
  44. 0 15
      src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java
  45. 5 4
      src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java
  46. 18 0
      src/main/java/com/ydtech/modules/order/dao/InsCopyFeeOrderMapper.java
  47. 111 0
      src/main/java/com/ydtech/modules/order/entity/InsCopyFeeOrder.java
  48. 19 5
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/ApprovedRequest.java
  49. 19 5
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/CoverageRequest.java
  50. 13 1
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/QuotedPriceRequest.java
  51. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/RideAccidentQueryRequest.java
  52. 19 2
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/OrderStatusResponse.java
  53. 2 2
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/QuotedPriceResponse.java
  54. 59 32
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/RideAccidentQueryResponse.java
  55. 19 2
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/SubmitResponse.java
  56. 1 1
      src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/SubmitStatusQueryResponse.java
  57. 6 0
      src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerPolicyPrintResponse.java
  58. 39 0
      src/main/java/com/ydtech/modules/order/entity/vo/AdjustFeeDescVo.java
  59. 27 0
      src/main/java/com/ydtech/modules/order/entity/vo/AuditOrderFeeVo.java
  60. 5 0
      src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java
  61. 2 0
      src/main/java/com/ydtech/modules/order/entity/vo/QueryOrderFeeVo.java
  62. 44 0
      src/main/java/com/ydtech/modules/order/service/InsCopyFeeOrderService.java
  63. 3 2
      src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java
  64. 52 0
      src/main/java/com/ydtech/modules/order/service/impl/InsCopyFeeOrderServiceImpl.java
  65. 8 0
      src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java
  66. 2 2
      src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java
  67. 51 19
      src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java
  68. 69 0
      src/main/java/com/ydtech/modules/xxl/handler/InvAccountHandler.java
  69. 0 362
      src/main/resources/application-dev.yml
  70. 124 0
      src/main/resources/mapper/modules/inv/InvAccountExcelMapper.xml
  71. 43 0
      src/main/resources/mapper/modules/inv/InvAccountExpensesMapper.xml
  72. 210 0
      src/main/resources/mapper/modules/inv/InvAccountMapper.xml
  73. 57 0
      src/main/resources/mapper/modules/inv/InvAccountOperateMapper.xml
  74. 26 0
      src/main/resources/mapper/modules/order/InsCopyFeeOrder.xml
  75. BIN
      资金申请单模板.xlsx

+ 46 - 0
src/main/java/com/ydtech/constants/enums/dict/organization/OrganizationSource.java

@@ -0,0 +1,46 @@
+package com.ydtech.constants.enums.dict.organization;
+
+
+import com.ydtech.aop.request.DictEnum;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @description: 新车判断单位
+ * @author: wenks
+ * @date: 2023/11/23 17:41
+ **/
+@AllArgsConstructor
+@Getter
+@DictEnum(key = "organizationSource", desc = "机构来源")
+public enum OrganizationSource {
+
+    OS_1("1", "渠道", 0, 0),
+    OS_2("2", "个代", 1, 0),
+    OS_3("3", "服务", 2, 0);
+
+    // 编号
+    private final String code;
+    // 说明
+    private final String desc;
+    // 排序
+    private final Integer sort;
+    // 状态  0 启用  1 不启用
+    private final Integer status;
+
+    @AllArgsConstructor
+    @Getter
+    public enum Source {
+
+        S_1("2", "出单员"),
+        S_2("1", "个代");
+
+        public static final String NAME = "S_";
+        // 编号
+        private final String code;
+        // 说明
+        private final String desc;
+    }
+
+
+}

+ 47 - 0
src/main/java/com/ydtech/constants/enums/inv/InsAccountOperateEnum.java

@@ -0,0 +1,47 @@
+package com.ydtech.constants.enums.inv;
+
+import com.ydtech.aop.request.DictEnum;
+import com.ydtech.utils.StringUtils;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author jianlong
+ * @date 2024-01-05 11:46
+ */
+@Getter
+@AllArgsConstructor
+@DictEnum(key = "InvAccount", desc = "资金用途")
+public enum InsAccountOperateEnum {
+
+    FISCALPROFIT("0", "财税公司利润"),
+
+    INSURANCEPROFIT("1","保险公司回款"),
+
+
+    CLEARINGPROFIT("2","结算卡"),
+
+    EXTERIORPROFIT("3","外部过账金额"),
+
+    PARKPROFIT("4","园区利润"),
+
+    TIANQINGPROFIT("5","天勤利润"),
+
+    OTHERPROFIT("6","其他利润");
+
+    private final String code;
+
+    private final String desc;
+
+    public static String getNameByCode(String code) {
+        if (StringUtils.isEmpty(code)) {
+            return null;
+        }
+        for (InsAccountOperateEnum value : values()) {
+            if (value.getCode().equals(code)) {
+                return value.getDesc();
+            }
+        }
+        return code;
+    }
+}

+ 44 - 0
src/main/java/com/ydtech/constants/enums/inv/InvPayMethodEnum.java

@@ -0,0 +1,44 @@
+package com.ydtech.constants.enums.inv;
+
+import com.ydtech.aop.request.DictEnum;
+import com.ydtech.utils.StringUtils;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author jianlong
+ * @date 2024-01-15 10:02
+ */
+@Getter
+@AllArgsConstructor
+@DictEnum(key = "InvAccount", desc = "资金用途")
+public enum InvPayMethodEnum {
+
+    //支付方式(0现金 1微信 2转账 3其他)
+
+    CASH("0", "现金"),
+
+    WECHAT("1","微信"),
+
+
+    TRANSFER("2","转账"),
+
+    QITA("3","其他");
+
+    private final String code;
+
+    private final String desc;
+
+
+    public static String getNameByCode(String code) {
+        if (StringUtils.isEmpty(code)) {
+            return null;
+        }
+        for (InvPayMethodEnum value : values()) {
+            if (value.getCode().equals(code)) {
+                return value.getDesc();
+            }
+        }
+        return code;
+    }
+}

+ 31 - 0
src/main/java/com/ydtech/modules/admin/controller/SysUserRecruitingController.java

@@ -0,0 +1,31 @@
+package com.ydtech.modules.admin.controller;
+
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.admin.service.SysUserRecruitingService;
+import com.ydtech.modules.base.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "增员管理")
+@RestController
+@RequestMapping("/recruiting")
+@RequiredArgsConstructor
+public class SysUserRecruitingController {
+
+    private final SysUserRecruitingService sysUserRecruitingService;
+
+    @GetMapping("/queryType")
+    @ApiOperation("机构来源查询")
+    public HttpResult<Object> queryType(){
+        SysUser user = new BaseController().getUser();
+        String deptId = user.getDeptId();
+        return sysUserRecruitingService.queryType(deptId);
+    }
+
+}

+ 2 - 2
src/main/java/com/ydtech/modules/admin/controller/UpdownLoadController.java

@@ -35,7 +35,7 @@ public class UpdownLoadController {
     @ApiResponses({@ApiResponse(code = 500, message = "出现异常"), @ApiResponse(code = 200, message = "请求成功")})
     @RequestMapping(value = "/uploadFiles", method = RequestMethod.POST)
     public HttpResult upload(@RequestParam("files") MultipartFile[] files, @RequestParam(value = "path", required = false) String path) throws IOException {
-        HttpResult result = null;
+        HttpResult result;
         try {
             result = updownLoadService.upload(files, path);
         } catch (Exception e) {
@@ -51,7 +51,7 @@ public class UpdownLoadController {
     @ApiImplicitParams({@ApiImplicitParam(name = "files", value = "MultipartFile文件"), @ApiImplicitParam(name = "dirid", value = "文件夹id")})
     @ApiResponses({@ApiResponse(code = 500, message = "出现异常"), @ApiResponse(code = 200, message = "请求成功")})
     @RequestMapping(value = "/uploadFilesByDirId", method = RequestMethod.POST)
-    public HttpResult uploadFilesByDirId(@RequestParam("files") MultipartFile[] files, @RequestParam(value = "dirid") String dirid) throws IOException {
+    public HttpResult uploadFilesByDirId(@RequestParam("files") MultipartFile[] files, @RequestParam(value = "dirid") String dirid) {
         HttpResult result = null;
         try {
             result = updownLoadService.uploadFilesByDirId(files, dirid);

+ 14 - 0
src/main/java/com/ydtech/modules/admin/service/SysUserRecruitingService.java

@@ -0,0 +1,14 @@
+package com.ydtech.modules.admin.service;
+
+import com.ydtech.core.page.HttpResult;
+
+public interface SysUserRecruitingService {
+
+    /**
+     * 查询机构来源
+     * @param deptId 渠道id
+     * @return
+     */
+    HttpResult<Object> queryType(String deptId);
+
+}

+ 31 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysUserRecruitingServiceImpl.java

@@ -0,0 +1,31 @@
+package com.ydtech.modules.admin.service.impl;
+
+
+import com.ydtech.constants.enums.dict.organization.OrganizationSource;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.SysDept;
+import com.ydtech.modules.admin.service.SysDeptService;
+import com.ydtech.modules.admin.service.SysUserRecruitingService;
+import com.ydtech.modules.protocol.utils.AssertionUtils;
+import com.ydtech.utils.StringUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+@Service
+@RequiredArgsConstructor
+public class SysUserRecruitingServiceImpl implements SysUserRecruitingService {
+
+    private final SysDeptService sysDeptService;
+
+    @Override
+    public HttpResult<Object> queryType(String deptId) {
+        SysDept sysDept = sysDeptService.getById(deptId);
+        // 查询上级机构个代还是出单员
+        String parentId = sysDept.getParentId();
+        SysDept sysDeptParent = sysDeptService.getById(parentId);
+        String managementSource = sysDeptParent.getManagementSource();
+        AssertionUtils.isFail(StringUtils.isEmpty(managementSource), "此机构暂时不支持增员");
+        OrganizationSource.Source source = Enum.valueOf(OrganizationSource.Source.class, OrganizationSource.Source.NAME + managementSource);
+        return HttpResult.ok(source.getDesc(), source.getCode());
+    }
+}

+ 1 - 6
src/main/java/com/ydtech/modules/admin/service/impl/SysUserServiceImpl.java

@@ -100,12 +100,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
             LambdaQueryWrapper<SysMenu> lqw = new LambdaQueryWrapper<>();
             lqw.isNotNull(SysMenu::getPerms);
             lqw.select(SysMenu::getPerms);
-            lsPerms = sysMenuService.listObjs(lqw, new Function<Object, String>() {
-                @Override
-                public String apply(Object id) {
-                    return id.toString();
-                }
-            });
+            lsPerms = sysMenuService.listObjs(lqw, id -> id.toString());
 
         } else {
 

+ 8 - 2
src/main/java/com/ydtech/modules/fee/service/FeeRuleSchemeService.java

@@ -1,8 +1,6 @@
 package com.ydtech.modules.fee.service;
 
 
-import com.ydtech.modules.fee.dto.FeeSchemeReqDto;
-import com.ydtech.modules.fee.dto.FeeSchemeResDto;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.entity.vo.BaseQuoteInfoVo;
 import com.ydtech.modules.order.entity.vo.QueryOrderFeeResultVo;
@@ -33,4 +31,12 @@ public interface FeeRuleSchemeService {
     public QueryOrderFeeVo queryFeeOrderInfo(String companyId);
 
     public List<QueryOrderFeeResultVo> convertOrderFeeVoData(QueryOrderFeeVo orderFeeVo);
+
+    /**
+     * 比较和更新总费用比例
+     * @param insOrderNo
+     * @param jqCostsProportionStr
+     * @param syCostsProportionStr
+     */
+    void compareAndUpdateFeeOrderInfo(String insOrderNo ,String jqCostsProportionStr,String syCostsProportionStr,String dealUser);
 }

+ 62 - 0
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java

@@ -18,10 +18,12 @@ import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.vo.KindInfoVo;
 import com.ydtech.modules.ins.model.vo.QuoteRespVo;
 import com.ydtech.modules.order.entity.InsAreaCompany;
+import com.ydtech.modules.order.entity.InsCopyFeeOrder;
 import com.ydtech.modules.order.entity.InsFeeOrder;
 import com.ydtech.modules.order.entity.InsOrders;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.service.InsAreaCompanyService;
+import com.ydtech.modules.order.service.InsCopyFeeOrderService;
 import com.ydtech.modules.order.service.InsFeeOrderService;
 import com.ydtech.modules.order.service.InsOrdersService;
 import com.ydtech.modules.protocol.entity.po.*;
@@ -51,6 +53,8 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
     @Resource
     private InsFeeOrderService insFeeOrderService;
     @Resource
+    private InsCopyFeeOrderService insCopyFeeOrderService;
+    @Resource
     private SysUserService sysUserService;
     @Resource
     private SysDeptService sysDeptService;
@@ -1291,6 +1295,43 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         }
         insFeeOrderService.insertCompanyAndOrders(insFeeOrder);
     }
+    public void compareAndUpdateFeeOrderInfo( String insOrderNo,String jqCostsProportionStr,String syCostsProportionStr ,String dealUser){
+        InsFeeOrder insFeeOrder = insFeeOrderService.getByInsOrderNo(insOrderNo);
+        InsCopyFeeOrder insCopyFeeOrder = new InsCopyFeeOrder(insFeeOrder,insOrderNo,dealUser);
+        boolean updateFlag = false;
+        if(insFeeOrder.getJqPremium().doubleValue()>0 && StringUtils.isNotEmpty(jqCostsProportionStr)){
+            BigDecimal JqCostsProportion = new BigDecimal(jqCostsProportionStr);
+            //比较传入的交强总费用比例是否与原费用比例相等,不相等进行更新
+            if(JqCostsProportion.compareTo(insFeeOrder.getJqCostsProportion())!=0){
+                updateFlag = true;
+                //交强总费用比例
+                insFeeOrder.setJqCostsProportion(JqCostsProportion);
+                //交强险总费用
+                insFeeOrder.setJqCostsPremiums(getPremium(insFeeOrder.getJqNoTaxPremium(),insFeeOrder.getJqCostsProportion()));
+
+                insCopyFeeOrder.setJqCostsProportion(insFeeOrder.getJqCostsProportion());
+                insCopyFeeOrder.setJqCostsPremiums(insFeeOrder.getJqCostsPremiums());
+            }
+        }
+        if(insFeeOrder.getSyPremium().doubleValue()>0 && StringUtils.isNotEmpty(syCostsProportionStr)){
+            BigDecimal SyCostsProportion = new BigDecimal(syCostsProportionStr);
+            //比较传入的商业总费用比例是否与原费用比例相等,不相等进行更新
+            if(SyCostsProportion.compareTo(insFeeOrder.getSyCostsProportion())!=0){
+                updateFlag = true;
+                //商业总费用比例
+                insFeeOrder.setSyCostsProportion(SyCostsProportion);
+                //商业险总费用
+                insFeeOrder.setSyCostsPremiums(getPremium(insFeeOrder.getSyNoTaxPremium(),insFeeOrder.getSyCostsProportion()));
+
+                insCopyFeeOrder.setSyCostsProportion(insFeeOrder.getSyCostsProportion());
+                insCopyFeeOrder.setSyCostsPremiums(insFeeOrder.getSyCostsPremiums());
+            }
+        }
+        if(updateFlag){
+            insFeeOrderService.updateById(insFeeOrder);
+            insCopyFeeOrderService.insertCompanyAndOrders(insCopyFeeOrder);
+        }
+    }
 
     private BigDecimal getPremium(BigDecimal noTaxPremium,BigDecimal costsProportion){
         BigDecimal premium = new BigDecimal(0);
@@ -1313,6 +1354,7 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         OrderFeeVo jqOrderFeeVo = new OrderFeeVo();
         OrderFeeVo syOrderFeeVo = new OrderFeeVo();
         OrderFeeVo fcOrderFeeVo = new OrderFeeVo();
+        AdjustFeeDescVo adjustFeeDescVo=new AdjustFeeDescVo();//费用审核时使用
         InsAreaCompany insAreaCompany = insAreaCompanyService.getByIdIsExist(companyId);
         InsFeeOrder insFeeOrder = insFeeOrderService.getByInsOrderNo(insAreaCompany.getId());
 
@@ -1355,6 +1397,26 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
             queryOrderFeeVo.setSyCoderFeeVo(syOrderFeeVo);
             queryOrderFeeVo.setFcCoderFeeVo(fcOrderFeeVo);
             queryOrderFeeVo.setOrderCommissionVo(orderCommissionVo);
+            //添加费用审核时 使用参数
+            if(insFeeOrder.getJqPremium()!=null && insFeeOrder.getJqPremium().doubleValue()>0 ){
+                adjustFeeDescVo.setJqPremium(convertToString(insFeeOrder.getJqNoTaxPremium()));
+                adjustFeeDescVo.setJqCommissionRate(convertToString(insFeeOrder.getJqSuperviseCostsProportion()));
+                adjustFeeDescVo.setJqCommissionAmount(convertToString(insFeeOrder.getJqSuperviseCostsPremiums()));
+                adjustFeeDescVo.setJqOtherFeeRate(convertToString(insFeeOrder.getJqCostsProportion().subtract(insFeeOrder.getJqSuperviseCostsProportion())));
+                adjustFeeDescVo.setJqOtherFeeAmount(convertToString(insFeeOrder.getJqCostsPremiums().subtract(insFeeOrder.getJqSuperviseCostsPremiums())));
+                adjustFeeDescVo.setJqAllFeeRate(convertToString(insFeeOrder.getJqCostsProportion()));
+                adjustFeeDescVo.setJqAllFeeAmount(convertToString(insFeeOrder.getJqCostsPremiums()));
+            }
+            if(insFeeOrder.getSyPremium()!=null && insFeeOrder.getSyPremium().doubleValue()>0){
+                adjustFeeDescVo.setSyPremium(convertToString(insFeeOrder.getSyNoTaxPremium()));
+                adjustFeeDescVo.setSyCommissionRate(convertToString(insFeeOrder.getSySuperviseCostsProportion()));
+                adjustFeeDescVo.setSyCommissionAmount(convertToString(insFeeOrder.getSySuperviseCostsPremiums()));
+                adjustFeeDescVo.setSyOtherFeeRate(convertToString(insFeeOrder.getSyCostsProportion().subtract(insFeeOrder.getSySuperviseCostsProportion())));
+                adjustFeeDescVo.setSyOtherFeeAmount(convertToString(insFeeOrder.getSyCostsPremiums().subtract(insFeeOrder.getSySuperviseCostsPremiums())));
+                adjustFeeDescVo.setSyAllFeeRate(convertToString(insFeeOrder.getSyCostsProportion()));
+                adjustFeeDescVo.setSyAllFeeAmount(convertToString(insFeeOrder.getSyCostsPremiums()));
+            }
+            queryOrderFeeVo.setAdjustFeeDescVo(adjustFeeDescVo);
         }
         return queryOrderFeeVo;
     }

+ 10 - 2
src/main/java/com/ydtech/modules/fnc/controller/CarSettleController.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.fnc.controller;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.fee.service.FeeRuleSchemeService;
 import com.ydtech.modules.fnc.entity.InsFeeAudit;
 import com.ydtech.modules.fnc.service.InsFeeAuditService;
 import com.ydtech.modules.order.entity.*;
@@ -26,14 +27,16 @@ public class CarSettleController extends BaseController {
     private final InsAreaCompanyService insAreaCompanyService;
 
     private final InsFeeAuditService insFeeAuditService;
+    private final FeeRuleSchemeService feeRuleSchemeService;
 
 
 
-    public CarSettleController(InsAreaCompanyService insAreaCompanyService, InsOrdersService insOrdersService, InsFeeAuditService insFeeAuditService) {
+    public CarSettleController(InsAreaCompanyService insAreaCompanyService, InsOrdersService insOrdersService, InsFeeAuditService insFeeAuditService,FeeRuleSchemeService feeRuleSchemeService) {
 
         this.insAreaCompanyService = insAreaCompanyService;
         this.insOrdersService = insOrdersService;
         this.insFeeAuditService = insFeeAuditService;
+        this.feeRuleSchemeService = feeRuleSchemeService;
 
     }
 
@@ -74,7 +77,8 @@ public class CarSettleController extends BaseController {
      */
     @PostMapping("/auditFee")
     @ApiOperation(value = "[3]费用审核")
-    public HttpResult auditFee(@RequestSingleParam(value = "orderNo") String orderNo) {
+    public HttpResult auditFee(@RequestBody @Valid AuditOrderFeeVo auditOrderFeeVo) {
+        String orderNo = auditOrderFeeVo.getOrderNo();
         //查询改订单是已审核
         List<InsFeeAudit> feeList =insFeeAuditService.query().eq("orderno",orderNo).list();
         if(feeList!=null &&feeList.size()>0){
@@ -86,6 +90,10 @@ public class CarSettleController extends BaseController {
                 .eq("orderstatus","3").list();//3已承保
         if(areaList!=null && areaList.size()>0){
             try{
+                if("1".equals(auditOrderFeeVo.getUpdateFlag())){
+                    String userId = getUserId();
+                    feeRuleSchemeService.compareAndUpdateFeeOrderInfo( areaList.get(0).getId(),auditOrderFeeVo.getJqCostsProportionStr(),auditOrderFeeVo.getSyCostsProportionStr(),userId);
+                }
                 insFeeAuditService.feeAudit( orderNo, areaList.get(0).getId());
             }catch (Exception e){
                 e.printStackTrace();

+ 25 - 7
src/main/java/com/ydtech/modules/fnc/controller/InsPlySettleController.java

@@ -4,7 +4,6 @@ import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.fnc.entity.InsPlyIncome;
 import com.ydtech.modules.fnc.entity.InsPlySettle;
-import com.ydtech.modules.fnc.entity.InsPlySettleDetail;
 import com.ydtech.modules.fnc.entity.InsPlySettleHx;
 import com.ydtech.modules.fnc.service.InsPlyIncomeService;
 import com.ydtech.modules.fnc.service.InsPlySettleService;
@@ -14,14 +13,12 @@ import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
 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.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 import java.util.List;
 
@@ -67,12 +64,12 @@ public class InsPlySettleController extends BaseController {
      */
     @ApiOperation(value = "[2]结算单生成页面--结算单生成")
     @PostMapping("/generateSettle")
-    public HttpResult generateSettleAndDetail(@RequestBody List<InsPlyIncome> plyList){
+    public HttpResult generateSettleAndDetail(@RequestBody List<String> plyNoList){
 
         HttpResult result = null;
         try {
 
-            result = insPlySettleService.generateSettleAndDetail(plyList);
+            result = insPlySettleService.generateSettleAndDetail(plyNoList);
         } catch (Exception e) {
             result = HttpResult.error("结算单生成失败!"+e.getMessage());
             e.printStackTrace();
@@ -104,16 +101,37 @@ public class InsPlySettleController extends BaseController {
      * @return
      */
     @ApiOperation(value = "[5]结算单核销")
-    @PostMapping("/enterSettle")
+    @PostMapping("/hxSettle")
     public HttpResult enterSettle( @RequestBody InsPlySettleHx insPlySettleHx){
 
         HttpResult result = null;
         try {
-            result = insPlySettleService.enterSettle(insPlySettleHx);
+            result = insPlySettleService.hxSettle(insPlySettleHx);
         } catch (Exception e) {
             result = HttpResult.error("结算单确认时发生错误!"+e.getMessage());
             e.printStackTrace();
         }
         return result;
     }
+    /**
+     *结算单核销明细查询
+     * @return
+     */
+    @ApiOperation(value = "[6]结算单核销明细查询")
+    @PostMapping("/queryHxDetail")
+    public HttpResult queryHxDetail( @RequestBody InsPlySettleHx insPlySettleHx){
+
+        HttpResult result = null;
+        try {
+            String settleno=insPlySettleHx.getSettleno();
+            if(StringUtils.isNullOrEmpty(settleno)){
+                return HttpResult.error("settleno不能为空");
+            }
+            result = insPlySettleService.queryHxDetail(settleno);
+        } catch (Exception e) {
+            result = HttpResult.error("系统错误!"+e.getMessage());
+            e.printStackTrace();
+        }
+        return result;
+    }
 }

+ 12 - 1
src/main/java/com/ydtech/modules/fnc/dao/InsPlySettleMapper.java

@@ -26,10 +26,11 @@ public interface InsPlySettleMapper extends BaseMapper<InsPlySettle> {
     String getMaxBatch(InsPlySettle insPlySettle);
 
     @Select({"<script>"," " +
-            "select a.*,b.`name` dept_name ,c.`name` companyName " +
+            "select a.*,b.`name` dept_name ,c.`name` companyName,d.hxamount " +
             "from ins_ply_settle a " +
             "left join sys_dept b on a.dept_id=b.id " +
             "left join esm_ins_company c on a.company_id=c.id " +
+            "left join (select t.settleno,SUM(amount) hxamount from ins_ply_settle_hx t group by t.settleno ) d on d.settleno=a.settleno " +
             "where 1=1 " +
             "<if test='startDate!=\"\" and endDate!=\"\" and startDate!=null and endDate!=null'>" +
             "and DATE_FORMAT(a.create_time, '%Y-%m-%d') " +
@@ -45,5 +46,15 @@ public interface InsPlySettleMapper extends BaseMapper<InsPlySettle> {
     )
     List<InsPlySettle> selectByCondition(InsPlySettleVo insPlySettleVo);
 
+    @Select({
+            "select a.*,b.`name` dept_name ,c.`name` companyName,d.hxamount " +
+            "from ins_ply_settle a " +
+            "left join sys_dept b on a.dept_id=b.id " +
+            "left join esm_ins_company c on a.company_id=c.id " +
+            "left join (select t.settleno,SUM(amount) hxamount from ins_ply_settle_hx t group by t.settleno ) d on d.settleno=a.settleno " +
+            "where a.settleno =#{settleno}"
+            }
+    )
+    InsPlySettle selectBySettleno(String settleno);
 
 }

+ 4 - 0
src/main/java/com/ydtech/modules/fnc/entity/InsPlySettle.java

@@ -58,6 +58,10 @@ public class InsPlySettle implements Serializable {
     @TableField("all_fee_value")
     private BigDecimal allFeeValue;
 
+    @ApiModelProperty("核销金额")
+    @TableField(exist = false)
+    private BigDecimal hxamount;
+
     @ApiModelProperty("机构")
     @TableField("dept_id")
     private String deptId;

+ 1 - 1
src/main/java/com/ydtech/modules/fnc/entity/InsPlySettleHx.java

@@ -31,7 +31,7 @@ public class InsPlySettleHx implements Serializable {
     @TableField("settleno")
     private String settleno;
 
-    @ApiModelProperty("核销费用类型(手续费、其他费用、手续费+其他费用)")
+    @ApiModelProperty("核销费用类型(S手续费、O其他费用、A手续费+其他费用)")
     @TableField("fee_type")
     private String feeType;
 

+ 4 - 2
src/main/java/com/ydtech/modules/fnc/service/InsPlySettleService.java

@@ -22,12 +22,14 @@ import java.util.List;
  */
 public interface InsPlySettleService extends IService<InsPlySettle> {
 
-    public HttpResult generateSettleAndDetail(List<InsPlyIncome> plyList);
+    public HttpResult generateSettleAndDetail(List<String> plyNoList);
 
     public HttpResult<BasePageResult<InsPlySettle>> selectSettle(InsPlySettleVo insPlySettle);
 
     public HttpResult<BasePageResult<InsPlyIncome>> selectSettleDetail(InsPlySettleVo insPlySettle);
 
-    public HttpResult enterSettle(InsPlySettleHx insPlySettle);
+    public HttpResult hxSettle(InsPlySettleHx insPlySettle);
+
+    public HttpResult queryHxDetail(String settleno);
 
 }

+ 45 - 13
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlySettleServiceImpl.java

@@ -1,12 +1,14 @@
 package com.ydtech.modules.fnc.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
 import com.ydtech.modules.fnc.dao.InsPlySettleDetailMapper;
+import com.ydtech.modules.fnc.dao.InsPlySettleHxMapper;
 import com.ydtech.modules.fnc.entity.InsPlyIncome;
 import com.ydtech.modules.fnc.entity.InsPlySettle;
 import com.ydtech.modules.fnc.dao.InsPlySettleMapper;
@@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.sql.Wrapper;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.YearMonth;
@@ -46,22 +49,24 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
     private InsPlySettleDetailMapper insPlySettleDetailMapper;
     @Autowired
     private InsPlyIncomeMapper insPlyIncomeMapper;
-
+    @Autowired
+    private InsPlySettleHxMapper insPlySettleHxMapper;
     @Override
     @Transactional
-    public HttpResult generateSettleAndDetail(List<InsPlyIncome> plyList) {
+    public HttpResult generateSettleAndDetail(List<String> plyNoList) {
 
         String settleno = "";
         BigDecimal commissionFeevalue=new BigDecimal(0);
         BigDecimal otherFeevalue=new BigDecimal(0);
         BigDecimal allFeeValue=new BigDecimal(0);
-        if(plyList==null || plyList.size()==0){
+        if(plyNoList==null || plyNoList.size()==0){
             return HttpResult.error("结算清单不能传空");
         }
         // 生成结算单号
-        settleno = plyList.get(0).getCompanyId()+ DateUtil.yyyyMMddHHmmss(new Date());
-        for(InsPlyIncome insPlyIncome_tmp:plyList){
-            InsPlyIncome insPlyIncome=insPlyIncomeMapper.selectByPlyno(insPlyIncome_tmp.getPolicyno());
+        InsPlyIncome insPlyIncome_t=insPlyIncomeMapper.selectByPlyno(plyNoList.get(0));
+        settleno = insPlyIncome_t.getCompanyId()+ DateUtil.yyyyMMddHHmmss(new Date());
+        for(String plyNo:plyNoList){
+            InsPlyIncome insPlyIncome=insPlyIncomeMapper.selectByPlyno(plyNo);
             InsPlySettleDetail insPlySettleDetail =new InsPlySettleDetail();
             insPlySettleDetail.setSettleno(settleno);
             insPlySettleDetail.setOrderno(insPlyIncome.getOrderno());
@@ -73,8 +78,10 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
             insPlySettleDetail.setCreateTime(LocalDateTime.now());
             insPlySettleDetailMapper.insert(insPlySettleDetail);
             //修改ins_ply_income
-            insPlyIncome.setDoingFeeValue(insPlyIncome.getAllFeeValue());
-            insPlyIncomeMapper.updateById(insPlyIncome);
+            insPlyIncome.setFinalFeeValue(insPlyIncome.getAllFeeValue());
+            LambdaQueryWrapper<InsPlyIncome> queryWrapper=new LambdaQueryWrapper();
+            queryWrapper.eq(InsPlyIncome::getPolicyno,plyNo);
+            insPlyIncomeMapper.update(insPlyIncome,queryWrapper);
 
             commissionFeevalue=commissionFeevalue.add(insPlyIncome.getCommissionFeevalue());
             otherFeevalue=otherFeevalue.add(insPlyIncome.getOtherFeevalue());
@@ -82,9 +89,9 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
         }
         InsPlySettle insPlySettle =new InsPlySettle();
         insPlySettle.setSettleno(settleno);
-        insPlySettle.setCompanyId(plyList.get(0).getCompanyId());
-        insPlySettle.setDeptId(plyList.get(0).getDeptId());
-        insPlySettle.setSettleMonth(YearMonth.from(plyList.get(0).getPayDate()).toString());
+        insPlySettle.setCompanyId(insPlyIncome_t.getCompanyId());
+        insPlySettle.setDeptId(insPlyIncome_t.getDeptId());
+        insPlySettle.setSettleMonth(YearMonth.from(insPlyIncome_t.getPayDate()).toString());
         String settleBatch =this.baseMapper.getMaxBatch(insPlySettle);
         if(StringUtils.isNullOrEmpty(settleBatch)){
             settleBatch="1";
@@ -134,7 +141,32 @@ public class InsPlySettleServiceImpl extends ServiceImpl<InsPlySettleMapper, Ins
         }
     }
     @Override
-    public HttpResult enterSettle(InsPlySettleHx insPlySettle) {
-        return null;
+    public HttpResult hxSettle(InsPlySettleHx insPlySettleHx) {
+
+        //必填校验
+        if(StringUtils.isNullOrEmpty(insPlySettleHx.getSettleno())
+        ||StringUtils.isNullOrEmpty(insPlySettleHx.getFeeType())
+        ||StringUtils.isNullOrEmpty(insPlySettleHx.getCheckno())
+        ||StringUtils.isNullOrEmpty(insPlySettleHx.getAmount())){
+            return HttpResult.error("结算单号、费用类型、核销金额、发票号不能为空");
+        }
+        //核销金额不能超总费用
+        InsPlySettle insPlySettle=this.baseMapper.selectBySettleno(insPlySettleHx.getSettleno());
+        insPlySettle.setHxamount(insPlySettle.getHxamount() ==null ? BigDecimal.ZERO:insPlySettle.getHxamount());
+        if(insPlySettle.getHxamount().add(insPlySettleHx.getAmount()).compareTo(insPlySettle.getAllFeeValue())>0){
+            return HttpResult.error("核销金额已超过总费用,请修改");
+        }
+
+        insPlySettleHx.setOperator(StpUtil.getLoginId().toString());
+        insPlySettleHx.setCreateTime(LocalDateTime.now());
+        insPlySettleHxMapper.insert(insPlySettleHx);
+        return HttpResult.ok("核销成功");
+    }
+    @Override
+    public HttpResult queryHxDetail(String settleno) {
+        LambdaQueryWrapper<InsPlySettleHx> queryWrapper=new LambdaQueryWrapper();
+        queryWrapper.eq(InsPlySettleHx::getSettleno,settleno);
+        List<InsPlySettleHx> list=insPlySettleHxMapper.selectList(queryWrapper);
+        return HttpResult.ok(list);
     }
 }

+ 2 - 2
src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java

@@ -65,9 +65,9 @@ public class InsPlyIncomeVo implements Serializable {
     @ApiModelProperty(value = "每页页数")
     @Min(value = 20, message = "页数最小为20")
     @Max(value = 100, message = "页数最大为100")
-    private int pageSize;
+    private int pageSize=20;
 
     @ApiModelProperty(value = "页数")
     @Min(value = 1, message = "页数最小为1")
-    private int pageNum;
+    private int pageNum=1;
 }

+ 2 - 2
src/main/java/com/ydtech/modules/fnc/vo/InsPlySettleVo.java

@@ -74,9 +74,9 @@ public class InsPlySettleVo implements Serializable {
     @ApiModelProperty(value = "每页页数")
     @Min(value = 20, message = "页数最小为20")
     @Max(value = 100, message = "页数最大为100")
-    private int pageSize;
+    private int pageSize=20;
 
     @ApiModelProperty(value = "页数")
     @Min(value = 1, message = "页数最小为1")
-    private int pageNum;
+    private int pageNum=1;
 }

+ 0 - 24
src/main/java/com/ydtech/modules/ins/utils/EasyExcelUtils.java

@@ -1,24 +0,0 @@
-package com.ydtech.modules.ins.utils;
-
-import com.alibaba.excel.EasyExcel;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-/**
- * @author jianlong
- * @date 2023-12-29 16:46
- */
-@Component
-public class EasyExcelUtils {
-
-
-
-    public static String downExcel(String uploadFilePath,Class clz, List<?> list) {
-
-        String file = System.currentTimeMillis() + ".xlsx";
-        String fileName = uploadFilePath + file;
-        EasyExcel.write(fileName, clz).sheet("1").doWrite(list);
-        return file;
-    }
-}

+ 76 - 0
src/main/java/com/ydtech/modules/inv/controller/InvAccountController.java

@@ -0,0 +1,76 @@
+package com.ydtech.modules.inv.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.service.InvAccountService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ *
+ * @author jianlong
+ * @date 2024-01-05 09:31
+ */
+@RequestMapping("/invAccount")
+@RestController
+public class InvAccountController {
+    @Autowired
+    private InvAccountService invAccountService;
+
+    @ApiOperation("获取账户列表")
+    @PostMapping("getAccount")
+    public HttpResult<IPage<InvAccount>> getInsAccountList(@RequestBody InvAccount insAccount){
+        return HttpResult.ok("", invAccountService.selectAccountsList(insAccount));
+    }
+
+    @ApiOperation("获取账户详细信息")
+    @GetMapping("getAccountById")
+    public HttpResult<InvAccount> getInsAccountById(@RequestParam("accountId") String accountId){
+        return HttpResult.ok("", invAccountService.getById(accountId));
+    }
+
+    @ApiOperation("删除账户(只传一个id就行)")
+    @DeleteMapping("{accountId}")
+    public HttpResult deleteInsAccount(@PathVariable("accountId") String accountId){
+        if (accountId!= null){
+            InvAccount invAccount = invAccountService.getById(accountId);
+            invAccount.setDelFlag("1");
+            if (invAccountService.updateInsAccount(invAccount) > 0){
+                return HttpResult.ok("删除成功");
+            }else {
+                return HttpResult.error();
+            }
+        }else {
+            return HttpResult.error("id不能为空");
+        }
+    }
+
+    @ApiOperation("插入账户信息")
+    @PostMapping("insertAccount")
+    public HttpResult insertInsAccount(@RequestBody InvAccount invAccount){
+        if (invAccountService.insertInsAccount(invAccount) > 0){
+            return HttpResult.ok();
+        }else {
+            return HttpResult.error();
+        }
+    }
+
+    @ApiOperation("修改账户信息")
+    @PostMapping("updateAccount")
+    public HttpResult updateInsAccount(@RequestBody InvAccount invAccount){
+        if (invAccountService.updateInsAccount(invAccount) > 0){
+            return HttpResult.ok();
+        }else {
+            return HttpResult.error();
+        }
+    }
+
+    @ApiOperation("根据户名分类")
+    @GetMapping("getAccountByAccountName")
+    public HttpResult selectByAccountName(){
+        return invAccountService.selectByAccountName();
+    }
+}

+ 80 - 0
src/main/java/com/ydtech/modules/inv/controller/InvAccountExpensesController.java

@@ -0,0 +1,80 @@
+package com.ydtech.modules.inv.controller;
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.inv.model.InvAccountExpenses;
+import com.ydtech.modules.inv.service.InvAccountExpensesService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+
+/**
+ * 费用支出明细表
+ * @author jianlong
+ * @date 2024-01-10 18:32
+ */
+@RestController
+@RequestMapping("accountExpense")
+public class InvAccountExpensesController {
+
+    @Autowired
+    private InvAccountExpensesService invAccountExpensesService;
+
+    /**
+     * 增加费用支出明细
+     */
+    @PostMapping("insertAccountExpenses")
+    @ApiOperation("增加费用支出明细")
+    public HttpResult insertInsAccountExpenses(@RequestBody InvAccountExpenses invAccountExpenses) {
+        BaseController baseController = new BaseController();
+        invAccountExpenses.setExpensesId(String.valueOf(new Date().getTime()));
+        invAccountExpenses.setCreateBy(baseController.getUserName());
+        invAccountExpenses.setCreateTime(new Date());
+
+        return HttpResult.ok("",invAccountExpensesService.save(invAccountExpenses));
+    }
+    /**
+     * 修改费用支出明细表
+     */
+    @PostMapping("updateAccountExpenses")
+    @ApiOperation("修改费用支出明细表")
+    public HttpResult updateInsAccountExpenses(@RequestBody InvAccountExpenses invAccountExpenses) {
+        BaseController baseController = new BaseController();
+        invAccountExpenses.setUpdateBy(baseController.getUserName());
+        invAccountExpenses.setUpdateTime(new Date());
+        return HttpResult.ok("",invAccountExpensesService.updateById(invAccountExpenses));
+    }
+    /**
+     * 删除费用支出明细表
+     */
+    @DeleteMapping("deleteAccountExpenses")
+    @ApiOperation("删除费用支出明细表")
+    public HttpResult deleteInsAccountExpenses(@RequestParam("id") String id) {
+        return HttpResult.ok("",invAccountExpensesService.removeById(id));
+    }
+    /**
+     * 获取费用支出明细表详情
+     */
+    @GetMapping("getAccountExpensesDetail")
+    @ApiOperation("获取费用支出明细表详情")
+    public HttpResult getInsAccountExpensesDetail(@RequestParam("id") String id) {
+        return HttpResult.ok("",invAccountExpensesService.getDetail(id));
+    }
+    /**
+     * 获取费用支出明细表列表
+     */
+    @PostMapping("getAccountExpensesList")
+    @ApiOperation("获取费用支出明细表列表")
+    public HttpResult getInsAccountExpensesList(@RequestBody InvAccountExpenses invAccountExpenses) {
+        return HttpResult.ok("",invAccountExpensesService.selectExpensesList(invAccountExpenses));
+    }
+
+    @GetMapping("getAccountExpensesTreeList")
+    @ApiOperation("获取费用支出明细表树形列表")
+    public HttpResult getInsAccountExpensesTreeList() {
+        return HttpResult.ok("",invAccountExpensesService.selectTreeList());
+    }
+}
+

+ 46 - 0
src/main/java/com/ydtech/modules/inv/controller/InvAccountOperateController.java

@@ -0,0 +1,46 @@
+package com.ydtech.modules.inv.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+import com.ydtech.modules.inv.service.InvAccountOperateService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * @author jianlong
+ * @date 2024-01-04 18:33
+ */
+
+@RequestMapping("accountOperate")
+@RestController
+public class InvAccountOperateController {
+
+    @Autowired
+    private InvAccountOperateService invAccountOperateService;
+
+
+
+    @PostMapping("getAccountOperate")
+    @ApiOperation("获取账户操作")
+    public HttpResult<IPage<InvAccountOperate>>  getAccountOperate(@RequestBody InvAccountOperate accountOperate){
+        return HttpResult.ok("",invAccountOperateService.selectList(accountOperate));
+    }
+
+
+
+    @GetMapping("getAccountOperateDetail")
+    @ApiOperation("获取账户操作详情")
+    public HttpResult<InvAccountOperate> getAccountOperateDetail(@RequestParam("accountOperateId")String accountOperateId){
+        return HttpResult.ok("",invAccountOperateService.getById(accountOperateId));
+    }
+
+
+    @PostMapping("insertAccountOperate")
+    @ApiOperation("新增外部收入")
+    public HttpResult insertAccountOperate(@RequestBody InvAccountOperate accountOperate){
+        return invAccountOperateService.insert(accountOperate);
+    }
+}

+ 124 - 0
src/main/java/com/ydtech/modules/inv/controller/invAccountExcelController.java

@@ -0,0 +1,124 @@
+package com.ydtech.modules.inv.controller;
+
+import com.ydtech.constants.enums.inv.InvPayMethodEnum;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import com.ydtech.modules.inv.service.InvAccountExcelService;
+import com.ydtech.modules.inv.service.InvAccountService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author jianlong
+ * @date 2024-01-10 09:49
+ */
+@RequestMapping("accountExcel")
+@RestController
+public class invAccountExcelController {
+    @Autowired
+    private InvAccountExcelService invAccountExcelService;
+    @Autowired
+    private InvAccountService invAccountService;
+
+    @PostMapping("excel")
+    @ApiOperation("导出资金申请模板")
+    public HttpResult excelAccountOperate(@RequestBody List<String> idList) {
+        return invAccountExcelService.excelAccount(idList);
+    }
+
+    @PostMapping("invert")
+    @ApiOperation("插入资金模板信息")
+    public HttpResult invertAccount(@RequestBody InvAccountExcel invAccountExcel) {
+        BaseController baseController = new BaseController();
+        Date date = new Date();
+        invAccountExcel.setCreateBy(baseController.getUserName());
+        invAccountExcel.setCreateTime(date);
+        InvAccount byId = invAccountService.getById(invAccountExcel.getOutAccountId());
+
+        if (invAccountExcel.getEnterAccountId() != null) {
+            if (invAccountExcel.getOutAccountId().equals(invAccountExcel.getEnterAccountId())) {
+                throw new SystemException("无法转账给本公司");
+            }
+        }
+        if (invAccountExcel.getOutFlag().equals("1") && byId.getOuterFlag().equals("1")) {
+            throw new SystemException("外部账户转出到外部账户无法生成资金模板");
+        }
+
+        if (invAccountExcelService.save(invAccountExcel)) {
+            return HttpResult.ok("", invAccountExcel.getExcelAccountOperateId());
+        }
+        return HttpResult.error("新增失败");
+    }
+
+    @PostMapping("update")
+    @ApiOperation("修改资金模板信息")
+    public HttpResult updateAccount(@RequestBody InvAccountExcel invAccountExcel) {
+        if (invAccountExcel.getExcelAccountOperateId() != null) {
+            if (invAccountExcel.getTransferFlag().equals("1")) {
+                BaseController baseController = new BaseController();
+                invAccountExcel.setUpdateBy(baseController.getUserName());
+                invAccountExcel.setUpdateTime(new Date());
+                return HttpResult.ok("", invAccountExcelService.updateById(invAccountExcel));
+            } else {
+                return HttpResult.error("已转账无法修改");
+            }
+        } else {
+            return HttpResult.error("id不能为空");
+        }
+    }
+
+    @ApiOperation("获取资金模板详细信息")
+    @GetMapping("getAccountExcelById")
+    public HttpResult<InvAccountExcel> getAccountExcelById(@RequestParam("excelAccountOperateId") String excelAccountOperateId) {
+        if (excelAccountOperateId != null) {
+            InvAccountExcel byId = invAccountExcelService.getById(excelAccountOperateId);
+            StringBuilder a = new StringBuilder();
+            String[] split = byId.getPayMethod().split(",");
+            for (String i : split) {
+                a.append(InvPayMethodEnum.getNameByCode(i)).append(",");
+            }
+            byId.setPayMethod(a.toString());
+            return HttpResult.ok("", byId);
+        } else {
+            return HttpResult.error("id不能为空");
+        }
+    }
+
+    @ApiOperation("获取资金模板列表")
+    @PostMapping("getAccountExcel")
+    public HttpResult getAccountExcel(@RequestBody InvAccountExcel invAccountExcel) {
+        return invAccountExcelService.selectAccountExcel(invAccountExcel);
+    }
+
+    @ApiOperation("删除资金模板")
+    @DeleteMapping("{excelAccountOperateId}")
+    public HttpResult deleteAccountExcel(@PathVariable("excelAccountOperateId") String excelAccountOperateId) {
+        InvAccountExcel invAccountExcel = invAccountExcelService.getById(excelAccountOperateId);
+        if (excelAccountOperateId != null) {
+            if (invAccountExcel.getTransferFlag().equals("1")) {
+                invAccountExcel.setDelFlag("1");
+                return HttpResult.ok("", invAccountExcelService.updateById(invAccountExcel));
+            } else {
+                return HttpResult.error("已转账无法删除");
+            }
+        } else {
+            return HttpResult.error("id不能为空");
+        }
+    }
+
+    @ApiOperation("修改转账状态")
+    @GetMapping("updateTransferFlag")
+    public HttpResult updateTransferFlag(@RequestParam("excelAccountOperateId") String excelAccountOperateId) {
+        if (excelAccountOperateId == null) {
+            return HttpResult.error("id不能为空");
+        }
+        return invAccountExcelService.updateTransferFlag(excelAccountOperateId);
+    }
+}

+ 22 - 0
src/main/java/com/ydtech/modules/inv/dao/InvAccountExcelMapper.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.inv.dao;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_excel(资金申请单表)】的数据库操作Mapper
+* @createDate 2024-01-10 08:53:59
+* @Entity generator.domain.InsAccountExcel
+*/
+public interface InvAccountExcelMapper extends BaseMapper<InvAccountExcel> {
+    IPage<InvAccountExcel> selectExcelAccount(Page page, @Param("insAccountExcel") InvAccountExcel insAccountExcel);
+}
+
+
+
+

+ 24 - 0
src/main/java/com/ydtech/modules/inv/dao/InvAccountExpensesMapper.java

@@ -0,0 +1,24 @@
+package com.ydtech.modules.inv.dao;
+
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.modules.inv.model.InvAccountExpenses;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_expenses(费用支出明细表)】的数据库操作Mapper
+* @createDate 2024-01-10 18:13:14
+* @Entity generator.domain.InsAccountExpenses
+*/
+public interface InvAccountExpensesMapper extends BaseMapper<InvAccountExpenses> {
+
+    IPage<InvAccountExpenses> selectExpensesList(Page page, @Param("accountExpenses") InvAccountExpenses accountExpenses);
+}
+
+
+
+

+ 23 - 0
src/main/java/com/ydtech/modules/inv/dao/InvAccountMapper.java

@@ -0,0 +1,23 @@
+package com.ydtech.modules.inv.dao;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.inv.model.InvAccount;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_account(账户信息表)】的数据库操作Mapper
+ * @createDate 2024-01-04 18:29:20
+ * @Entity com.ydtech.modules.inv.model.InsAccount
+ */
+public interface InvAccountMapper extends BaseMapper<InvAccount> {
+
+    IPage<InvAccount> SelectAccountsList(Page page, @Param("account")InvAccount account);
+
+}
+
+
+
+

+ 23 - 0
src/main/java/com/ydtech/modules/inv/dao/InvAccountOperateMapper.java

@@ -0,0 +1,23 @@
+package com.ydtech.modules.inv.dao;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_operate(账户操作记录表)】的数据库操作Mapper
+* @createDate 2024-01-04 18:29:20
+* @Entity com.ydtech.modules.inv.model.InsAccountOperate
+*/
+public interface InvAccountOperateMapper extends BaseMapper<InvAccountOperate> {
+
+    IPage<InvAccountOperate> selectInsAccountOperate(Page page, @Param("insAccountOperate") InvAccountOperate insAccountOperate);
+
+}
+
+
+
+

+ 265 - 0
src/main/java/com/ydtech/modules/inv/model/InvAccount.java

@@ -0,0 +1,265 @@
+package com.ydtech.modules.inv.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 账户信息表
+ * @TableName ins_account
+ */
+@TableName(value ="inv_account")
+@Data
+public class InvAccount implements Serializable {
+    /**
+     * 账户id
+     */
+    @TableId
+    @ApiModelProperty(value = "账户id")
+    private String accountId;
+
+    /**
+     * 户名
+     */
+    @ApiModelProperty(value = "户名")
+    private String accountName;
+
+    /**
+     * 银行卡号
+     */
+    @ApiModelProperty(value = "银行卡号")
+    private String bankCardNum;
+
+    /**
+     * 开户行名称
+     */
+    @ApiModelProperty(value = "开户行名称")
+    private String bankName;
+
+    /**
+     * 开户行
+     */
+    @ApiModelProperty(value = "开户行")
+    private String bank;
+
+    /**
+     * 开户行号
+     */
+    @ApiModelProperty(value = "开户行号")
+    private String bankNum;
+
+    /**
+     * 证书有效期开始
+     */
+    @ApiModelProperty(value = "证书有效期开始")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startCertExpirationDate;
+
+
+    /**
+     * 创建者
+     */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 账户性质(0公户 1私户)
+     */
+    @ApiModelProperty(value = "账户性质(0公户 1私户)")
+    private String accountQuality;
+
+    /**
+     * 对公单笔限额
+     */
+    @ApiModelProperty(value = "对公单笔限额")
+    private String pubSingleLines;
+
+    /**
+     * 对私单笔限额
+     */
+    @ApiModelProperty(value = "对私单笔限额")
+    private String priSingleLines;
+
+    /**
+     * 对公年额度
+     */
+    @ApiModelProperty(value = "对公年额度")
+    private String pubYearLines;
+
+    /**
+     * 对私年额度
+     */
+    @ApiModelProperty(value = "对私年额度")
+    private String priYearLines;
+
+    /**
+     * 单日转账笔数限制
+     */
+    @ApiModelProperty(value = "单日转账笔数限制")
+    private String dayStrokeNum;
+
+    /**
+     * 对公单日限额
+     */
+    @ApiModelProperty(value = "对公单日限额")
+    private String pubDayLines;
+
+    /**
+     * 对私单日限额
+     */
+    @ApiModelProperty(value = "对私单日限额")
+    private String priDayLines;
+
+    /**
+     * 对公年剩余额度
+     */
+    @ApiModelProperty(value = "对公年剩余额度")
+    private String pubYearExcess;
+
+    /**
+     * 对私年剩余额度
+     */
+    @ApiModelProperty(value = "对私年剩余额度")
+    private String priYearExcess;
+
+    /**
+     * 财税公司利润
+     */
+    @ApiModelProperty(value = "财务公司利润")
+    private String fiscalProfit;
+
+    /**
+     * 保险公司回款
+     */
+    @ApiModelProperty(value = "保险公司利润")
+    private String insuranceProfit;
+
+    /**
+     * 结算卡
+     */
+    @ApiModelProperty(value = "结算卡")
+    private String clearingProfit;
+
+    /**
+     * 外部过账金额
+     */
+    @ApiModelProperty(value = "外部过账金额")
+    private String exteriorProfit;
+
+    /**
+     * 园区利润
+     */
+    @ApiModelProperty(value = "园区利润")
+    private String parkProfit;
+
+    /**
+     * 天勤利润
+     */
+    @ApiModelProperty(value = "天勤利润")
+    private String tianqinProfit;
+
+    /**
+     * 其他利润
+     */
+    @ApiModelProperty(value = "其他利润")
+    private String otherProfit;
+
+    /**
+     * 证书有效期结束
+     */
+    @ApiModelProperty(value = "证书有效期结束")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endCertExpirationDate;
+
+    /**
+     * 余额
+     */
+    @ApiModelProperty(value = "余额")
+    private String balance;
+
+    /**
+     * 单日转账笔数剩余
+     */
+    @ApiModelProperty(value = "单日转账笔数剩余")
+    private String dayStrokeNumExcess;
+
+    /**
+     * 对公单日限额剩余
+     */
+    @ApiModelProperty(value = "对公单日限额剩余")
+    private String pubDayLinesExcess;
+
+    /**
+     * 对私单日限额剩余
+     */
+    @ApiModelProperty(value = "对私单日限额剩余")
+    private String priDayLinesExcess;
+
+    @ApiModelProperty(value = "删除标志 删除时不需要传递")
+    private String delFlag;
+
+    /**
+     * 外部账户标识(0内部账户 1外部账户)
+     */
+    @ApiModelProperty(value = "外部账户标识(0内部账户 1外部账户)")
+    private String outerFlag;
+
+    /**
+     * 支出金额
+     */
+    @ApiModelProperty("支出金额")
+    private String spend;
+
+
+
+
+    @TableField(exist = false)
+    private int pageNo;
+
+    @TableField(exist = false)
+    private int PageSize;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        InvAccount that = (InvAccount) o;
+        return Objects.equals(pubSingleLines, that.pubSingleLines) && Objects.equals(priSingleLines, that.priSingleLines) && Objects.equals(pubYearLines, that.pubYearLines) && Objects.equals(priYearLines, that.priYearLines) && Objects.equals(dayStrokeNum, that.dayStrokeNum) && Objects.equals(pubDayLines, that.pubDayLines) && Objects.equals(priDayLines, that.priDayLines);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(pubSingleLines, priSingleLines, pubYearLines, priYearLines, dayStrokeNum, pubDayLines, priDayLines);
+    }
+}

+ 203 - 0
src/main/java/com/ydtech/modules/inv/model/InvAccountExcel.java

@@ -0,0 +1,203 @@
+package com.ydtech.modules.inv.model;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.alibaba.excel.enums.poi.BorderStyleEnum;
+import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
+import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 资金申请单表
+ * @TableName ins_account_excel
+ */
+@TableName(value ="inv_account_excel")
+@Data
+@ContentStyle(borderBottom = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderLeft = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN,
+horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER
+)
+@ExcelIgnoreUnannotated
+public class InvAccountExcel implements Serializable {
+    /**
+     * 资金申请表id
+     */
+    @TableId
+    @ApiModelProperty(value = "资金申请表id")
+    private String excelAccountOperateId;
+
+    /**
+     * 单位
+     */
+    @ApiModelProperty(value = "单位")
+    @NotBlank
+    private String company;
+
+    /**
+     * 申请人
+     */
+    @ApiModelProperty(value = "申请人")
+    @NotBlank
+    private String applicant;
+
+    /**
+     * 申请时间
+     */
+    @ApiModelProperty(value = "申请时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @NotBlank
+    private Date applyTime;
+
+    /**
+     * 解决excel日期格式转换问题
+     */
+    @ApiModelProperty(value = "无需理会")
+    @TableField(exist = false)
+    private String excelApplyTime;
+
+    /**
+     * 申请部门
+     */
+    @ApiModelProperty(value = "申请部门")
+    @NotBlank
+    private String applySector;
+
+    /**
+     * 收款单位信息
+     */
+    @ApiModelProperty(value = "收款单位信息")
+    @NotBlank
+    private String collectionMessage;
+
+    /**
+     * 资金流程
+     */
+    @ApiModelProperty(value = "资金流程")
+    @NotBlank
+    private String fundFlow;
+
+    /**
+     * 资金用途
+     */
+    @ApiModelProperty(value = "资金用途")
+    @NotBlank
+    private String fundUse;
+
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    @NotBlank
+    private String remark;
+
+    /**
+     * 申请金额
+     */
+    @ApiModelProperty(value = "申请金额")
+    @NotBlank
+    private String applyAmount;
+
+    /**
+     * 大写金额
+     */
+    @ApiModelProperty(value = "大写金额")
+    @NotBlank
+    private String bigApplyAmount;
+
+    /**
+     * 下载地址
+     */
+    @ApiModelProperty(value = "下载地址")
+    private String uplodePath;
+
+    /**
+     * 更新者
+     */
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date updateTime;
+
+    /**
+     * 创建者
+     */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 转入的账户id
+     */
+    @ApiModelProperty(value = "转入的账户id")
+    private String enterAccountId;
+
+    /**
+     * 转出的账户id
+     */
+    @ApiModelProperty(value = "转出的账户id")
+    private String outAccountId;
+
+
+    /**
+     * 对内对外标志(0对内 1对外)
+     */
+    @ApiModelProperty(value = "对内对外标志(0对内 1对外)")
+    @NotBlank
+    private String outFlag;
+
+    /**
+     * 如果对外则填写账户性质(0公户 1私户)
+     */
+    @ApiModelProperty(value = "如果对外则填写账户性质(0公户 1私户)")
+    private String outAccountQuality;
+
+    /**
+     * 删除标志
+     */
+    @ApiModelProperty("做删除时无需传值 只需删除的id即可")
+    private String delFlag;
+
+    /**
+     * 转账标志(0已转 1未转)
+     */
+    @ApiModelProperty(value = "转账标志(0已转 1未转)")
+    private String transferFlag;
+
+
+    /**
+     * 支付方式(0现金 1微信 2转账 3其他)
+     */
+    @ApiModelProperty(value = "支付方式(0现金 1微信 2转账 3其他)")
+    @NotBlank
+    private String payMethod;
+
+    @TableField(exist = false)
+    private int pageNo;
+
+    @TableField(exist = false)
+    private int PageSize;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 90 - 0
src/main/java/com/ydtech/modules/inv/model/InvAccountExpenses.java

@@ -0,0 +1,90 @@
+package com.ydtech.modules.inv.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 费用支出明细表
+ * @TableName ins_account_expenses
+ */
+@TableName(value ="inv_account_expenses")
+@Data
+public class InvAccountExpenses implements Serializable {
+    /**
+     * 收入支出明细id
+     */
+    @ApiModelProperty(value = "收入支出明细id")
+    @TableId
+    private String expensesId;
+
+    /**
+     * 类目
+     */
+    @ApiModelProperty(value = "类目")
+    private String category;
+
+    /**
+     * 父id
+     */
+    @ApiModelProperty(value = "父id")
+    private String parentId;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 删除标志(0代表存在 1代表删除)
+     */
+    @ApiModelProperty(value = "删除标志(0代表存在 1代表删除)")
+    private String delFlag;
+
+    /**
+     * 创建者
+     */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    /**
+     * 更新者
+     */
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @ApiModelProperty(value = "更新时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "子类")
+    private List<InvAccountExpenses> child;
+
+    @TableField(exist = false)
+    private int pageNo;
+
+    @TableField(exist = false)
+    private int pageSize;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 114 - 0
src/main/java/com/ydtech/modules/inv/model/InvAccountOperate.java

@@ -0,0 +1,114 @@
+package com.ydtech.modules.inv.model;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 账户操作记录表
+ * @TableName ins_account_operate
+ */
+@TableName(value ="inv_account_operate")
+@Data
+public class InvAccountOperate implements Serializable {
+    /**
+     * 账户操作id
+     */
+    @TableId
+    @ApiModelProperty(value = "账户操作id")
+    private String accountOperateId;
+
+    /**
+     * 申请人
+     */
+    @ApiModelProperty(value = "申请人")
+    private String applicant;
+
+    /**
+     * 申请部门
+     */
+    @ApiModelProperty(value = "申请部门")
+    private String applySector;
+
+    /**
+     * 申请时间
+     */
+    @ApiModelProperty(value = "申请时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date applyTime;
+
+    /**
+     * 收款信息
+     */
+    @ApiModelProperty(value = "收款信息")
+    private String collectionMessage;
+
+    /**
+     * 资金流向
+     */
+    @ApiModelProperty(value = "资金流向")
+    private String fundFlow;
+
+    /**
+     * 资金用途
+     */
+    @ApiModelProperty(value = "资金用途")
+    private String fundUse;
+
+    /**
+     * 申请金额
+     */
+    @ApiModelProperty(value = "申请金额")
+    private String applyAmount;
+
+    /**
+     * 支付方式(0现金 1微信 2转账 3其他)
+     */
+    @ApiModelProperty(value = "支付方式(0现金 1微信 2转账 3其他)")
+    private String payMethod;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    /**
+     * 单位
+     */
+    @ApiModelProperty(value = "单位")
+    private String company;
+
+    /**
+     * 大写金额
+     */
+    @ApiModelProperty(value = "大写金额")
+    private String bigApplyAmount;
+
+    /**
+     * 收入0支出1
+     */
+    @ApiModelProperty(value = "收入0支出1")
+    private String revenueOutlay;
+
+    @ApiModelProperty(value = "外部转内部需携带转入id")
+    @TableField(exist = false)
+    private String enterAccountId;
+
+
+    @TableField(exist = false)
+    private int pageNo;
+
+    @TableField(exist = false)
+    private int PageSize;
+
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 22 - 0
src/main/java/com/ydtech/modules/inv/service/InvAccountExcelService.java

@@ -0,0 +1,22 @@
+package com.ydtech.modules.inv.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_excel(资金申请单表)】的数据库操作Service
+* @createDate 2024-01-10 08:53:59
+*/
+public interface InvAccountExcelService extends IService<InvAccountExcel> {
+    HttpResult excelAccount(List<String> idList);
+
+    HttpResult selectAccountExcel(InvAccountExcel invAccountExcel);
+
+    HttpResult updateTransferFlag(String excelAccountOperateId);
+
+}

+ 21 - 0
src/main/java/com/ydtech/modules/inv/service/InvAccountExpensesService.java

@@ -0,0 +1,21 @@
+package com.ydtech.modules.inv.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.inv.model.InvAccountExpenses;
+
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_expenses(费用支出明细表)】的数据库操作Service
+* @createDate 2024-01-10 18:13:14
+*/
+public interface InvAccountExpensesService extends IService<InvAccountExpenses> {
+     IPage<InvAccountExpenses> selectExpensesList(InvAccountExpenses accountExpenses);
+
+     List<InvAccountExpenses> selectTreeList();
+
+     InvAccountExpenses getDetail(String id);
+}

+ 18 - 0
src/main/java/com/ydtech/modules/inv/service/InvAccountOperateService.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.inv.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_operate(账户操作记录表)】的数据库操作Service
+* @createDate 2024-01-04 18:29:20
+*/
+public interface InvAccountOperateService extends IService<InvAccountOperate> {
+
+    IPage<InvAccountOperate> selectList(InvAccountOperate list);
+
+    HttpResult insert(InvAccountOperate invAccountOperate);
+}

+ 23 - 0
src/main/java/com/ydtech/modules/inv/service/InvAccountService.java

@@ -0,0 +1,23 @@
+package com.ydtech.modules.inv.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account(账户信息表)】的数据库操作Service
+* @createDate 2024-01-04 18:29:20
+*/
+public interface InvAccountService extends IService<InvAccount> {
+
+    IPage<InvAccount> selectAccountsList(InvAccount account);
+
+    int updateInsAccount(InvAccount insAccount);
+
+    int insertInsAccount(InvAccount insAccount);
+
+    HttpResult selectByAccountName();
+
+}

+ 139 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountExcelServiceImpl.java

@@ -0,0 +1,139 @@
+package com.ydtech.modules.inv.service.impl;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.constants.enums.inv.InvPayMethodEnum;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.core.page.PageRequest;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.inv.dao.InvAccountExcelMapper;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+import com.ydtech.modules.inv.service.InvAccountExcelService;
+import com.ydtech.modules.inv.service.InvAccountOperateService;
+import com.ydtech.modules.inv.service.InvAccountService;
+import com.ydtech.modules.inv.utils.EasyExcelUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import static com.ydtech.modules.inv.utils.TransferUtils.*;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_account_excel(资金申请单表)】的数据库操作Service实现
+ * @createDate 2024-01-10 08:53:59
+ */
+@Service
+public class InvAccountExcelServiceImpl extends ServiceImpl<InvAccountExcelMapper, InvAccountExcel>
+        implements InvAccountExcelService {
+
+    @Autowired
+    private InvAccountExcelMapper insAccountExcelMapper;
+    @Autowired
+    private InvAccountOperateService insAccountOperateService;
+    @Autowired
+    private InvAccountService insAccountService;
+    @Autowired
+    private EasyExcelUtils easyExcelUtils;
+
+    @Value("${upload.file.path}")
+    String uploadFilePath;
+
+    @Override
+    public HttpResult excelAccount(List<String> idList) {
+        List<InvAccountExcel> insAccountExcels = insAccountExcelMapper.selectBatchIds(idList);
+        if (!insAccountExcels.isEmpty()) {
+            return HttpResult.ok("", easyExcelUtils.downAccountExcel(uploadFilePath, insAccountExcels));
+        }
+        return HttpResult.error("导出失败");
+    }
+
+    @Override
+    public HttpResult selectAccountExcel(InvAccountExcel invAccountExcel) {
+        PageRequest pageRequest = new PageRequest();
+        pageRequest.setPageNum(invAccountExcel.getPageNo());
+        pageRequest.setPageSize(invAccountExcel.getPageSize());
+        Page page = PageRequest.buildPageRequest(pageRequest);
+        IPage<InvAccountExcel> invAccountExcelIPage = insAccountExcelMapper.selectExcelAccount(page, invAccountExcel);
+        List<InvAccountExcel> records = invAccountExcelIPage.getRecords();
+        for (InvAccountExcel record:records){
+            StringBuilder a = new StringBuilder();
+            String[] split = record.getPayMethod().split(",");
+            for (String i : split) {
+                a.append(InvPayMethodEnum.getNameByCode(i)).append(",");
+            }
+            record.setPayMethod(a.toString());
+        }
+        invAccountExcelIPage.setRecords(records);
+        return HttpResult.ok("", invAccountExcelIPage);
+    }
+
+    /**
+     * 修改已转账状态
+     *
+     * @param excelAccountOperateId
+     * @return
+     */
+    @Override
+    public HttpResult updateTransferFlag(String excelAccountOperateId) {
+        InvAccountExcel invAccountExcel = insAccountExcelMapper.selectById(excelAccountOperateId);
+        if (invAccountExcel == null) {
+            throw new RuntimeException("该记录不存在");
+        }
+        InvAccount outAccount = insAccountService.getById(invAccountExcel.getOutAccountId());
+        InvAccount enterAccount = insAccountService.getById(invAccountExcel.getEnterAccountId());
+        BaseController baseController = new BaseController();
+        String userName = baseController.getUserName();
+        outAccount.setUpdateBy(userName);
+        outAccount.setUpdateTime(new Date());
+        enterAccount.setUpdateBy(userName);
+        enterAccount.setUpdateTime(new Date());
+        //修改转账状态
+        invAccountExcel.setTransferFlag("0");
+        //判断是转账给内部还是外部
+        if (invAccountExcel.getOutFlag().equals("0")) {
+            //转账操作
+
+            //如果转账失败就返回错误
+            List<InvAccount> insAccounts = insideTransfer(outAccount, enterAccount, invAccountExcel);
+            if (insAccounts.isEmpty()) {
+                throw new RuntimeException("转账失败");
+            }
+            if (!insAccountService.updateBatchById(insAccounts)){
+                throw new RuntimeException("转账失败");
+            }
+
+            //内部转账操作
+            List<InvAccountOperate> list = new ArrayList<>();
+            //支出信息
+            list.add(insertOutAccountOperate(invAccountExcel));
+            //收入信息
+            list.add(insertRevenueAccountOperate(invAccountExcel));
+            if (!insAccountOperateService.saveBatch(list)){
+                throw new RuntimeException("添加转账信息失败");
+            }
+        } else {
+            //内转外部转账
+            List<InvAccount> invAccounts = enterDeTransfer(outAccount, enterAccount, invAccountExcel);
+            insAccountOperateService.save(insertOutAccountOperate(invAccountExcel));
+            if (!insAccountService.saveBatch(invAccounts)){
+                throw new RuntimeException("添加转账信息失败");
+            }
+        }
+        return HttpResult.ok("", insAccountExcelMapper.updateById(invAccountExcel));
+    }
+
+
+}
+
+
+
+
+

+ 78 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountExpensesServiceImpl.java

@@ -0,0 +1,78 @@
+package com.ydtech.modules.inv.service.impl;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.core.page.PageRequest;
+import com.ydtech.modules.inv.dao.InvAccountExpensesMapper;
+import com.ydtech.modules.inv.model.InvAccountExpenses;
+import com.ydtech.modules.inv.service.InvAccountExpensesService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+* @author Administrator
+* @description 针对表【ins_account_expenses(费用支出明细表)】的数据库操作Service实现
+* @createDate 2024-01-10 18:13:14
+*/
+@Service
+public class InvAccountExpensesServiceImpl extends ServiceImpl<InvAccountExpensesMapper, InvAccountExpenses>
+    implements InvAccountExpensesService {
+
+    @Autowired
+    InvAccountExpensesMapper invAccountExpensesMapper;
+
+    @Override
+    public IPage<InvAccountExpenses> selectExpensesList(InvAccountExpenses accountExpenses) {
+        PageRequest pageRequest = new PageRequest();
+        pageRequest.setPageNum(accountExpenses.getPageNo());
+        pageRequest.setPageSize(accountExpenses.getPageSize());
+        Page page = PageRequest.buildPageRequest(pageRequest);
+
+        return invAccountExpensesMapper.selectExpensesList(page,accountExpenses);
+    }
+
+    public InvAccountExpenses getDetail(String id) {
+        return invAccountExpensesMapper.selectById(id);
+    }
+
+    @Override
+    public List<InvAccountExpenses> selectTreeList() {
+        LambdaQueryWrapper<InvAccountExpenses> wrapper = new LambdaQueryWrapper<>();
+        return getTree(invAccountExpensesMapper.selectList(wrapper));
+    }
+
+    /**
+     * 组装树形结构结果集方法
+     */
+
+    public List<InvAccountExpenses> getTree(List<InvAccountExpenses> list){
+
+        return list.stream().filter(accountExpenses -> accountExpenses.getParentId().equals("0"))
+                .peek(accountExpenses -> accountExpenses.setChild(getChildren(accountExpenses,list))).collect(Collectors.toList());
+    }
+
+    public List<InvAccountExpenses> getChildren(InvAccountExpenses user,List<InvAccountExpenses> userList){
+        return userList.stream().filter(u -> Objects.equals(u.getParentId(),user.getExpensesId())).map(
+                u -> {
+                    u.setChild(getChildren(u,userList));
+                    return u;
+                }
+        ).collect(Collectors.toList());
+    }
+
+
+
+
+
+}
+
+
+
+

+ 88 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountOperateServiceImpl.java

@@ -0,0 +1,88 @@
+package com.ydtech.modules.inv.service.impl;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.constants.enums.inv.InvPayMethodEnum;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.core.page.PageRequest;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+import com.ydtech.modules.inv.service.InvAccountOperateService;
+import com.ydtech.modules.inv.dao.InvAccountOperateMapper;
+import com.ydtech.modules.inv.service.InvAccountService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+import static com.ydtech.modules.inv.utils.TransferUtils.outsideTransfer;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_account_operate(账户操作记录表)】的数据库操作Service实现
+ * @createDate 2024-01-04 18:29:20
+ */
+@Service
+public class InvAccountOperateServiceImpl extends ServiceImpl<InvAccountOperateMapper, InvAccountOperate>
+        implements InvAccountOperateService {
+
+    @Autowired
+    private InvAccountOperateMapper insAccountOperateMapper;
+
+    @Autowired
+    private InvAccountService insAccountService;
+
+    /**
+     * 查询操作列表
+     *
+     * @param accountOperate
+     * @return
+     */
+    @Override
+    public IPage<InvAccountOperate> selectList(InvAccountOperate accountOperate) {
+        PageRequest pageRequest = new PageRequest();
+        pageRequest.setPageNum(accountOperate.getPageNo());
+        pageRequest.setPageSize(accountOperate.getPageSize());
+        Page page = PageRequest.buildPageRequest(pageRequest);
+        IPage<InvAccountOperate> invAccountOperateIPage = insAccountOperateMapper.selectInsAccountOperate(page, accountOperate);
+        List<InvAccountOperate> records = invAccountOperateIPage.getRecords();
+        for (InvAccountOperate record:records){
+            StringBuilder a = new StringBuilder();
+           if (record.getPayMethod() != null){
+               String[] split = record.getPayMethod().split(",");
+               for (String i : split) {
+                   a.append(InvPayMethodEnum.getNameByCode(i)).append(",");
+               }
+               record.setPayMethod(a.toString());
+           }
+        }
+        invAccountOperateIPage.setRecords(records);
+        return invAccountOperateIPage;
+    }
+
+    /**
+     * 外部转内部
+     * @param invAccountOperate
+     * @return
+     */
+    @Override
+    public HttpResult insert(InvAccountOperate invAccountOperate) {
+        InvAccount enterAccount = insAccountService.getById(invAccountOperate.getEnterAccountId());
+        InvAccount invAccount = outsideTransfer(enterAccount, invAccountOperate);
+
+        if (!insAccountService.updateById(invAccount)){
+
+            return HttpResult.error("新增收入失败");
+        }
+        insAccountOperateMapper.insert(invAccountOperate);
+        return HttpResult.ok("新增收入成功");
+    }
+
+}
+
+
+
+

+ 164 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvAccountServiceImpl.java

@@ -0,0 +1,164 @@
+package com.ydtech.modules.inv.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.core.page.PageRequest;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.service.InvAccountService;
+import com.ydtech.modules.inv.dao.InvAccountMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_account(账户信息表)】的数据库操作Service实现
+ * @createDate 2024-01-04 18:29:20
+ */
+@Service
+public class InvAccountServiceImpl extends ServiceImpl<InvAccountMapper, InvAccount>
+        implements InvAccountService {
+
+    @Autowired
+    private InvAccountMapper insAccountMapper;
+
+    /**
+     * 分页查询
+     *
+     * @param account
+     * @return
+     */
+    @Override
+    public IPage<InvAccount> selectAccountsList(InvAccount account) {
+        PageRequest pageRequest = new PageRequest();
+        pageRequest.setPageNum(account.getPageNo());
+        pageRequest.setPageSize(account.getPageSize());
+        Page page = PageRequest.buildPageRequest(pageRequest);
+        return insAccountMapper.SelectAccountsList(page, account);
+    }
+
+    /**
+     * 修改方法
+     *
+     * @param insAccount
+     * @return
+     */
+    @Override
+    public int updateInsAccount(InvAccount invAccount) {
+        BaseController baseController = new BaseController();
+        invAccount.setUpdateBy(baseController.getUserName());
+        invAccount.setUpdateTime(new Date());
+        //不允许修改余额
+        invAccount.setBalance(null);
+        invAccount.setDayStrokeNumExcess(null);
+        invAccount.setPubDayLinesExcess(null);
+        invAccount.setPubYearExcess(null);
+        invAccount.setPriDayLinesExcess(null);
+        invAccount.setPriYearExcess(null);
+
+        InvAccount oldeInsAccount = insAccountMapper.selectById(invAccount.getAccountId());
+        //判断是否修改额度
+        if (!oldeInsAccount.equals(invAccount)) {
+            return insAccountMapper.updateById(updateInsAccountLines(oldeInsAccount, invAccount));
+        }
+        return insAccountMapper.updateById(invAccount);
+    }
+
+
+    /**
+     * 修改额度方法
+     */
+    private InvAccount updateInsAccountLines(InvAccount oldeInvAccount, InvAccount newInvAccount) {
+        if (oldeInvAccount.getPriYearLines().equals(newInvAccount.getPriYearLines())) {
+            //对私年额度已经消费
+            BigDecimal subtract = new BigDecimal(oldeInvAccount.getPriYearLines()).subtract(new BigDecimal(oldeInvAccount.getPriYearExcess()));
+            newInvAccount.setPriYearExcess(subtract.toString());
+        }
+        if (oldeInvAccount.getPubYearLines().equals(newInvAccount.getPubYearLines())) {
+            //对公年额度已经消费
+            BigDecimal subtract = new BigDecimal(oldeInvAccount.getPubYearLines()).subtract(new BigDecimal(oldeInvAccount.getPubYearExcess()));
+            newInvAccount.setPubYearExcess(subtract.toString());
+        }
+        if (oldeInvAccount.getPubDayLines().equals(newInvAccount.getPubDayLines())) {
+            //对公单日额度已经消费
+            BigDecimal subtract = new BigDecimal(oldeInvAccount.getPubDayLines()).subtract(new BigDecimal(oldeInvAccount.getPubDayLinesExcess()));
+            newInvAccount.setPubDayLinesExcess(subtract.toString());
+        }
+        if (oldeInvAccount.getPriDayLines().equals(newInvAccount.getPriDayLines())) {
+            //对私单日额度已经消费
+            BigDecimal subtract = new BigDecimal(oldeInvAccount.getPriDayLines()).subtract(new BigDecimal(oldeInvAccount.getPriDayLinesExcess()));
+            newInvAccount.setPriDayLinesExcess(subtract.toString());
+        }
+        if (oldeInvAccount.getDayStrokeNum().equals(newInvAccount.getDayStrokeNum())) {
+            //单日转账笔数已经消费
+            BigDecimal subtract = new BigDecimal(oldeInvAccount.getDayStrokeNum()).subtract(new BigDecimal(oldeInvAccount.getDayStrokeNumExcess()));
+            newInvAccount.setDayStrokeNumExcess(subtract.toString());
+        }
+
+        return newInvAccount;
+    }
+
+    /**
+     * 插入
+     *
+     * @param insAccount
+     * @return
+     */
+    @Override
+    public int insertInsAccount(InvAccount invAccount) {
+        if(invAccount.getOuterFlag().equals("0")){
+            //插入剩余额度以及笔数
+            invAccount.setPubYearExcess(invAccount.getPubYearLines());
+            invAccount.setPubDayLinesExcess(invAccount.getPubDayLines());
+            invAccount.setPriYearExcess(invAccount.getPriYearLines());
+            invAccount.setPriDayLinesExcess((invAccount.getPriDayLines()));
+            invAccount.setDayStrokeNumExcess(invAccount.getDayStrokeNum());
+            invAccount.setPubSingleLines(invAccount.getPubSingleLines());
+            invAccount.setPriSingleLines(invAccount.getPriSingleLines());
+
+
+            //计算余额
+            BigDecimal count = new BigDecimal(invAccount.getFiscalProfit())
+                    .add(new BigDecimal(invAccount.getInsuranceProfit())) //财税公司利润
+                    .add(new BigDecimal(invAccount.getInsuranceProfit())) //保险公司回款
+                    .add(new BigDecimal(invAccount.getExteriorProfit()))//外部过账金额
+                    .add(new BigDecimal(invAccount.getParkProfit()))//园区利润
+                    .add(new BigDecimal(invAccount.getTianqinProfit()))//天勤利润
+                    .add(new BigDecimal(invAccount.getOtherProfit()))//其他利润
+                    .add(new BigDecimal(invAccount.getClearingProfit()));//结算卡
+            BaseController baseController = new BaseController();
+            invAccount.setBalance(String.valueOf(count));
+            invAccount.setCreateBy(baseController.getUserName());
+            invAccount.setCreateTime(new Date());
+        }
+
+        return insAccountMapper.insert(invAccount);
+    }
+
+    /**
+     * 根据户名分类
+     *
+     * @return
+     */
+    @Override
+    public HttpResult selectByAccountName() {
+        LambdaQueryWrapper<InvAccount> wrapper = new LambdaQueryWrapper<>();
+        List<InvAccount> insAccounts = insAccountMapper.selectList(wrapper);
+        if (!insAccounts.isEmpty()) {
+            return HttpResult.ok("", insAccounts);
+        }
+        return HttpResult.error("查询错误");
+    }
+
+}
+
+
+
+

+ 72 - 0
src/main/java/com/ydtech/modules/inv/utils/EasyExcelUtils.java

@@ -0,0 +1,72 @@
+package com.ydtech.modules.inv.utils;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.write.builder.ExcelWriterBuilder;
+import com.ydtech.constants.enums.inv.InsAccountOperateEnum;
+import com.ydtech.constants.enums.inv.InvPayMethodEnum;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import com.ydtech.modules.inv.service.InvAccountExcelService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @author jianlong
+ * @date 2023-12-29 16:46
+ */
+@Component
+public class EasyExcelUtils {
+
+    @Autowired
+    private InvAccountExcelService insAccountExcelService;
+
+
+    public static String downExcel(String uploadFilePath, Class clz, List<?> list) {
+
+        String file = System.currentTimeMillis() + ".xlsx";
+        String fileName = uploadFilePath + file;
+        EasyExcel.write(fileName, clz).sheet("1").doWrite(list);
+        return file;
+    }
+
+
+    /**
+     * 导出资金申请模板
+     */
+    public List<InvAccountExcel> downAccountExcel(String uploadFilePath, List<InvAccountExcel> invAccountExcel) {
+        // 加载模板
+        String templateFile = "资金申请单模板.xlsx";
+        List<InvAccountExcel> list = new ArrayList<>();
+        // 获取工作表并填充
+        for (InvAccountExcel excel : invAccountExcel) {
+            if (excel.getTransferFlag().equals("1")) {
+                // 写入文件
+                Date date = new Date();
+                String file = date.getTime() + ".xlsx";
+                String fileName = uploadFilePath + file;
+                excel.setExcelApplyTime(new SimpleDateFormat("yyyy-MM-dd").format(excel.getApplyTime()));
+                excel.setRemark(InsAccountOperateEnum.getNameByCode(excel.getRemark()));
+                String payMethod = excel.getPayMethod();
+                String[] split = payMethod.split(",");
+                StringBuilder a = new StringBuilder();
+                for (String i : split) {
+                    a.append(InvPayMethodEnum.getNameByCode(i)).append(",");
+                }
+                excel.setPayMethod(a.toString());
+                // 生成工作簿对象
+                ExcelWriterBuilder workBookWriter = EasyExcel.write(fileName, InvAccountExcel.class)
+                        .withTemplate(templateFile);
+
+                workBookWriter.sheet().doFill(excel);
+                excel.setUplodePath(file);
+                excel.setPayMethod(payMethod);
+                list.add(excel);
+            }
+        }
+        insAccountExcelService.updateBatchById(list);
+        return list;
+    }
+
+}

+ 241 - 0
src/main/java/com/ydtech/modules/inv/utils/TransferUtils.java

@@ -0,0 +1,241 @@
+package com.ydtech.modules.inv.utils;
+
+import com.ydtech.constants.enums.inv.InsAccountOperateEnum;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.model.InvAccountExcel;
+import com.ydtech.modules.inv.model.InvAccountOperate;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 转账工具类
+ *
+ * @author jianlong
+ * @date 2024-01-10 14:10
+ */
+public class TransferUtils {
+    /**
+     * 转账成功后添加支出账户操作信息
+     */
+    public static InvAccountOperate insertOutAccountOperate(InvAccountExcel insAccountExcel) {
+        //支出公司
+        InvAccountOperate insAccountOperate = new InvAccountOperate();
+        operate(insAccountExcel, insAccountOperate);
+        insAccountOperate.setRevenueOutlay("1");
+        return insAccountOperate;
+    }
+
+    /**
+     * 转账成功后添加收入账户操作信息
+     */
+    public static InvAccountOperate insertRevenueAccountOperate(InvAccountExcel insAccountExcel) {
+        //支出公司
+        InvAccountOperate insAccountOperate = new InvAccountOperate();
+        operate(insAccountExcel, insAccountOperate);
+        insAccountOperate.setRevenueOutlay("0");
+        return insAccountOperate;
+    }
+
+    private static void operate(InvAccountExcel invAccountExcel, InvAccountOperate invAccountOperate) {
+        invAccountOperate.setApplicant(invAccountExcel.getApplicant());
+        invAccountOperate.setApplySector(invAccountExcel.getApplySector());
+        invAccountOperate.setApplyTime(invAccountExcel.getApplyTime());
+        invAccountOperate.setCollectionMessage(invAccountExcel.getCollectionMessage());
+        invAccountOperate.setFundFlow(invAccountExcel.getFundFlow());
+        invAccountOperate.setFundUse(invAccountExcel.getFundUse());
+        invAccountOperate.setPayMethod(invAccountExcel.getPayMethod());
+        invAccountOperate.setRemark(InsAccountOperateEnum.getNameByCode(invAccountExcel.getRemark()));
+        invAccountOperate.setCompany(invAccountExcel.getCompany());
+        invAccountOperate.setApplyAmount(invAccountExcel.getApplyAmount());
+        invAccountOperate.setBigApplyAmount(invAccountExcel.getBigApplyAmount());
+    }
+
+    /**
+     * 内部转内部方法
+     */
+    public static List<InvAccount> insideTransfer(InvAccount outAccount, InvAccount enterAccount, InvAccountExcel invAccountExcel) {
+        List<InvAccount> list = new ArrayList<>();
+        if (outAccount != null && enterAccount != null && invAccountExcel != null) {
+            //公户单日转账剩余
+            BigDecimal pubDayLinesExcess = new BigDecimal(outAccount.getPubDayLinesExcess());
+            //私户单日转账剩余
+            BigDecimal priDayLinesExcess = new BigDecimal(outAccount.getPriDayLinesExcess());
+            //公户年额度剩余
+            BigDecimal pubYearExcess = new BigDecimal(outAccount.getPubYearExcess());
+            //私户年额度剩余
+            BigDecimal priYearExcess = new BigDecimal(outAccount.getPriYearExcess());
+            //对公单笔限额
+            BigDecimal pubSingleLines = new BigDecimal(outAccount.getPubSingleLines());
+            //对私单笔限额
+            BigDecimal priSingleLines = new BigDecimal(outAccount.getPriSingleLines());
+            //单日转账笔数剩余
+            long dayStrokeNumExcess = Long.parseLong(outAccount.getDayStrokeNumExcess());
+            //申请金额
+            BigDecimal insAccountExcelApplyAmount = new BigDecimal(invAccountExcel.getApplyAmount());
+            //转出账户现支出金额
+            BigDecimal outAccountSpend = new BigDecimal(outAccount.getSpend());
+
+            if (enterAccount.getAccountQuality().equals("0")) {
+                //公户操作
+                if (pubSingleLines.compareTo(insAccountExcelApplyAmount) > 0){
+                    //收入方增加余额
+                    String remark = invAccountExcel.getRemark();
+
+                    list.add(pubAccountUtils(dayStrokeNumExcess,pubDayLinesExcess,pubYearExcess,insAccountExcelApplyAmount,outAccount,outAccountSpend));
+                    list.add(enterAccountUtils(remark, enterAccount, insAccountExcelApplyAmount));
+                    return list;
+                }
+                throw new SystemException("公户转账金额超出单笔限额");
+            } else {
+                if(priSingleLines.compareTo(insAccountExcelApplyAmount) > 0){
+                    //私户操作
+                    String remark = invAccountExcel.getRemark();
+                    list.add(priAccountUtils(dayStrokeNumExcess,priDayLinesExcess,insAccountExcelApplyAmount, priYearExcess,outAccountSpend,outAccount));
+                    list.add(enterAccountUtils(remark, enterAccount, insAccountExcelApplyAmount));
+
+                    return list;
+                }
+                throw new SystemException("私户转账金额超出单笔限额");
+            }
+        }
+        return list;
+    }
+
+
+    /**
+     * 外部转内部方法
+     */
+    public static InvAccount outsideTransfer(InvAccount enterAccount, InvAccountOperate invAccountOperate) {
+        if (enterAccount == null && invAccountOperate == null) {
+            throw new SystemException("收入账户为空");
+        }
+        String remark = invAccountOperate.getRemark();
+        BigDecimal applyAmount = new BigDecimal(invAccountOperate.getApplyAmount());
+
+        return enterAccountUtils(remark, enterAccount, applyAmount);
+    }
+
+    /**
+     * 内部转外部方法
+     */
+    public static List<InvAccount> enterDeTransfer(InvAccount outAccount, InvAccount enterAccount, InvAccountExcel invAccountExcel) {
+        List<InvAccount> list = new ArrayList<>();
+        if (outAccount != null && enterAccount != null && invAccountExcel != null) {
+            //公户单日转账剩余
+            BigDecimal pubDayLinesExcess = new BigDecimal(outAccount.getPubDayLinesExcess());
+            //私户单日转账剩余
+            BigDecimal priDayLinesExcess = new BigDecimal(outAccount.getPriDayLinesExcess());
+            //公户年额度剩余
+            BigDecimal pubYearExcess = new BigDecimal(outAccount.getPubYearExcess());
+            //私户年额度剩余
+            BigDecimal priYearExcess = new BigDecimal(outAccount.getPriYearExcess());
+            //单日转账笔数剩余
+            long dayStrokeNumExcess = Long.parseLong(outAccount.getDayStrokeNumExcess());
+            //申请金额
+            BigDecimal insAccountExcelApplyAmount = new BigDecimal(invAccountExcel.getApplyAmount());
+            //转出账户现支出金额
+            BigDecimal outAccountSpend = new BigDecimal(outAccount.getSpend());
+
+            if (invAccountExcel.getOutAccountQuality().equals("0")) {
+                //公户操作
+                list.add(pubAccountUtils(dayStrokeNumExcess,pubDayLinesExcess,pubYearExcess,insAccountExcelApplyAmount,outAccount,outAccountSpend));
+                return list;
+
+            } else {
+                //私户操作
+                list.add(priAccountUtils(dayStrokeNumExcess,priDayLinesExcess,insAccountExcelApplyAmount, priYearExcess,outAccountSpend,outAccount));
+                return list;
+            }
+        }
+        return list;
+    }
+
+
+    /**
+     * 收入方增加利润方法
+     *
+     * @return
+     */
+    private static InvAccount enterAccountUtils(String remark, InvAccount enterAccount, BigDecimal invAccountExcelApplyAmount) {
+        switch (remark) {
+            case "0":
+                enterAccount.setInsuranceProfit(new BigDecimal(enterAccount.getInsuranceProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "1":
+                enterAccount.setClearingProfit(new BigDecimal(enterAccount.getClearingProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "2":
+                enterAccount.setTianqinProfit(new BigDecimal(enterAccount.getTianqinProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "3":
+                enterAccount.setParkProfit(new BigDecimal(enterAccount.getParkProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "4":
+                enterAccount.setOtherProfit(new BigDecimal(enterAccount.getOtherProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "5":
+                enterAccount.setFiscalProfit(new BigDecimal(enterAccount.getFiscalProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+            case "6":
+                enterAccount.setExteriorProfit(new BigDecimal(enterAccount.getExteriorProfit()).add(invAccountExcelApplyAmount).toString());
+                break;
+        }
+        enterAccount.setBalance(new BigDecimal(enterAccount.getBalance()).add(invAccountExcelApplyAmount).toString());
+        return enterAccount;
+    }
+
+    /**
+     * 公户扣除余额方法
+     */
+    private static InvAccount pubAccountUtils(long dayStrokeNumExcess, BigDecimal pubDayLinesExcess, BigDecimal pubYearExcess, BigDecimal invAccountExcelApplyAmount, InvAccount outAccount,BigDecimal outAccountSpend) {
+        //判断单日转账笔数是否超过
+        if (dayStrokeNumExcess <= 0) {
+            throw new SystemException("公户单日转账笔数不足");
+        }
+        //判断单日转账金额是否超过
+        if (pubDayLinesExcess.compareTo(BigDecimal.valueOf(0)) != 0 && pubDayLinesExcess.compareTo(invAccountExcelApplyAmount) < 0) {
+            throw new SystemException("公户单日转账金额不足");
+        }
+        //判断年额度是否超过
+        if (pubYearExcess.compareTo(BigDecimal.valueOf(0)) != 0 && pubYearExcess.compareTo(invAccountExcelApplyAmount) < 0) {
+            throw new SystemException("公户年额度不足");
+        }
+
+        //支出方减少余额
+        outAccount.setSpend(outAccountSpend.add(invAccountExcelApplyAmount).toString());
+        outAccount.setBalance(new BigDecimal(outAccount.getBalance()).subtract(invAccountExcelApplyAmount).toString());
+        //公户单日转账笔数减少
+        outAccount.setDayStrokeNumExcess(String.valueOf(dayStrokeNumExcess - 1));
+        //公户单日转账剩余减少
+        outAccount.setPubDayLinesExcess(pubDayLinesExcess.subtract(invAccountExcelApplyAmount).toString());
+        //公户年额度减少
+        outAccount.setPubYearExcess(pubYearExcess.subtract(invAccountExcelApplyAmount).toString());
+        return outAccount;
+    }
+    /**
+     * 私户扣除余额方法
+     */
+    private static InvAccount priAccountUtils(long dayStrokeNumExcess, BigDecimal priDayLinesExcess, BigDecimal invAccountExcelApplyAmount, BigDecimal priYearExcess, BigDecimal outAccountSpend,InvAccount outAccount) {
+        if (dayStrokeNumExcess <= 0) {
+            throw new SystemException("私户单日转账笔数不足");
+        }
+        if (priDayLinesExcess.compareTo(BigDecimal.valueOf(0)) != 0 && priDayLinesExcess.compareTo(invAccountExcelApplyAmount) < 0) {
+            throw new SystemException("私户单日转账金额不足");
+        }
+        if (priYearExcess.compareTo(BigDecimal.valueOf(0)) != 0 && priYearExcess.compareTo(invAccountExcelApplyAmount) < 0) {
+            throw new SystemException("私户年额度不足");
+        }
+
+        outAccount.setSpend(outAccountSpend.add(invAccountExcelApplyAmount).toString());
+        outAccount.setBalance(new BigDecimal(outAccount.getBalance()).subtract(invAccountExcelApplyAmount).toString());
+        outAccount.setDayStrokeNumExcess(String.valueOf(dayStrokeNumExcess - 1));
+        outAccount.setPriDayLinesExcess(priDayLinesExcess.subtract(invAccountExcelApplyAmount).toString());
+        outAccount.setPriYearExcess(priYearExcess.subtract(invAccountExcelApplyAmount).toString());
+        return outAccount;
+    }
+
+
+}

+ 1 - 1
src/main/java/com/ydtech/modules/largescreen/controller/DataController.java

@@ -199,7 +199,7 @@ public class DataController {
     public HttpResult todayData(@RequestBody DataQuery dataQuery){
         dataQuery.setOrderStatus("3");
         List<OrderStatusData> orderStatusData = dataService.getOrderStatusData(dataQuery);
-        if(orderStatusData.size() == 0)
+        if(orderStatusData.isEmpty())
         {
             return HttpResult.error("当天无已承包数据");
         }

+ 0 - 15
src/main/java/com/ydtech/modules/order/controller/InsOrdersController.java

@@ -1,21 +1,11 @@
 package com.ydtech.modules.order.controller;
 
-import cn.afterturn.easypoi.excel.entity.ExportParams;
-import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ydtech.aop.request.RequestSingleParam;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.exception.SystemException;
-import com.ydtech.modules.admin.model.SysUserRole;
 import com.ydtech.modules.base.controller.BaseController;
-import com.ydtech.modules.ins.model.InsOrdersExcel;
 import com.ydtech.modules.ins.model.InsOrdersExcelVo;
-import com.ydtech.modules.ins.model.vo.res.InsSettleResVo;
-import com.ydtech.modules.ins.utils.EasyExcelUtils;
-import com.ydtech.modules.ins.utils.ExcelStyleUtil;
-import com.ydtech.modules.ins.utils.ExcelUtils2;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.BasePageResult;
 import com.ydtech.modules.order.entity.InsAccidentalDriving;
@@ -36,12 +26,7 @@ import org.springframework.util.ObjectUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 

+ 5 - 4
src/main/java/com/ydtech/modules/order/controller/ZhongMeiOrderApiController.java

@@ -12,6 +12,7 @@ import com.ydtech.modules.order.aop.QuoteVerification;
 import com.ydtech.modules.order.components.InsOrdersComponents;
 import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
+import com.ydtech.modules.order.entity.api.zhongmei.response.RideAccidentQueryResponse;
 import com.ydtech.modules.order.entity.vo.*;
 import com.ydtech.modules.order.service.ZhongMeiOrderApiService;
 import com.ydtech.modules.order.utils.AESUtilsWithDataBase;
@@ -112,10 +113,10 @@ public class ZhongMeiOrderApiController {
         return this.zhongMeiOrderApiService.getDrivingInsurance(reqVo);
     }
 
-    @PostMapping("/rideAccidentQuery")
-    @ApiOperation(value = "核保状态查询")
-    public HttpResult<Object> rideAccidentQuery(@RequestBody @Valid AccidentalDrivingQueryVo accidentalDrivingVo) {
-        return this.zhongMeiOrderApiService.rideAccidentQuery(accidentalDrivingVo);
+    @PostMapping("/queryRideAccident")
+    @ApiOperation(value = "意外险可投保产品查询")
+    public HttpResult<List<RideAccidentQueryResponse.RideAccidentDTO>> queryRideAccident(@RequestBody GeneralNonCarProductReqVo reqVo) {
+        return this.zhongMeiOrderApiService.rideAccidentQuery(reqVo);
     }
 
 }

+ 18 - 0
src/main/java/com/ydtech/modules/order/dao/InsCopyFeeOrderMapper.java

@@ -0,0 +1,18 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ydtech.modules.order.entity.InsCopyFeeOrder;
+
+/**
+ * @author CXP
+ * @description 针对表【ins_copy_fee_order(报价渠道)】的数据库操作Mapper
+ * @createDate 2023-01-31 15:51:19
+ * @Entity generator.domain.InsAgreementOrder
+ */
+public interface InsCopyFeeOrderMapper extends BaseMapper<InsCopyFeeOrder> {
+
+}
+
+
+
+

+ 111 - 0
src/main/java/com/ydtech/modules/order/entity/InsCopyFeeOrder.java

@@ -0,0 +1,111 @@
+package com.ydtech.modules.order.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ydtech.utils.idgen.IdGenerate;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 订单费用跟单表轨迹表
+ *
+ * @TableName ins_copy_fee_order
+ */
+@TableName(value = "ins_copy_fee_order", autoResultMap = true)
+@Data
+@ApiModel(value = "报价渠道")
+@NoArgsConstructor
+public class InsCopyFeeOrder implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId(value = "id")
+    private String id;
+    /**
+     * 订单号
+     */
+    @TableField(value = "ins_order_no")
+    private String insOrderNo;
+
+    /**
+     * 交强险费用比例
+     */
+    @TableField(value = "jq_costs_proportion_orig")
+    private BigDecimal jqCostsProportionOrig;
+
+    /**
+     * 商业险费用比例
+     */
+    @TableField(value = "sy_costs_proportion_orig")
+    private BigDecimal syCostsProportionOrig;
+
+    /**
+     * 交强险总费用
+     */
+    @TableField(value = "jq_costs_premiums_orig")
+    private BigDecimal jqCostsPremiumsOrig;
+
+    /**
+     * 商业险总费用
+     */
+    @TableField(value = "sy_costs_premiums_orig")
+    private BigDecimal syCostsPremiumsOrig;
+
+    /**
+     * 交强险费用比例
+     */
+    @TableField(value = "jq_costs_proportion")
+    private BigDecimal jqCostsProportion;
+
+    /**
+     * 商业险费用比例
+     */
+    @TableField(value = "sy_costs_proportion")
+    private BigDecimal syCostsProportion;
+
+    /**
+     * 交强险总费用
+     */
+    @TableField(value = "jq_costs_premiums")
+    private BigDecimal jqCostsPremiums;
+
+    /**
+     * 商业险总费用
+     */
+    @TableField(value = "sy_costs_premiums")
+    private BigDecimal syCostsPremiums;
+
+    /**
+     * 处理调整工号
+     */
+    @TableField(value = "deal_user")
+    private String dealUser;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "create_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime createTime;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    public InsCopyFeeOrder(InsFeeOrder insFeeOrder, String insOrderNo,String dealUser) {
+        this.id = IdGenerate.nextId();
+        this.insOrderNo = insOrderNo;
+        this.dealUser = dealUser;
+        this.jqCostsProportionOrig = insFeeOrder.getJqCostsProportion();
+        this.syCostsProportionOrig = insFeeOrder.getSyCostsProportion();
+        this.jqCostsPremiumsOrig = insFeeOrder.getJqCostsPremiums();
+        this.syCostsPremiumsOrig = insFeeOrder.getSyCostsPremiums();
+    }
+
+}

+ 19 - 5
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/ApprovedRequest.java

@@ -1,11 +1,13 @@
 package com.ydtech.modules.order.entity.api.zhongmei.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.ydtech.modules.order.entity.api.zhongmei.response.SubmitResponse;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @author wenks
@@ -46,10 +48,22 @@ public class ApprovedRequest implements Serializable {
     @JsonProperty("payUrl")
     private String payUrl;
     // 意外险投保单号
-    @JsonProperty("proposalNoCP")
-    private String proposalNoCP;
-    // 家财险投保单号
-    @JsonProperty("familyNo")
-    private String familyNo;
+    @JsonProperty("accidentNos")
+    private List<AccidentNo> accidentNos;
 
+    @NoArgsConstructor
+    @Data
+    public static class AccidentNo {
+        /**
+         * 方案代码
+         */
+        @JsonProperty("rideRiskCode")
+        private String rideRiskCode;
+        /**
+         * 意外险单号
+         */
+        @JsonProperty("rideProposalNo")
+        private String rideProposalNo;
+
+    }
 }

+ 19 - 5
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/CoverageRequest.java

@@ -2,12 +2,14 @@ package com.ydtech.modules.order.entity.api.zhongmei.request;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.order.entity.api.zhongmei.BaseRequest;
+import com.ydtech.modules.order.entity.api.zhongmei.response.OrderStatusResponse;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * @author wenks
@@ -48,10 +50,22 @@ public class CoverageRequest extends BaseRequest implements Serializable {
     @JsonProperty("status")
     private int status;
     // 意外险保单号
-    @JsonProperty("accidentPolicyNo")
-    private String accidentPolicyNo;
-    // 家财险保单号
-    @JsonProperty("homeAccidentPolicyNo")
-    private String homeAccidentPolicyNo;
+    @JsonProperty("accidentPolicyNos")
+    private List<AccidentPolicyNo> accidentPolicyNos;
 
+    @NoArgsConstructor
+    @Data
+    public static class AccidentPolicyNo {
+        /**
+         * 方案代码
+         */
+        @JsonProperty("rideRiskCode")
+        private String rideRiskCode;
+        /**
+         * 意外险单号
+         */
+        @JsonProperty("ridePolicyNo")
+        private String ridePolicyNo;
+
+    }
 }

+ 13 - 1
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/QuotedPriceRequest.java

@@ -50,6 +50,9 @@ public class QuotedPriceRequest extends BaseRequest {
 
     public QuotedPriceRequest(BaseQuoteInfoVo baseQuoteInfoVo, ModelsQueryResponse.SimpleStadarCarDTO simpleStadarCarDTO,
                               AccidentalDrivingVo accidentalDrivingVo, ZmConfigureParameters zmConfigureParameters) {
+        //调整非车出单流程是后台写死的非车产品,后续可删除
+        /*accidentalDrivingVo.setQuantity(1);
+        accidentalDrivingVo.setRideRiskCode("52");*/
         this.businessData = new BusinessDataDTO(baseQuoteInfoVo, simpleStadarCarDTO, accidentalDrivingVo, zmConfigureParameters);
     }
 
@@ -112,7 +115,7 @@ public class QuotedPriceRequest extends BaseRequest {
             // 驾意险
             if (!StringUtils.isEmpty(accidentalDrivingVo.getRideRiskCode())) {
                 this.accident = Collections.singletonList(new AccidentDTO(accidentalDrivingVo.getRideRiskCode(),
-                        accidentalDrivingVo.getQuantity()));
+                        accidentalDrivingVo.getQuantity(),"",""));
             }
 
         }
@@ -129,6 +132,15 @@ public class QuotedPriceRequest extends BaseRequest {
             // 投保份数
             @JsonProperty("quantity")
             private int quantity;
+            // 标的房屋结构 家财险必传房屋结构
+            //百万医疗险必传是否有社保(0-无社保 1-有社保)
+            @JsonProperty("attribute3")
+            private String attribute3;
+            // 标的详细地址 家财险和组合险必传
+            @JsonProperty("attribute4")
+            private String attribute4;
+
+
         }
 
 

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/request/RideAccidentQueryRequest.java

@@ -51,12 +51,12 @@ public class RideAccidentQueryRequest extends BaseRequest {
     @Override
     public void setHead(BaseRequestHead head) {
         super.setHead(head);
-        super.getHead().setTransCode(TransCode.SUBMIT_STATUS_QUERY);
+        super.getHead().setTransCode(TransCode.Ride_Accident_Query);
     }
 
     @Override
     public BaseRequestHead getHead() {
-        super.getHead().setTransCode(TransCode.SUBMIT_STATUS_QUERY);
+        super.getHead().setTransCode(TransCode.Ride_Accident_Query);
         return super.getHead();
     }
 }

+ 19 - 2
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/OrderStatusResponse.java

@@ -6,6 +6,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.List;
+
 /**
  * @author wenks
  * @version 0.0.2
@@ -18,8 +20,8 @@ import lombok.NoArgsConstructor;
 public class OrderStatusResponse extends BaseResponse {
     private static final long serialVersionUID = -1745197801630649211L;
 
-    @JsonProperty("accidentNo")
-    private String accidentNo;
+    @JsonProperty("accidentPolicyNos")
+    private List<AccidentPolicyNo> accidentPolicyNos;
 
     @JsonProperty("businessType")
     private String businessType;
@@ -43,4 +45,19 @@ public class OrderStatusResponse extends BaseResponse {
     private String payDate;
 
 
+    @NoArgsConstructor
+    @Data
+    public static class AccidentPolicyNo {
+        /**
+         * 方案代码
+         */
+        @JsonProperty("rideRiskCode")
+        private String rideRiskCode;
+        /**
+         * 意外险单号
+         */
+        @JsonProperty("ridePolicyNo")
+        private String ridePolicyNo;
+
+    }
 }

+ 2 - 2
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/QuotedPriceResponse.java

@@ -31,8 +31,8 @@ public class QuotedPriceResponse extends BaseResponse {
     private PlatformMessage forcePlatformMsg;
     @JsonProperty("bizPlatformMsg")
     private PlatformMessage bizPlatformMsg;
-    @JsonProperty("bizPlatformMsg")
-    private AccidentPrimium rideAccidentPrimium;
+    @JsonProperty("accidentPremium")
+    private List<AccidentPrimium> accidentPremium;
     @JsonProperty("insuranceScheme")
     private InsuranceSchemeDTO insuranceScheme;
     @JsonProperty("platMain")

+ 59 - 32
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/RideAccidentQueryResponse.java

@@ -2,64 +2,91 @@ package com.ydtech.modules.order.entity.api.zhongmei.response;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ydtech.modules.order.entity.api.zhongmei.BaseResponse;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.io.Serializable;
 import java.util.List;
 
 /**
  * @Author: CXP
  * @Date: 2023/10/19 22:28
  */
+@EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
 @Data
+@ApiModel("非车可投保产品")
 public class RideAccidentQueryResponse extends BaseResponse {
 
-
     private static final long serialVersionUID = 823665625721938302L;
 
-    //非车可投保产品信息
     @JsonProperty("rideAccident")
-    private List<RideAccident> rideAccidents;
+    @ApiModelProperty("非车可投保产品信息")
+    private List<RideAccidentDTO> rideAccident;
+
 
     @NoArgsConstructor
     @Data
-    public static class RideAccident {
+    public static class RideAccidentDTO implements Serializable {
+
+        private static final long serialVersionUID = -7482346783799487403L;
+
+        @JsonProperty("accAmountView")
+        @ApiModelProperty("产品保险责任信息展示")
+        private List<AccAmountViewDTO> accAmountView;
+
+        @JsonProperty("divideType")
+        @ApiModelProperty("险种分类 YW--意外险/ZH--组合险、JC--家财险、YL--医疗、GY--个意、CR--传染")
+        private String divideType;
+
+        @JsonProperty("engage")
+        @ApiModelProperty("特别约定")
+        private List<String> engage;
+
+        @JsonProperty("insuranceHabit")
+        @ApiModelProperty("投保习惯")
+        private String insuranceHabit;
+
+        @JsonProperty("maxQuantity")
+        @ApiModelProperty("最大投保份数")
+        private String maxQuantity;
 
-        //方案代码
         @JsonProperty("rideRiskCode")
+        @ApiModelProperty("方案代码")
         private String rideRiskCode;
-        //方案名称
+
         @JsonProperty("rideRiskName")
+        @ApiModelProperty("方案名称")
         private String rideRiskName;
-        //最大投保份数
-        @JsonProperty("maxQuantity")
-        private String maxQuantity;
-        //单位保费
-        @JsonProperty("unitPremium")
-        private String unitPremium;
-        //单位保额
+
         @JsonProperty("unitAmount")
+        @ApiModelProperty("单位保额")
         private String unitAmount;
-        //产品保险责任信息展示
-        @JsonProperty("accAmountView")
-        private List<AccAmountView> accAmountView;
-        //特别约定
-        @JsonProperty("engage")
-        private List<String> engage;
-    }
 
-    @NoArgsConstructor
-    @Data
-    public static class AccAmountView {
-
-        @JsonProperty("insurName")
-        private String insurName;
-        @JsonProperty("amountName")
-        private String amountName;
-        @JsonProperty("userToCalcAmount")
-        private String userToCalcAmount;
-        @JsonProperty("unitFlag")
-        private String unitFlag;
+        @JsonProperty("unitPremium")
+        @ApiModelProperty("单位保费")
+        private String unitPremium;
+
+        @NoArgsConstructor
+        @Data
+        public static class AccAmountViewDTO implements Serializable {
+
+            private static final long serialVersionUID = -74104212491097854L;
+
+            @JsonProperty("amountName")
+            @ApiModelProperty("保险责任对应保额")
+            private String amountName;
+
+            @JsonProperty("insurName")
+            @ApiModelProperty("保险责任名称")
+            private String insurName;
+
+            @JsonProperty("unitFlag")
+            @ApiModelProperty("单位标志")
+            private String unitFlag;
+        }
     }
 }

+ 19 - 2
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/SubmitResponse.java

@@ -6,6 +6,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
 
+import java.util.List;
+
 /**
  * @author wenks
  * @version 0.0.2
@@ -19,8 +21,8 @@ public class SubmitResponse extends BaseResponse {
 
     private static final long serialVersionUID = -8744044197438153449L;
     // 意外险投保单号
-    @JsonProperty("accidentProposalNo")
-    private String accidentProposalNo;
+    @JsonProperty("accidentNos")
+    private List<AccidentNo> accidentNos;
     // 商业险投保单号
     @JsonProperty("bizProposalNo")
     private String bizProposalNo;
@@ -45,4 +47,19 @@ public class SubmitResponse extends BaseResponse {
     @JsonProperty("submitNotion")
     private String submitNotion;
 
+    @NoArgsConstructor
+    @Data
+    public static class AccidentNo {
+        /**
+         * 方案代码
+         */
+        @JsonProperty("rideRiskCode")
+        private String rideRiskCode;
+        /**
+         * 意外险单号
+         */
+        @JsonProperty("rideProposalNo")
+        private String rideProposalNo;
+
+    }
 }

+ 1 - 1
src/main/java/com/ydtech/modules/order/entity/api/zhongmei/response/SubmitStatusQueryResponse.java

@@ -24,7 +24,7 @@ public class SubmitStatusQueryResponse extends BaseResponse {
     @JsonProperty("underWriteInd")
     private String underWriteInd;
 
-    /**
+    /**·
      * 主投保单号
      */
     @JsonProperty("proposalNo")

+ 6 - 0
src/main/java/com/ydtech/modules/order/entity/crawler/response/CrawlerPolicyPrintResponse.java

@@ -42,6 +42,12 @@ public class CrawlerPolicyPrintResponse extends CrawlerBaseResponse {
     @JsonProperty("jyx_info_list")
     private List<JyxInfoListDTO> jyxInfoList;
 
+    /**
+     * 支付时间
+     */
+    @JsonProperty("paytime")
+    private String paytime;
+
     @NoArgsConstructor
     @Data
     public static class JyxInfoListDTO implements Serializable {

+ 39 - 0
src/main/java/com/ydtech/modules/order/entity/vo/AdjustFeeDescVo.java

@@ -0,0 +1,39 @@
+package com.ydtech.modules.order.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class AdjustFeeDescVo {
+
+    @ApiModelProperty("交强总费用比例")
+    private String jqAllFeeRate;
+    @ApiModelProperty("交强手续费比例")
+    private String jqCommissionRate;
+    @ApiModelProperty("交强跟单费比例")
+    private String jqOtherFeeRate;
+    @ApiModelProperty("交强保费")
+    private String jqPremium;
+    @ApiModelProperty("交强总费用金额")
+    private String jqAllFeeAmount;
+    @ApiModelProperty("交强手续费金额")
+    private String jqCommissionAmount;
+    @ApiModelProperty("交强跟单费金额")
+    private String jqOtherFeeAmount;
+
+    @ApiModelProperty("商业总费用比例")
+    private String syAllFeeRate;
+    @ApiModelProperty("商业手续费比例")
+    private String syCommissionRate;
+    @ApiModelProperty("商业跟单费比例")
+    private String syOtherFeeRate;
+    @ApiModelProperty("商业保费")
+    private String syPremium;
+    @ApiModelProperty("交强总费用金额")
+    private String syAllFeeAmount;
+    @ApiModelProperty("交强手续费金额")
+    private String syCommissionAmount;
+    @ApiModelProperty("交强跟单费金额")
+    private String syOtherFeeAmount;
+
+}

+ 27 - 0
src/main/java/com/ydtech/modules/order/entity/vo/AuditOrderFeeVo.java

@@ -0,0 +1,27 @@
+package com.ydtech.modules.order.entity.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author: CXP
+ * @Date: 2024/1/12 22:29
+ */
+@Data
+@ApiModel("订单审核Vo")
+public class AuditOrderFeeVo {
+
+    @ApiModelProperty(value = "订单号")
+    private String orderNo;
+
+    @ApiModelProperty(value = "交强总费用比例")
+    private String jqCostsProportionStr;
+
+    @ApiModelProperty(value = "商业总费用比例")
+    private String syCostsProportionStr;
+
+    @ApiModelProperty(value = "是否修改过 修改:1 未修改:0")
+    private String updateFlag;
+
+}

+ 5 - 0
src/main/java/com/ydtech/modules/order/entity/vo/OrderVo.java

@@ -346,4 +346,9 @@ public class OrderVo implements Serializable {
      */
     private QueryOrderCommissionVo orderCommissionVo;
 
+    /**
+     * 费用审核时调整费用使用
+     */
+    private AdjustFeeDescVo adjustFeeDescVo;
+
 }

+ 2 - 0
src/main/java/com/ydtech/modules/order/entity/vo/QueryOrderFeeVo.java

@@ -22,6 +22,8 @@ public class QueryOrderFeeVo implements Serializable {
     private OrderFeeVo fcCoderFeeVo;
     @JsonProperty("orderCommissionVo")
     private QueryOrderCommissionVo orderCommissionVo;
+    @JsonProperty("adjustFeeDescVo")
+    private AdjustFeeDescVo adjustFeeDescVo;
 
 
 }

+ 44 - 0
src/main/java/com/ydtech/modules/order/service/InsCopyFeeOrderService.java

@@ -0,0 +1,44 @@
+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.InsFeeOrder;
+
+/**
+ * @author CXP
+ * @description 针对表【ins_copy_fee_order(费用跟单)】的数据库操作Service
+ * @createDate 2023-9-12 21:30:24
+ */
+public interface InsCopyFeeOrderService extends IService<InsCopyFeeOrder> {
+
+    /**
+     * 通过子订单查询费用跟单表
+     *
+     * @param companyId 子订单
+     * @return InsAreaCompany
+     */
+    InsCopyFeeOrder getByIdIsExist(String companyId);
+
+
+    /**
+     * 通过 保险公司订单号查询费用跟单表
+     *
+     * @param insOrderNo 保险公司订单号
+     * @return InsAreaCompany
+     */
+    InsCopyFeeOrder getByInsOrderNo(String insOrderNo);
+
+    /**
+     * 修改费用跟单表
+     *
+     * @param insCopyFeeOrder
+     */
+    void updateCompanyAndOrders(InsCopyFeeOrder insCopyFeeOrder);
+
+    /**
+     * 插入费用跟单表
+     *
+     * @param insCopyFeeOrder
+     */
+    void insertCompanyAndOrders(InsCopyFeeOrder insCopyFeeOrder);
+}

+ 3 - 2
src/main/java/com/ydtech/modules/order/service/ZhongMeiOrderApiService.java

@@ -6,6 +6,7 @@ import com.ydtech.modules.ins.model.vo.GeneralNonCarProductResVo;
 import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.order.entity.api.zhongmei.request.ApprovedRequest;
 import com.ydtech.modules.order.entity.api.zhongmei.request.CoverageRequest;
+import com.ydtech.modules.order.entity.api.zhongmei.response.RideAccidentQueryResponse;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingQueryVo;
 import com.ydtech.modules.order.entity.vo.AccidentalDrivingVo;
 import com.ydtech.modules.order.entity.vo.PolicyPrintVo;
@@ -77,8 +78,8 @@ public interface ZhongMeiOrderApiService extends BaseOrderService<AccidentalDriv
 
     /**
      * 非车可投保产品查询
-     * @param accidentalDrivingVo
+     * @param reqVo
      * @return
      */
-    HttpResult<Object> rideAccidentQuery(AccidentalDrivingQueryVo accidentalDrivingVo);
+    HttpResult<List<RideAccidentQueryResponse.RideAccidentDTO>> rideAccidentQuery(GeneralNonCarProductReqVo reqVo);
 }

+ 52 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCopyFeeOrderServiceImpl.java

@@ -0,0 +1,52 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.order.dao.InsCopyFeeOrderMapper;
+import com.ydtech.modules.order.entity.InsCopyFeeOrder;
+import com.ydtech.modules.order.service.InsCopyFeeOrderService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.ObjectUtils;
+
+/**
+ * @author CXP
+ * @description 针对表【ins_copy_fee_order(费用跟单)】的数据库操作Service实现
+ * @createDate 2023-9-12 21:29:23
+ */
+@Service
+public class InsCopyFeeOrderServiceImpl extends ServiceImpl<InsCopyFeeOrderMapper, InsCopyFeeOrder>
+        implements InsCopyFeeOrderService {
+
+
+    @Override
+    public InsCopyFeeOrder getByIdIsExist(String companyId) {
+        InsCopyFeeOrder insCopyFeeOrder = this.getById(companyId);
+        if (ObjectUtils.isEmpty(insCopyFeeOrder)) {
+            throw new SystemException("费用跟单表不存在");
+        }
+        return insCopyFeeOrder;
+    }
+
+    @Override
+    public InsCopyFeeOrder getByInsOrderNo(String insOrderNo) {
+        return baseMapper.selectOne(new LambdaQueryWrapper<InsCopyFeeOrder>().eq(InsCopyFeeOrder::getInsOrderNo, insOrderNo));
+    }
+
+    @Override
+    @Transactional
+    public void updateCompanyAndOrders(InsCopyFeeOrder insCopyFeeOrder) {
+        baseMapper.updateById(insCopyFeeOrder);
+    }
+
+    @Override
+    public void insertCompanyAndOrders(InsCopyFeeOrder insCopyFeeOrder) {
+        baseMapper.insert(insCopyFeeOrder);
+    }
+
+}
+
+
+
+

+ 8 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -40,6 +40,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
 
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -223,6 +225,12 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
             throw new SystemException(response.getMessage());
         }
 
+        // 支付时间
+        if (StringUtils.isNotEmpty(response.getPaytime())) {
+            insAreaCompany.setPayDate(LocalDateTime.parse(response.getPaytime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+            insAreaCompanyService.updateById(insAreaCompany);
+        }
+
         CrawlerPolicyPrintVo crawlerPolicyPrintVo = new CrawlerPolicyPrintVo();
         crawlerPolicyPrintVo.setJqxFlagUrl(gainCarInsPolicy(response.getJqxFlagUrl(), licensePlate + "-交强险标志.pdf", licensePlate));
         crawlerPolicyPrintVo.setJqxPolicyUrl(gainCarInsPolicy(response.getJqxPolicyUrl(), licensePlate + "-交强险保单.pdf", licensePlate));

+ 2 - 2
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -34,7 +34,7 @@ import com.ydtech.modules.ins.model.vo.CarInfoVo;
 import com.ydtech.modules.ins.model.ya.CarModelDTO;
 import com.ydtech.modules.ins.model.ya.ExtendInfoDto;
 import com.ydtech.modules.ins.model.ya.ResponseDataC2;
-import com.ydtech.modules.ins.utils.EasyExcelUtils;
+import com.ydtech.modules.inv.utils.EasyExcelUtils;
 import com.ydtech.modules.order.convert.CarModelDTOConvert;
 import com.ydtech.modules.order.convert.MapToYaExtendInfoDto;
 import com.ydtech.modules.order.dao.InsOrdersMapper;
@@ -495,7 +495,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         //新增费用明细信息
         QueryOrderFeeVo queryOrderFeeVo = feeRuleSchemeService.queryFeeOrderInfo(companyId);
         orderAndAreaCompany.setOrderCommissionVo(queryOrderFeeVo.getOrderCommissionVo());
-
+        orderAndAreaCompany.setAdjustFeeDescVo(queryOrderFeeVo.getAdjustFeeDescVo());
         boolean isShowOrderFee = false;
         //如果是财务菜单进入的,不再进行权限控制,所有都可查看
         if ("accountingUser".equals(userId)) {

+ 51 - 19
src/main/java/com/ydtech/modules/order/service/impl/ZhongMeiOrderApiServiceImpl.java

@@ -240,7 +240,9 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         insAreaCompany.setPaymentLink(response.getPayUrl());
         insAreaCompany.setJqapplyno(response.getForceProposalNo());
         insAreaCompany.setSyapplyno(response.getBizProposalNo());
-//        insAreaCompany.setJyapplyno(response.getAccidentProposalNo());
+        if (response.getAccidentNos() != null) {
+            insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(response.getAccidentNos())));
+        }
         insAreaCompany.setInsOrderNo(response.getProposalNo());
         insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
         insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
@@ -282,7 +284,9 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
                 // 保单号
                 insAreaCompany.setJqpolicyno(coverageRequest.getForcePolicyNo());
                 insAreaCompany.setSypolicyno(coverageRequest.getBizPolicyNo());
-//                insAreaCompany.setJypolicyno(coverageRequest.getAccidentPolicyNo());
+                if (coverageRequest.getAccidentPolicyNos() != null) {
+                    insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(coverageRequest.getAccidentPolicyNos())));
+                }
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
                 insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
             }
@@ -302,7 +306,9 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
             if (AuditStatusEnum.S_1.getCode().equals(approvedRequest.getStatusCode())) {
                 insAreaCompany.setJqapplyno(approvedRequest.getProposalNoJ());
                 insAreaCompany.setSyapplyno(approvedRequest.getProposalNoS());
-//                insAreaCompany.setJyapplyno(approvedRequest.getProposalNoCP());
+                if (approvedRequest.getAccidentNos() != null) {
+                    insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(approvedRequest.getAccidentNos())));
+                }
                 insAreaCompany.setPaymentLink(approvedRequest.getPayUrl());
                 insAreaCompany.setOrderstatus(InsOrderStatusEnum.WAIT_PAY.getCode());
             } else {
@@ -347,7 +353,9 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
             if (StringUtils.isNotEmpty(payDate)) {
                 insAreaCompany.setPayDate(LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
             }
-//            insAreaCompany.setJypolicyno(orderStatusResponse.getAccidentNo());
+            if (orderStatusResponse.getAccidentPolicyNos() != null) {
+                insAreaCompany.setCrossInsurance(JSON.parseArray(JSON.toJSONString(orderStatusResponse.getAccidentPolicyNos())));
+            }
             insAreaCompany.setOrderstatus(InsOrderStatusEnum.ACCEPT_INSURANCE.getCode());
             insAreaCompanyService.updateCompanyAndOrders(insAreaCompany);
 
@@ -372,6 +380,16 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
             policyNo = insAreaCompany.getJqpolicyno();
         } else if (InsuranceRisk.BUSINESS.getCode().equals(riskCode)) {
             policyNo = insAreaCompany.getSypolicyno();
+        } else if (InsuranceRisk.ACCIDENT.getCode().equals(riskCode)) {
+            List<OrderStatusResponse.AccidentPolicyNo> accidentPolicyNos = null;
+            if (!Objects.isNull(insAreaCompany.getCrossInsurance())) {
+                accidentPolicyNos = JSON.parseArray(JSON.toJSONString(insAreaCompany.getCrossInsurance()),
+                        OrderStatusResponse.AccidentPolicyNo.class);
+                OrderStatusResponse.AccidentPolicyNo accidentPolicyNo = accidentPolicyNos.get(0);
+                policyNo = accidentPolicyNo.getRidePolicyNo();
+            } else {
+                throw new SystemException("险种代码不存在");
+            }
         } else {
             throw new SystemException("险种代码不存在");
         }
@@ -380,10 +398,15 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         InsurancePolicyPrintRequest request = new InsurancePolicyPrintRequest();
         //获取能源种类
         CarInfoVo carInfoVo = JSON.toJavaObject(order.getCarinfo(), CarInfoVo.class);
-        request.setRiskCode(InsuranceTypeCorrespondence.getZhongMei_RISK().get(carInfoVo.getEnergyType()).get(riskCode));
+        if (!InsuranceRisk.ACCIDENT.getCode().equals(riskCode)) {//非车险不传险种代码
+            request.setRiskCode(InsuranceTypeCorrespondence.getZhongMei_RISK().get(carInfoVo.getEnergyType()).get(riskCode));
+        }else {
+            request.setBusinessType(DocumentTypeEnum.EP.getCode());
+        }
         request.setPolicyNo(policyNo);
         request.setDocumentType(code);
         request.setHead(new BaseRequestHead(zmConfigureParameters));
+
         InsurancePolicyPrintResponse response = zhongmeiRequestApiComponents.insurancePolicyPrint(request,
                 InsurancePolicyPrintResponse.class);
         if ("1".equals(response.getStatusCode())) {
@@ -395,11 +418,16 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
                 if ("DZ_AJ".equals(code)) {
                     templateName = "-交强险标志.pdf";
                 } else if ("DZ_AE".equals(code)) {
-                    if ("0330".equals(request.getRiskCode())) {
-                        templateName = "-交强险保单.pdf";
+                    if (StringUtils.isNotEmpty(request.getRiskCode())) {
+                        if ("0330".equals(request.getRiskCode())) {
+                            templateName = "-交强险保单.pdf";
+                        } else {
+                            templateName = "-商业险保单.pdf";
+                        }
                     } else {
-                        templateName = "-商业险保单.pdf";
+                        templateName = "-非车险保单.pdf";
                     }
+
                 }
                 String transferUrl = gainCarInsPolicy(url, licensePlate + templateName, licensePlate);
                 List<String> transferUrlList = new ArrayList<>();
@@ -509,17 +537,21 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
         quoteRespVo.setILogPreUdwMess(zmScore);//评分
         quoteRespVo.setOrderno(yaQuoteInfoVo.getOrderNo()); //订单号
 
-        /*QuotedPriceResponse.AccidentPrimium accidentPrimium = quotedPriceResponse.getRideAccidentPrimium();
-        if(accidentPrimium!=null){
+        List<QuotedPriceResponse.AccidentPrimium> accidentPrimiumList = quotedPriceResponse.getAccidentPremium();
+        if (accidentPrimiumList != null && accidentPrimiumList.size() > 0) {
+            QuotedPriceResponse.AccidentPrimium accidentPrimium = accidentPrimiumList.get(0);
             AccidentResponseVo accidentResponseVo = new AccidentResponseVo();
             accidentResponseVo.setProjectCode(accidentPrimium.getRideRiskCode());
             accidentResponseVo.setProjectName(accidentPrimium.getRideRiskName());
-            accidentResponseVo.setQuantity(accidentPrimium.getQuantity());
-            accidentResponseVo.setPremium(accidentPrimium.getUnitPremium());
-            accidentResponseVo.setActualPremium(accidentPrimium.getSumPremium());
+            accidentResponseVo.setQuantity(String.valueOf(accidentPrimium.getQuantity()));
+            accidentResponseVo.setPremium(String.valueOf(accidentPrimium.getUnitPremium()));
+            accidentResponseVo.setActualPremium(String.valueOf(accidentPrimium.getSumPremium()));
+            quoteRespVo.setJyPremium(accidentPrimium.getSumPremium());
+            quoteRespVo.setSumPermium(CalculateUtils.add(quoteRespVo.getSumPermium(), quoteRespVo.getJyPremium()));//重算保费合计
             List<AccidentResponseVo> accidentResponseVoList = new ArrayList<>();
-            quoteRespVo.setAccident();
-        }*/
+            accidentResponseVoList.add(accidentResponseVo);
+            quoteRespVo.setAccident(accidentResponseVoList);
+        }
         return quoteRespVo;
     }
 
@@ -580,20 +612,20 @@ public class ZhongMeiOrderApiServiceImpl implements ZhongMeiOrderApiService {
     }
 
     @Override
-    public HttpResult<Object> rideAccidentQuery(AccidentalDrivingQueryVo accidentalDrivingVo) {
+    public HttpResult<List<RideAccidentQueryResponse.RideAccidentDTO>> rideAccidentQuery(GeneralNonCarProductReqVo reqVo) {
         // 1. 协议id获取配置实体
         ZmConfigureParameters zmConfigureParameters = configureParametersComponents.toEntity(ZmConfigureParameters.class,
-                accidentalDrivingVo.getAgreementId());
+                reqVo.getAgreementId());
 
         // 2. 组装请求体
         RideAccidentQueryRequest rideAccidentQueryRequest = new RideAccidentQueryRequest(zmConfigureParameters);
-        rideAccidentQueryRequest.setSeats(accidentalDrivingVo.getSeatNum());
+        rideAccidentQueryRequest.setSeats(Integer.parseInt(reqVo.getSeatNum()));
         rideAccidentQueryRequest.setHead(new BaseRequestHead(zmConfigureParameters));
 
         RideAccidentQueryResponse rideAccidentQueryResponse = zhongmeiRequestApiComponents.rideAccidentQuery(rideAccidentQueryRequest,
                 RideAccidentQueryResponse.class);
 
-        return HttpResult.ok("");
+        return HttpResult.ok(rideAccidentQueryResponse.getRideAccident());
     }
 
     /**

+ 69 - 0
src/main/java/com/ydtech/modules/xxl/handler/InvAccountHandler.java

@@ -0,0 +1,69 @@
+package com.ydtech.modules.xxl.handler;
+
+import com.xxl.job.core.handler.annotation.XxlJob;
+import com.ydtech.modules.inv.model.InvAccount;
+import com.ydtech.modules.inv.service.InvAccountService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 重置额度定时任务
+ *
+ * @author jianlong
+ * @date 2024-01-11 10:38
+ */
+@Component
+public class InvAccountHandler {
+
+
+    @Autowired
+    private InvAccountService insAccountService;
+
+    Logger logger = LoggerFactory.getLogger(getClass());
+
+    @XxlJob("insAccountHandlerDay")
+    public void insAccountHandlerDay() {
+        // 获取当前时间
+        LocalDateTime currentDateTime = LocalDateTime.now();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+        logger.info("重置日额度开始" + currentDateTime.format(formatter));
+
+        List<InvAccount> invAccounts = insAccountService.list();
+        List<InvAccount> invAccountList = new ArrayList<>();
+        for (InvAccount insAccount : invAccounts) {
+            insAccount.setDayStrokeNumExcess(insAccount.getDayStrokeNum());
+            insAccount.setPubDayLinesExcess(insAccount.getPubDayLines());
+            insAccount.setPriDayLinesExcess(insAccount.getPriDayLines());
+            invAccountList.add(insAccount);
+        }
+        insAccountService.updateBatchById(invAccountList);
+        LocalDateTime currentDateTime2 = LocalDateTime.now();
+        logger.info("重置日额度结束" + currentDateTime2.format(formatter));
+    }
+
+    @XxlJob("insAccountHandlerYear")
+    public void insAccountHandlerYear() {
+        LocalDateTime currentDateTime = LocalDateTime.now();
+        logger.info("重置年额度开始" + currentDateTime);
+
+        List<InvAccount> invAccounts = insAccountService.list();
+        List<InvAccount> invAccountList = new ArrayList<>();
+        for (InvAccount invAccount : invAccounts) {
+            invAccount.setPubYearExcess(invAccount.getPubDayLines());
+            invAccount.setPriYearExcess(invAccount.getPriDayLines());
+            invAccountList.add(invAccount);
+        }
+        insAccountService.updateBatchById(invAccountList);
+        LocalDateTime currentDateTime2 = LocalDateTime.now();
+        logger.info("重置年额度结束" + currentDateTime2);
+    }
+
+
+}

+ 0 - 362
src/main/resources/application-dev.yml

@@ -1,362 +0,0 @@
-spring:
-  datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    druid:
-      # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
-      connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-      filters: stat,wall,log4j
-      # 初始化大小,最小,最大
-      initial-size: 5
-      maxActive: 20
-      maxPoolPreparedStatementPerConnectionSize: 20
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      minIdle: 5
-      # 打开PSCache,并且指定每个连接上PSCache的大小
-      poolPreparedStatements: true
-      testOnBorrow: true
-      testOnReturn: true
-      testWhileIdle: true
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      validationQuery: SELECT 1 FROM DUAL
-#    # 本地
-#    url: jdbc:p6spy:mysql://127.0.0.1:3306/zgdd?serverTimezone=Asia/Shanghai&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
-#    username: root
-#    password: root
-    # 测试库
-      url: jdbc:mysql://47.92.254.66:3306/zgdd?serverTimezone=Asia/Shanghai&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true
-      username: root
-      password: '@RqGHG#KZ*C9ytkQ'
-    # 生产库
-      #password: 'Iy$@$koH@oURxyvw'
-      #url: jdbc:mysql://121.89.62.56:3306/agent?serverTimezone=Asia/Shanghai&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true
-      #username: sxzgkj
-  # redis 配置
-  redis:
-    database: 5
-    #host: 127.0.0.1
-    host: 121.40.215.87
-    lettuce:
-      pool:
-        # 连接池最大连接数
-        max-active: 8
-        # 连接池中的最大空闲连接
-        max-idle: 8
-        # 连接池最大阻塞等待时间(使用负值表示没有限制)
-        max-wait: 100
-        # 连接池中的最小空闲连接
-        min-idle: 0
-    #password: aaaaaa
-    password: guoguo.123
-    port: 6379
-    timeOut: 3000
-  servlet:
-    multipart:
-      # 最大支持文件大小
-      max-file-size: 2000MB
-      # 最大支持请求大小
-      max-request-size: 2000MB
-
-
-
-CallbackUrl: http://47.92.254.66:8080/zm/Underwriting
-RGCallbackUrl: http://47.92.254.66:8080/zm/ArtificialUnderwriting
-Specialaccount: 99999999999999
-TAInsureUrl: https://testow.95505.cn/cpf/tianan_cpf/access/car/insureConfirmation.mvc
-TAModelUrl: https://testow.95505.cn/cpf/tianan_cpf/access/car/queryCarModel.mvc
-TAPayUrl: https://testow.95505.cn/cpf/tianan_cpf/common/pay/applyPay.do
-TAQuoteUrl: https://testow.95505.cn/cpf/tianan_cpf/access/car/premiumAccurate.mvc
-#天安API测试参数
-TASign: gIpr5j5haL7T8WJY7ZS54JdlYL/7PToQOy505Mr/iH3qN4SMpJJVdvxFE1/KsWH0EjDxR9qVwRC/t6kLCJo+Y1AB+FD1qNjkbLyEQ+9aeQEF2Af/4bJqUDArewHHT879o5IqzHg/lcg=
-TAUploadUrl: https://testow.95505.cn/cpf/tianan_cpf/access/car/thirdUploadAttach.mvc
-ZMIMGUrl: https://test.echinacoal.com/singlePlatform/others/
-ZMSMSUrl: https://test.echinacoal.com/singlePlatform/prpall/
-ZMToken: THIRDSCOuloft2020052818346904zmYBSX
-#中煤接口测试地址
-ZMUrl: https://test.echinacoal.com/singlePlatform/
-aly:
-  cbit:
-    #================ 阿里云部署对接保信服务器==============#
-    url_pre: http://223.70.186.115:8080/CBIT/API/insCBIT
-  pay:
-    html_path: C:\soft\apache-tomcat-8.5.75\webapps\html\
-    url_pre: http://test.baoxianzhanggui.com:8080
-apk:
-  path: /usr/local/apache-tomcat-8.5.73/webapps/app/android/
-# 安盛天平
-as:
-  audit:
-    url: /as/jiaofei
-    # 安盛天平爬虫接口
-  domain: http://47.92.254.66:8088
-  image:
-    url: /as/yxsc
-  quote:
-    url: /as/bfjs
-
-
-#================ 中保信接口对接--开始==============#
-## 接口地址
-cbit:
-  ### 合作伙伴-加解密秘钥对  私钥+公钥
-  HZHB_PRIVATE_KEY: MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJnWpyVLFBli1kakBXUjk/SmH+X1X0kGGik0ub1MXnNUOk9NBqRQjO6G9A6wdiGzo9j9w26u5u9R6R6De843YMhgW6iIoDodexvZzInxTE+YY52iUBDCcksHYAM7uHZBtdXKovm+bEzL0nwa89Xw6zyuCm8x7enoDiVzs/75WoqrAgMBAAECgYAnEcC5U+vy1oscvaM1MKfuxhHr0Pk2DnquZFmXncGPAKEeaq15JYvlOBjbci1OOdUu0qPDhF/Z/694tGPI53+If0MkS3VpxaOYc+i/G/KQiYZIu1hjUb2F8j8xQrF60WkIsqwzjJYF9T5MCjLEZvDg9cPzFY+QpS8yl5Cbl0aOYQJBAMd+0VtQYV9q3nsZgEk4ux6Vz19SakRbk9zkz1yBUKRfWcLa1T9DleaBqGdkdZbO8v6PCtyz6Fdymq+USYWeV3UCQQDFaU5O8GeNr07J6quTgHgsbN8IV28Wp4wKmDAXCWlehkGGoTm11FOL2zxItjgmmHGyXBA08osPCojBPptOazWfAkEAmG3K04WwUPLcOZy7i7cAKpd3ErNrJP4AFcjytBDOqDl+4UbJp4QhljW9kfqNaoSH4H81YntIbQDRNpUMND9PPQJBAKWfnBuOhtLQagHt6NVvy2M6VETjVkhjeZLJ7E7njofHi+IwEgMDiLSl0wYOGz4GWB2UL+S8OP79j47Rv+si93ECQQCNqD8nMcVXIHKze7aM9c8v1yfgEdk8IpVhAbiXbRs3ANTT4Jx2M6GNBEeEAorHqO4eOTxdObNuz/RADoRnpzHk
-  HZHB_PUBLIC_KEY: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCZ1qclSxQZYtZGpAV1I5P0ph/l9V9JBhopNLm9TF5zVDpPTQakUIzuhvQOsHYhs6PY/cNurubvUekeg3vON2DIYFuoiKA6HXsb2cyJ8UxPmGOdolAQwnJLB2ADO7h2QbXVyqL5vmxMy9J8GvPV8Os8rgpvMe3p6A4lc7P++VqKqwIDAQAB
-  ### 中介平台-加解密秘钥对 私钥+公钥
-  ZJPT_PUBLIC_KEY: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDKbJHlAPiXza9A7Mfs2cLvysKa5GjdMtG1QQv8oADkAgcdujRq0aHVjNFXoVm7b1DdlhEAdhKXJ7XyY/2zoEbpoU4YxzIftloHZ0vd/k4vgAg5beH972jpWZj6N3ER+EgR73+Ui0p0pdXIRjDF4o8mWSLw8W8Z93eILtLg0DcOIwIDAQAB
-  aly:
-    ##================ 保信回调阿里云接服务器==============#
-    url_pre: http://47.92.254.66:8080/API/insCBIT
-  api10: /pjms/insurance/open/unify/order/cancelUnderwriting
-  api11: /pjms/insurance/open/unify/order/getVerificationCode
-  api12: /pjms/insurance/open/unify/order/commitVerificationCode
-  api14: /pjms/insurance/open/unify/order/sendEleApplicationSign
-  api17: /pjms/insurance/open/unify/order/viewToPay
-  api2: /pjms/insurance/open/unify/order/getInitParams
-  api3: /pjms/insurance/open/unify/order/generateOrderNo
-  api4: /pjms/insurance/open/unify/vehicle/getTMBVerificationCode
-  api5: /pjms/insurance/open/unify/vehicle/queryVehicleModel
-  api6: /pjms/insurance/open/unify/vehicle/confirmVehicle
-  api7: /pjms/insurance/open/unify/order/quote
-  api8: /pjms/insurance/open/unify/order/postUnderwriting
-  api9: /pjms/insurance/open/unify/order/applyPay
-  carDealerCode_pingan: 224189117001
-  franchiserChannelCode_pingan: QIAOYRXX-00001
-  franchiserChannelId_pingan: CBIT01240000
-  franchiserChannelId_taiping: CBIT01240000
-  franchiserChannelId_taipingyang: CBIT01240000
-  ### 中介机构id
-  franchiserId: taiyuantianqin-001
-  groupCode_taiping: S132001
-  insurerBranchCode_pingan: 140000
-  insurerBranchCode_taiping: 140000
-  insurerBranchCode_taipingyang: 140000
-  ### ip地址
-  ip: 10.23.69.89
-  url_pre: http://88.88.1.51:5017
-#================ 中保信接口对接--结束==============#
-
-#文件上传路径测试
-filePath: C:/soft/apache-tomcat-8.5.75/webapps/upload/
-
-# 恒邦
-hb:
-  audit:
-    url: http://47.92.254.66:8088/hb/hb_hebao
-  getPolicyPrint:
-    url: http://47.92.254.66:8088/hb/hb_bdsearch
-  image:
-    url: http://47.92.254.66:8088/hb/hb_phoup
-  quote:
-    url: http://47.92.254.66:8088/hb/hb_bfjs
-
-#华农
-hn:
-  vin:
-    search:
-      #华农vin码查询
-      url: http://47.92.254.66:8088/hn/vinsearch
-master:
-  password:
-    ciphertext: 9d3b721959d63c10173d378e82aaecf2
-    salt: 7cb112e917a8446f8616
-mybatis:
-  configuration:
-    map-underscore-to-camel-case: true
-  #mybatis xml文件扫描路径
-  mapper-locations: classpath:mapper/**/*.xml
-  type-aliases-package: com.ydtech.modules.*.model
-mybatis-plus:
-  configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-##测试地址
-netUrl: http://47.92.254.66:8080/
-open:
-  method:
-    log: true
-##平安
-pa:
-  vin:
-    search:
-      #平安vin码查询
-      url: http://47.92.254.66:8888/pingan/vinSearch
-
-#================ mybatis pagehelper ==============#
-pagehelper:
-  helper-dialect: mysql
-  params: count=countSql
-  reasonable: true
-  support-methods-arguments: true
-pyramid:
-  dept:
-    id: 99D05
-
-# 人保
-rb:
-  audit:
-    url: http://47.92.254.66:8088/rb/jiaofei
-  brand:
-    search:
-      url: http://47.92.254.66:8088/rb/brandsearch
-  car:
-    search:
-      url: http://47.92.254.66:8088/rb/carsearch
-  domain: http://47.92.254.66:8088/rb
-  quote:
-    url: http://47.92.254.66:8088/rb/bfjs
-
-resp_json: '{"code":200,"msg":null,"data":{"busUniqueId":"P_YBX_TESTT0NukiEN02OGDABB","total":3518.79,"insureId":null,"businessPolicy":{"specialTermItems":null,"coverages":null,"applicationNo":"53201093900246326035"},"trafficPolicy":{"specialTermItems":null,"coverages":null,"applicationNo":"53201093900246326036"},"propertyPolicies":null,"casualtyPolicies":null}}'
-server:
-  servlet:
-    encoding:
-      charset: UTF-8
-      force: true
-
-upload:
-  # 路径带上前后斜杆
-  basepath: ${filePath}
-  file:
-    # 上传目录
-    path: D:/upload/
-    # 映射路劲
-    url: /upload/
-  host: ''
-  password: ''
-  url: ${netUrl}
-  username: ''
-wechat:
-  open:
-    componentAppId: wx612ca90988c46947
-    componentSecret: 75b7d4cda453b2075dec23f849278bc0
-
-#================ 永安 ==============#
-ya:
-  callbackUrl: http://test.baoxianzhanggui.com:8080/order/yongAn/updatePolicy
-  #  comCode: 214040020000
-  #  consumerAccessKey: 123456test
-  #  consumerID: 102120
-  #  matchCode: 10212014040001
-  url: https://tapi.yaic.com.cn/auto/issue
-  sign: https://tapi.yaic.com.cn/auto/debug/generate-access-key
-#  userCode: 10061765
-
-##永诚
-yc:
-  api:
-#    agent:
-#      # 机构代码(dptCde)
-#      dptCde: 14A4
-#      # 渠道编码(agentCode)
-#      agentCode: 250000P00004
-#      # 协议编码(conferCode)
-#      conferCode: 250000P0000401
-#      # 渠道分类(agentType)
-#      agentType: 191010
-#      # 代理人名称(agentNme)
-#      agentNme: 永鑫保险销售服务有限公司山西分公司
-#      # 代理人资格证号(qlftNo)
-#      qlftNo: 2752454675645
-#      # 录入人(operatorCode)
-#      operatorCode: 100030057
-#      # 业务员代码(salesmanNo)
-#      salesmanNo: 100030057
-#      # 新业务来源(CChaType)
-#      CChaType: 191010
-#      # 客户性质(custNature)
-#      custNature: 192099
-#      # 操作人员代码(cOprcde)
-#      cOprcde: 100030057
-#      # 业务来源(cBsnsTyp)
-#      cBsnsTyp: 19002
-#    password: yc@20230202!
-    pay:
-      callBack: http://127.0.0.1:8080/api/yongCheng/callBack
-#    url: http://140.206.189.151:17000/
-    # 生产
-    url: http://www.yongcheng.com:17002/
-#    userName: yctest1
-  audit:
-    url: /yc/jiaofei
-  domain: http://47.92.254.66:8088
-  getPolicyPrint:
-    url: /yc/bdxz
-  image:
-    url: /yc/yxsc
-  quote:
-    url: /yc/bfjs
-
-#中煤
-zm:
-  ascription:
-    url: ${zm.domain}/ascription
-  audit:
-    url: ${zm.domain}/audit
-  #domain: http://47.92.254.66:8888/zm
-  domain: http://sxzgkj.baoxianzhanggui.com/zm/zm
-  getPolicyPrint:
-    url: ${zm.domain}/getPolicyPrint
-  image:
-    url: ${zm.domain}/yxsc
-  manualUnderwriting:
-    url: ${zm.domain}/manualUnderwriting
-  modelQuery:
-    url: ${zm.domain}/modelQuery
-  quote:
-    url: ${zm.domain}/quotedPrice
-  verifyPayment:
-    url: ${zm.domain}/verifyPayment
-  vinSearch:
-    url: ${zm.domain}/vinSearch
-  # 测试
-  api:
-    source: 326
-    token: THIRDSCOuloft2020052818346904zmYBSXXHTQ
-    url: https://test.echinacoal.com/singlePlatform/
-    imageUrl: https://test.echinacoal.com/singlePlatform/others/
-    smsUrl: https://test.echinacoal.com/singlePlatform/prpall/
-    pageUrl: http://www.baidu.com
-    callbackDomain: http://39.98.239.48/web-api
-    callbackUrl: /order/zhongMeiApi/underwritingCallback
-    passMsgUrl: /order/zhongMeiApi/auditCallback
-    sessionKey: 1237891234567589
-
-
-image:
-  # 验证码识别
-  identificationUrl: http://sxzgkj.baoxianzhanggui.com/zm/images/recognition
-
-logging:
-  file:
-    path: logs
-
-agreement:
-  shutdown: true
-
-
-# 国任
-guoRen:
-  baseUrl: https://devyun.guorenpcic.com/api/grchannel-interface/httpCurrency/httpJsonCommonEntrance
-  uploadUrl: https://devyun.guorenpcic.com/api/grecar/photo/upload
-  redirectUrl: http://127.0.0.1:8080/api/guoRen/callBack
-
-
-# 华泰
-huaTai:
-  baseUrl: https://gears.pc.ehuatai.com:9040/interFaces/common/AutoInsuranceQuotation.do
-  selfPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBOtXf1T/no13LOuy5ti+/d+SADHns8hAv3+LjhDFsQRbHk3tHhnUNX7I8b25576AVmgraefS7jnpyB299f58PK8WkWZN+UB6pcyEpktrtqOnKcaQSTbkQzaseCW4sCRdoea0alzSXUuXC2FN0pHAE3JkT07e5doX3IHas2GJAkwIDAQAB
-  selfPrivateKey: MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAME61d/VP+ejXcs67Lm2L7935IAMeezyEC/f4uOEMWxBFseTe0eGdQ1fsjxvbnnvoBWaCtp59LuOenIHb31/nw8rxaRZk35QHqlzISmS2u2o6cpxpBJNuRDNqx4JbiwJF2h5rRqXNJdS5cLYU3SkcATcmRPTt7l2hfcgdqzYYkCTAgMBAAECgYAwAAWRDNBLInHyQjj8CR3jWk0Q4giHq7oJqnwaOIRud9zIxwIgym3ZXKRSDvxKnhQOSa3Yh+MblFEmcmJnsoQ4OedLq7FVOw1eur/nw6jMcROT6ZiP512ZGgKZI1OdkQDpjCqM9Vg1brrFuGdV2RwI9ak2bjKbi7vs6slvd4r3AQJBAOqU+5xkyuaupg9cO/7TIxMgnTQH8W7IC1uDcx3f28QdkP+udJYfU/n1dYyGuhkW66KVANSqz4dsrEiAmfhvydECQQDS304+LEvPi4j8YmNlOXrs1o8H0tPB69svC9ER2YbrTjZf49XvY9fuor11XAprXZhBp8yvJu07FuRWilrQ8FkjAkEAop1qmqzIdweE+ErxECJfQygtsd77v9cPAH5sM752Q0pXtNbD3TmUZkeBGExg/3mDGW5/Z+2M9Y0hFRWJJs6fsQJAO11mV5Z82Tb9H6BLPyoJczeMGLW/q65MjFgVSaMlmoTwRdqMVdKT7bifAbUhscwtmv40X3LkAmiVa8+TdZLUZQJACu2NgPZkw6gjKCZf5xOfvKaC3PqKlhPghq+ypyutzTih9y81+EBJ25emLWNcd5BtIZ/AXmr3UUiGg0zX4s5njA==
-  huaTaiPublicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYyF2SBNzLOP5N5fFW2T2eQ5+iaI5wVpsedu+UY290TVuG152tkdtSuTXsx+8BKnd79/PF966/2aSP4EUm7vD9kvQUnX2EDUiMooorGvDTRxoHNXFGqOtxdMiUOuqx19HwNb4gOXZ1WdjWJwSmqC6ZP6OgxKIotCHJwe826Q/w8wIDAQAB
-
-# api url
-api:
-  url: http://39.98.239.48/web-api
-#大家财险api
-dajia:
-  api:
-    url: https://ics-test.djbx.com/sip-agent/simpleRequest/
-    encryptKey: "qwertyuiopasdfgh"
-qrcode:
-  genAddress: http://39.98.239.48/order/qrCode/index

+ 124 - 0
src/main/resources/mapper/modules/inv/InvAccountExcelMapper.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.inv.dao.InvAccountExcelMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.InvAccountExcel">
+            <id property="excelAccountOperateId" column="excel_account_operate_id" jdbcType="VARCHAR"/>
+            <result property="company" column="company" jdbcType="VARCHAR"/>
+            <result property="applicant" column="applicant" jdbcType="VARCHAR"/>
+            <result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
+            <result property="applySector" column="apply_sector" jdbcType="VARCHAR"/>
+            <result property="collectionMessage" column="collection_message" jdbcType="VARCHAR"/>
+            <result property="fundFlow" column="fund_flow" jdbcType="VARCHAR"/>
+            <result property="fundUse" column="fund_use" jdbcType="VARCHAR"/>
+            <result property="remark" column="remark" jdbcType="VARCHAR"/>
+            <result property="applyAmount" column="apply_amount" jdbcType="VARCHAR"/>
+            <result property="bigApplyAmount" column="big_apply_amount" jdbcType="VARCHAR"/>
+            <result property="uplodePath" column="uplode_path" jdbcType="VARCHAR"/>
+            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="enterAccountId" column="enter_account_id" jdbcType="VARCHAR"/>
+            <result property="outAccountId" column="out_account_id" jdbcType="VARCHAR"/>
+            <result property="transferFlag" column="transfer_flag" jdbcType="CHAR"/>
+            <result property="outFlag" column="out_flag" jdbcType="CHAR"/>
+            <result property="outAccountQuality" column="out_account_quality" jdbcType="CHAR"/>
+            <result property="delFlag" column="del_flag" jdbcType="CHAR"/>
+        <result property="payMethod" column="pay_method" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        excel_account_operate_id,company,applicant,
+        apply_time,apply_sector,collection_message,
+        fund_flow,fund_use,remark,
+        apply_amount,big_apply_amount,uplode_path,
+        update_by,update_time,create_by,
+        create_time,enter_account_id,out_account_id,
+        del_flag,out_flag,out_account_quality,transfer_flag,pay_method
+    </sql>
+    <select id="selectExcelAccount" resultType="com.ydtech.modules.inv.model.InvAccountExcel">
+        select
+            <include refid="Base_Column_List"/>
+        from inv_account_excel
+        where
+            del_flag = '0'
+        <if test="insAccountExcel.excelAccountOperateId!= null and insAccountExcel.excelAccountOperateId!= ''">
+            and excel_account_operate_id = #{insAccountExcel.excelAccountOperateId}
+        </if>
+        <if test="insAccountExcel.company!= null and insAccountExcel.company!= ''">
+            and company = #{insAccountExcel.company}
+        </if>
+        <if test="insAccountExcel.applicant!= null and insAccountExcel.applicant!= ''">
+            and applicant = #{insAccountExcel.applicant}
+        </if>
+        <if test="insAccountExcel.applyTime!= null">
+            and apply_time &gt;= #{insAccountExcel.applyTime}
+        </if>
+        <if test="insAccountExcel.applyTime!= null">
+            and apply_time &lt;= #{insAccountExcel.applyTime}
+        </if>
+        <if test="insAccountExcel.applySector!= null and insAccountExcel.applySector!= ''">
+            and apply_sector = #{insAccountExcel.applySector}
+        </if>
+        <if test="insAccountExcel.collectionMessage!= null and insAccountExcel.collectionMessage!= ''">
+            and collection_message = #{insAccountExcel.collectionMessage}
+        </if>
+        <if test="insAccountExcel.fundFlow!= null and insAccountExcel.fundFlow!= ''">
+            and fund_flow = #{insAccountExcel.fundFlow}
+        </if>
+        <if test="insAccountExcel.fundUse!= null and insAccountExcel.fundUse!= ''">
+            and fund_use = #{insAccountExcel.fundUse}
+        </if>
+        <if test="insAccountExcel.remark!= null and insAccountExcel.remark!= ''">
+            and remark = #{insAccountExcel.remark}
+        </if>
+        <if test="insAccountExcel.applyAmount!= null and insAccountExcel.applyAmount!= ''">
+            and apply_amount = #{insAccountExcel.applyAmount}
+        </if>
+        <if test="insAccountExcel.bigApplyAmount!= null and insAccountExcel.bigApplyAmount!= ''">
+            and big_apply_amount = #{insAccount}
+        </if>
+        <if test="insAccountExcel.uplodePath!= null and insAccountExcel.uplodePath!= ''">
+            and uplode_path = #{insAccountExcel.uplodePath}
+        </if>
+        <if test="insAccountExcel.updateBy!= null and insAccountExcel.updateBy!= ''">
+            and update_by = #{insAccountExcel.updateBy}
+        </if>
+        <if test="insAccountExcel.updateTime!= null">
+            and update_time &gt;= #{insAccountExcel.updateTime}
+        </if>
+        <if test="insAccountExcel.updateTime!= null">
+            and update_time &lt;= #{insAccountExcel.updateTime}
+        </if>
+        <if test="insAccountExcel.createBy!= null and insAccountExcel.createBy!= ''">
+            and create_by = #{insAccountExcel.createBy}
+        </if>
+        <if test="insAccountExcel.createTime!= null">
+            and create_time &gt;= #{insAccountExcel.createTime}
+        </if>
+        <if test="insAccountExcel.createTime!= null">
+            and create_time &lt;= #{insAccountExcel.createTime}
+        </if>
+        <if test="insAccountExcel.enterAccountId!= null and insAccountExcel.enterAccountId!= ''">
+            and enter_account_id = #{insAccountExcel.enterAccountId}
+        </if>
+        <if test="insAccountExcel.outAccountId!= null and insAccountExcel.outAccountId!= ''">
+            and out_account_id = #{insAccountExcel.outAccountId}
+        </if>
+        <if test="insAccountExcel.outFlag!= null and insAccountExcel.outFlag!= ''">
+            and out_flag = #{insAccountExcel.outFlag}
+        </if>
+        <if test="insAccountExcel.outAccountQuality!= null and insAccountExcel.outAccountQuality!= ''">
+            and out_account_quality = #{insAccountExcel.outAccountQuality}
+        </if>
+        <if test="insAccountExcel.transferFlag!= null and insAccountExcel.transferFlag!= ''">
+            and transfer_flag = #{insAccountExcel.transferFlag}
+        </if>
+        <if test="insAccountExcel.payMethod!= null and insAccountExcel.payMethod!= ''">
+            and pay_method = #{insAccountExcel.payMethod}
+        </if>
+    </select>
+</mapper>

+ 43 - 0
src/main/resources/mapper/modules/inv/InvAccountExpensesMapper.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.inv.dao.InvAccountExpensesMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.InvAccountExpenses">
+            <result property="expensesId" column="expenses_id" jdbcType="VARCHAR"/>
+            <result property="category" column="category" jdbcType="VARCHAR"/>
+            <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
+            <result property="remark" column="remark" jdbcType="VARCHAR"/>
+            <result property="delFlag" column="del_flag" jdbcType="CHAR"/>
+            <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        expenses_id,category,parent_id,
+        remark,del_flag,create_by,
+        create_time,update_by,update_time
+    </sql>
+    <select id="selectExpensesList" resultType="com.ydtech.modules.inv.model.InvAccountExpenses">
+        select
+        <include refid="Base_Column_List"/>
+        from inv_account_expenses
+        where del_flag = '0'
+        <if test="accountExpenses.expensesId != null and accountExpenses.expensesId != ''">
+            and parent_id = #{accountExpenses.expensesId}
+        </if>
+        <if test="accountExpenses.category!= null and accountExpenses.category!= ''">
+            and category = #{accountExpenses.category}
+        </if>
+        <if test="accountExpenses.remark!= null and accountExpenses.remark!= ''">
+            and remark like concat('%',#{accountExpenses.remark},'%')
+        </if>
+        <if test="accountExpenses.parentId!= null and accountExpenses.parentId!= ''">
+            and parent_id like concat('%',#{accountExpenses.parentId},'%')
+        </if>
+        order by expenses_id
+    </select>
+</mapper>

+ 210 - 0
src/main/resources/mapper/modules/inv/InvAccountMapper.xml

@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.inv.dao.InvAccountMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.InvAccount">
+        <id property="accountId" column="account_id" jdbcType="BIGINT"/>
+        <result property="accountName" column="account_name" jdbcType="VARCHAR"/>
+        <result property="bankCardNum" column="bank_card_num" jdbcType="VARCHAR"/>
+        <result property="bankName" column="bank_name" jdbcType="VARCHAR"/>
+        <result property="bank" column="bank" jdbcType="VARCHAR"/>
+        <result property="bankNum" column="bank_num" jdbcType="VARCHAR"/>
+        <result property="startCertExpirationDate" column="start_cert_expiration_date" jdbcType="TIMESTAMP"/>
+        <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
+        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+        <result property="accountQuality" column="account_quality" jdbcType="CHAR"/>
+        <result property="pubSingleLines" column="pub_single_lines" jdbcType="VARCHAR"/>
+        <result property="priSingleLines" column="pri_single_lines" jdbcType="VARCHAR"/>
+        <result property="pubYearLines" column="pub_year_lines" jdbcType="VARCHAR"/>
+        <result property="priYearLines" column="pri_year_lines" jdbcType="VARCHAR"/>
+        <result property="dayStrokeNum" column="day_stroke_num" jdbcType="VARCHAR"/>
+        <result property="pubDayLines" column="pub_day_lines" jdbcType="VARCHAR"/>
+        <result property="priDayLines" column="pri_day_lines" jdbcType="VARCHAR"/>
+        <result property="pubYearExcess" column="pub_year_excess" jdbcType="VARCHAR"/>
+        <result property="priYearExcess" column="pri_year_excess" jdbcType="VARCHAR"/>
+        <result property="fiscalProfit" column="fiscal_profit" jdbcType="VARCHAR"/>
+        <result property="insuranceProfit" column="insurance_profit" jdbcType="VARCHAR"/>
+        <result property="clearingProfit" column="clearing_profit" jdbcType="VARCHAR"/>
+        <result property="exteriorProfit" column="exterior_profit" jdbcType="VARCHAR"/>
+        <result property="parkProfit" column="park_profit" jdbcType="VARCHAR"/>
+        <result property="tianqinProfit" column="tianqin_profit" jdbcType="VARCHAR"/>
+        <result property="otherProfit" column="other_profit" jdbcType="VARCHAR"/>
+        <result property="endCertExpirationDate" column="end_cert_expiration_date" jdbcType="TIMESTAMP"/>
+        <result property="balance" column="balance" jdbcType="VARCHAR"/>
+        <result property="dayStrokeNumExcess" column="day_stroke_num_excess" jdbcType="VARCHAR"/>
+        <result property="pubDayLinesExcess" column="pub_day_lines_excess" jdbcType="VARCHAR"/>
+        <result property="priDayLinesExcess" column="pri_day_lines_excess" jdbcType="VARCHAR"/>
+        <result property="delFlag" column="del_flag" jdbcType="CHAR"/>
+        <result property="outerFlag" column="outer_flag" jdbcType="CHAR"/>
+        <result property="spend" column="spend" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        account_id,
+        account_name,
+        bank_card_num,
+        bank_name,
+        bank,
+        bank_num,
+        start_cert_expiration_date,
+        end_cert_expiration_date,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        account_quality,
+        pub_single_lines,
+        pri_single_lines,
+        pub_year_lines,
+        pri_year_lines,
+        day_stroke_num,
+        pub_day_lines,
+        pri_day_lines,
+        pub_year_excess,
+        pri_year_excess,
+        fiscal_profit,
+        insurance_profit,
+        clearing_profit,
+        exterior_profit,
+        park_profit,
+        tianqin_profit,
+        other_profit,
+        balance,
+        day_stroke_num_excess,
+        pub_day_lines_excess,
+        pri_day_lines_excess,
+        del_flag,
+        outer_flag,
+        spend
+    </sql>
+    <select id="SelectAccountsList" resultType="com.ydtech.modules.inv.model.InvAccount">
+        select
+        <include refid="Base_Column_List"/>
+        from inv_account
+        where del_flag = '0'
+        <if test="account.accountId != null and account.accountId != ''">
+            and account_id = #{account.accountId}
+        </if>
+        <if test="account.accountName!= null and account.accountName!= ''">
+            and account_name like concat('%',#{account.accountName},'%')
+        </if>
+        <if test="account.bankCardNum!= null and account.bankCardNum!= ''">
+            and bank_card_num = #{account.bankCardNum}
+        </if>
+        <if test="account.bankName!= null and account.bankName!= ''">
+            and bank_name = #{account.bankName}
+        </if>
+        <if test="account.bank!= null and account.bank!= ''">
+            and bank = #{account.bank}
+        </if>
+        <if test="account.bankNum!= null and account.bankNum!= ''">
+            and bank_num = #{account.bankNum}
+        </if>
+        <if test="account.startCertExpirationDate!= null">
+            and start_cert_expiration_date &gt;= #{account.startCertExpirationDate}
+        </if>
+        <if test="account.endCertExpirationDate!= null">
+            and end_cert_expiration_date &lt;= #{account.endCertExpirationDate}
+        </if>
+        <if test="account.createBy!= null and account.createBy!= ''">
+            and create_by like concat('%',#{account.createBy},'%')
+        </if>
+        <if test="account.updateBy!= null and account.updateBy!= ''">
+            and update_by like concat('%', #{account.updateBy},'%')
+        </if>
+        <if test="account.createTime!= null">
+            and create_time &gt;= #{account.createTime}
+        </if>
+        <if test="account.createTime != null">
+            and create_time &lt;= #{account.createTime}
+        </if>
+        <if test="account.updateTime!= null">
+            and update_time &gt;= #{account.updateTime}
+        </if>
+        <if test="account.updateTime!= null">
+            and update_time &lt;= #{account.updateTime}
+        </if>
+        <if test="account.accountQuality!= null and account.accountQuality!= ''">
+            and account_quality = #{account.accountQuality}
+        </if>
+        <if test="account.pubSingleLines!= null and account.pubSingleLines!= ''">
+            and pub_single_lines = #{account.pubSingleLines}
+        </if>
+        <if test="account.priSingleLines!= null and account.priSingleLines!= ''">
+            and pri_single_lines = #{account.priSingleLines}
+        </if>
+        <if test="account.pubYearLines!= null and account.pubYearLines!= ''">
+            and pub_year_lines = #{account.pubYearLines}
+        </if>
+        <if test="account.priYearLines!= null and account.priYearLines!= ''">
+            and pri_year_lines = #{account.priYearLines}
+        </if>
+        <if test="account.dayStrokeNum!= null and account.dayStrokeNum!= ''">
+            and day_stroke_num = #{account.dayStrokeNum}
+        </if>
+        <if test="account.pubDayLines!= null and account.pubDayLines!= ''">
+            and pub_day_lines = #{account.pubDayLines}
+        </if>
+        <if test="account.priDayLines!= null and account.priDayLines!= ''">
+            and pri_day_lines = #{account.priDayLines}
+        </if>
+        <if test="account.pubYearExcess!= null and account.pubYearExcess!= ''">
+            and pub_year_excess = #{account.pubYearExcess}
+        </if>
+        <if test="account.priYearExcess!= null and account.priYearExcess!= ''">
+            and pri_year_excess = #{account.priYearExcess}
+        </if>
+        <if test="account.fiscalProfit!= null and account.fiscalProfit!= ''">
+            and fiscal_profit = #{account.fiscalProfit}
+        </if>
+        <if test="account.insuranceProfit!= null and account.insuranceProfit!= ''">
+            and insurance_profit = #{insuranceProfit}
+        </if>
+        <if test="account.clearingProfit!= null and account.clearingProfit!= ''">
+            and clearing_profit = #{account.clearingProfit}
+        </if>
+        <if test="account.exteriorProfit!= null and account.exteriorProfit!= ''">
+            and exterior_profit = #{account.exteriorProfit}
+        </if>
+        <if test="account.parkProfit!= null and account.parkProfit!= ''">
+            and park_profit = #{parkProfit}
+        </if>
+        <if test="account.tianqinProfit!= null and account.tianqinProfit!= ''">
+            and tianqin_profit = #{account.tianqinProfit}
+        </if>
+        <if test="account.otherProfit!= null and account.otherProfit!= ''">
+            and other_profit = #{otherProfit}
+        </if>
+        <if test="account.balance!= null and account.balance!= ''">
+            and balance = #{account.balance}
+        </if>
+        <if test="account.dayStrokeNumExcess!= null and account.dayStrokeNumExcess!= ''">
+            and day_stroke_num_excess = #{account.dayStrokeNumExcess}
+        </if>
+        <if test="account.pubDayLinesExcess!= null and account.pubDayLinesExcess!= ''">
+            and pub_day_lines_excess = #{account.pubDayLinesExcess}
+        </if>
+        <if test="account.priDayLinesExcess!= null and account.priDayLinesExcess!= ''">
+            and pri_day_lines_excess = #{account.priDayLinesExcess}
+        </if>
+        <if test="account.pubYearExcess!= null and account.pubYearExcess!= ''">
+            and pub_year_excess = #{account.pubYearExcess}
+        </if>
+        <if test="account.priYearExcess!= null and account.priYearExcess!= ''">
+            and pri_year_excess = #{account.priYearExcess}
+        </if>
+        <if test="account.delFlag!= null and account.delFlag!= ''">
+            and del_flag = #{account.delFlag}
+        </if>
+        <if test="account.outerFlag != null and account.outerFlag != '' ">
+            and outer_flag = #{account.outerFlag}
+        </if>
+        <if test="account.spend != null and account.spend != ''">
+            and spend = #{account.spend}
+        </if>
+    </select>
+</mapper>

+ 57 - 0
src/main/resources/mapper/modules/inv/InvAccountOperateMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.inv.dao.InvAccountOperateMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.inv.model.InvAccountOperate">
+            <id property="accountOperateId" column="account_operate_id" jdbcType="VARCHAR"/>
+            <result property="applicant" column="applicant" jdbcType="VARCHAR"/>
+            <result property="applySector" column="apply_sector" jdbcType="VARCHAR"/>
+            <result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
+            <result property="collectionMessage" column="collection_message" jdbcType="VARCHAR"/>
+            <result property="fundFlow" column="fund_flow" jdbcType="VARCHAR"/>
+            <result property="fundUse" column="fund_use" jdbcType="VARCHAR"/>
+            <result property="applyAmount" column="apply_amount" jdbcType="VARCHAR"/>
+            <result property="payMethod" column="pay_method" jdbcType="VARCHAR"/>
+            <result property="remark" column="remark" jdbcType="VARCHAR"/>
+            <result property="company" column="company" jdbcType="VARCHAR"/>
+            <result property="bigApplyAmount" column="big_apply_amount" jdbcType="VARCHAR"/>
+            <result property="revenueOutlay" column="revenue_outlay" jdbcType="CHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        account_operate_id,applicant,apply_sector,
+        apply_time,collection_message,fund_flow,
+        fund_use,apply_amount,pay_method,
+        remark,company,big_apply_amount,
+        revenue_outlay
+    </sql>
+    <select id="selectInsAccountOperate" resultMap="BaseResultMap">
+        select
+            <include refid="Base_Column_List"/>
+            from inv_account_operate
+        where 1=1
+        <if test="insAccountOperate.accountOperateId != null and insAccountOperate.accountOperateId != ''">
+            and account_operate_id = #{insAccountOperate.accountOperateId}
+        </if>
+        <if test="insAccountOperate.applicant != null and insAccountOperate.applicant != ''">
+            and applicant = #{insAccountOperate.applicant}
+        </if>
+        <if test="insAccountOperate.applySector != null and insAccountOperate.applySector != ''">
+            and apply_sector = #{insAccountOperate.applySector}
+        </if>
+        <if test="insAccountOperate.applyTime != null">
+            and apply_time = #{insAccountOperate.applyTime}
+        </if>
+        <if test="insAccountOperate.collectionMessage != null and insAccountOperate.collectionMessage != ''">
+            and collection_message = #{insAccountOperate.collectionMessage}
+        </if>
+        <if test="insAccountOperate.fundFlow != null and insAccountOperate.fundFlow != ''">
+            and fund_flow = #{insAccountOperate.fundFlow}
+        </if>
+        <if test="insAccountOperate.revenueOutlay != null and insAccountOperate.revenueOutlay != ''">
+            and revenue_outlay = #{insAccountOperate.revenueOutlay}
+        </if>
+    </select>
+</mapper>

+ 26 - 0
src/main/resources/mapper/modules/order/InsCopyFeeOrder.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ydtech.modules.order.dao.InsCopyFeeOrderMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.order.entity.InsCopyFeeOrder">
+        <id property="id" column="id" jdbcType="VARCHAR"/>
+        <result property="insOrderNo" column="ins_order_no" jdbcType="VARCHAR"/>
+        <result property="jqCostsProportionOrig" column="jq_costs_proportion_orig" jdbcType="DECIMAL"/>
+        <result property="syCostsProportionOrig" column="sy_costs_proportion_orig" jdbcType="DECIMAL"/>
+        <result property="jqCostsPremiumsOrig" column="jq_costs_premiums_orig" jdbcType="DECIMAL"/>
+        <result property="syCostsPremiumsOrig" column="sy_costs_premiums_orig" jdbcType="DECIMAL"/>
+        <result property="jqCostsProportion" column="jq_costs_proportion" jdbcType="DECIMAL"/>
+        <result property="syCostsProportion" column="sy_costs_proportion" jdbcType="DECIMAL"/>
+        <result property="jqCostsPremiums" column="jq_costs_premiums" jdbcType="DECIMAL"/>
+        <result property="syCostsPremiums" column="sy_costs_premiums" jdbcType="DECIMAL"/>
+        <result property="dealUser" column="deal_user" jdbcType="VARCHAR"/>
+        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,insOrderNo,jqCostsProportion,syCostsProportion
+    </sql>
+
+</mapper>

BIN
资金申请单模板.xlsx