Bläddra i källkod

1、拦截设置模板地址。
2、人员相关修改。
3、财务 - 对账功能修改及增加接口。
4、增加财务 - 渠道 - 模板、财务 - 保司模板。

ligang134 3 år sedan
förälder
incheckning
e2081bacf3
33 ändrade filer med 1239 tillägg och 590 borttagningar
  1. 1 0
      src/main/java/com/ydtech/components/TokenInterceptor.java
  2. 1 0
      src/main/java/com/ydtech/config/MvcConfig.java
  3. 17 3
      src/main/java/com/ydtech/modules/admin/controller/SysDeptController.java
  4. 21 8
      src/main/java/com/ydtech/modules/admin/controller/SysRoleController.java
  5. 24 8
      src/main/java/com/ydtech/modules/admin/service/impl/SysDeptServiceImpl.java
  6. 0 3
      src/main/java/com/ydtech/modules/admin/service/impl/SysRoleMenuServiceImpl.java
  7. 15 0
      src/main/java/com/ydtech/modules/demo/controller/DemoController.java
  8. 2 0
      src/main/java/com/ydtech/modules/esm/service/EsmInsCompanyService.java
  9. 11 0
      src/main/java/com/ydtech/modules/esm/service/impl/EsmInsCompanyServiceImpl.java
  10. 89 62
      src/main/java/com/ydtech/modules/inv/controller/InvChannelsExternalBillsDetailsController.java
  11. 85 44
      src/main/java/com/ydtech/modules/inv/controller/InvExternalBillsController.java
  12. 7 3
      src/main/java/com/ydtech/modules/inv/controller/InvInsExternalBillsDetailsController.java
  13. 12 6
      src/main/java/com/ydtech/modules/inv/dao/InvChannelsExternalBillsDetailsMapper.java
  14. 18 109
      src/main/java/com/ydtech/modules/inv/model/InvBaseExternalBillsDetails.java
  15. 56 155
      src/main/java/com/ydtech/modules/inv/model/InvChannelsExternalBillsDetails.java
  16. 21 43
      src/main/java/com/ydtech/modules/inv/model/InvExternalBills.java
  17. 110 3
      src/main/java/com/ydtech/modules/inv/model/InvInsExternalBillsDetails.java
  18. 110 0
      src/main/java/com/ydtech/modules/inv/model/dto/InvInsChannelExcelDto.java
  19. 0 9
      src/main/java/com/ydtech/modules/inv/model/dto/InvInsChinaCoalExcelDto.java
  20. 38 0
      src/main/java/com/ydtech/modules/inv/model/dto/InvInsImportDto.java
  21. 90 0
      src/main/java/com/ydtech/modules/inv/model/dto/InvInsSimpleSysExcelDto.java
  22. 76 0
      src/main/java/com/ydtech/modules/inv/model/dto/InvInsStandardExcelDto.java
  23. 13 0
      src/main/java/com/ydtech/modules/inv/model/vo/req/InvInsExternalBillsDetailsReqVO.java
  24. 17 0
      src/main/java/com/ydtech/modules/inv/model/vo/res/InvBaseChannelMatchInsResVO.java
  25. 8 2
      src/main/java/com/ydtech/modules/inv/service/InvChannelsExternalBillsDetailsService.java
  26. 30 18
      src/main/java/com/ydtech/modules/inv/service/InvExternalBillsService.java
  27. 7 6
      src/main/java/com/ydtech/modules/inv/service/InvInsExternalBillsDetailsService.java
  28. 116 21
      src/main/java/com/ydtech/modules/inv/service/impl/InvChannelsExternalBillsDetailsServiceImpl.java
  29. 54 55
      src/main/java/com/ydtech/modules/inv/service/impl/InvExternalBillsServiceImpl.java
  30. 187 31
      src/main/java/com/ydtech/modules/inv/service/impl/InvInsExternalBillsDetailsServiceImpl.java
  31. 3 1
      src/main/java/com/ydtech/utils/excel/ExcelUtils2.java
  32. BIN
      src/main/resources/template/finance_channel_model_A.xlsx
  33. BIN
      src/main/resources/template/finance_ins_model_A.xlsx

+ 1 - 0
src/main/java/com/ydtech/components/TokenInterceptor.java

@@ -24,6 +24,7 @@ public class TokenInterceptor {
         notMatchList.add("/esmUserInternalcheck/userRegist");
         notMatchList.add("/dict/**");   //字典
         notMatchList.add("/user/agentRegist");   //个代注册
+        notMatchList.add("/template/**");   //系统模板
 
         // 文件访问路劲
         notMatchList.add("/upload/**");

+ 1 - 0
src/main/java/com/ydtech/config/MvcConfig.java

@@ -95,6 +95,7 @@ public class MvcConfig implements WebMvcConfigurer {
     @Override
     public void addResourceHandlers(ResourceHandlerRegistry registry) {
         registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
+        registry.addResourceHandler("/template/**").addResourceLocations("classpath:/template/");
         registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
         registry.addResourceHandler("/app/android/**").addResourceLocations("file:" + apkPath);
         // 上传文件后路劲映射

+ 17 - 3
src/main/java/com/ydtech/modules/admin/controller/SysDeptController.java

@@ -3,7 +3,9 @@ package com.ydtech.modules.admin.controller;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
 import com.ydtech.modules.admin.model.SysDept;
+import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.admin.service.SysDeptService;
+import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
@@ -15,7 +17,7 @@ import java.util.List;
 
 @RestController
 @RequestMapping("dept")
-public class SysDeptController {
+public class SysDeptController extends BaseController {
     Logger logger = LoggerFactory.getLogger(getClass());
 
     @Autowired
@@ -25,8 +27,9 @@ public class SysDeptController {
     //    @PreAuthorize("hasAuthority('sys:dept:add')")
     @PostMapping(value = "/add")
     public HttpResult add(@RequestBody SysDept record) {
-        if(StringUtils.isEmpty(record.getId())){
-            if(StringUtils.isEmpty(record.getProvince()) || record.getProvince().equals("省"))return HttpResult.error("省份为必填项");
+        if (StringUtils.isEmpty(record.getId())) {
+            if (StringUtils.isEmpty(record.getProvince()) || record.getProvince().equals("省"))
+                return HttpResult.error("省份为必填项");
         }
         return HttpResult.ok(sysDeptService.save(record));
 //        return HttpResult.ok(sysDeptService.add(record));
@@ -49,6 +52,17 @@ public class SysDeptController {
     @ApiOperation(value = "获取树结构")
     @GetMapping(value = "/findTree")
     public HttpResult findTree(SysDept sysDept) {
+        SysUser user = getUser();
+        if (!user.getId().equals("admin")) {
+            SysDept sd = sysDeptService.getById(user.getDeptId());
+            sysDept.setId(user.getDeptId());
+//            if (sd.getDeptType().equals("D")) {
+//                sysDept.setId(user.getDeptId());
+//            }else{
+//                sysDept.setId(sd.getParentId());
+//            }
+        }
+
         return HttpResult.ok(sysDeptService.findTree(sysDept));
     }
 

+ 21 - 8
src/main/java/com/ydtech/modules/admin/controller/SysRoleController.java

@@ -1,5 +1,6 @@
 package com.ydtech.modules.admin.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ydtech.constants.SysConstants;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
@@ -68,7 +69,9 @@ public class SysRoleController {
 //    @PreAuthorize("hasAuthority('sys:role:view')")
     @GetMapping(value = "/findAll")
     public HttpResult findAll() {
-        return HttpResult.ok(sysRoleService.list());
+        LambdaQueryWrapper<SysRole> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(SysRole::getDelFlag,"0");
+        return HttpResult.ok(sysRoleService.list(lqw));
 //        return HttpResult.ok(sysRoleService.selectAll());
     }
 
@@ -81,14 +84,24 @@ public class SysRoleController {
 //    @PreAuthorize("hasAuthority('sys:role:view')")
     @PostMapping(value = "/saveRoleMenus")
     public HttpResult saveRoleMenus(@RequestBody List<SysRoleMenu> records) {
-        for (SysRoleMenu record : records) {
-            SysRole sysRole = sysRoleService.getById(record.getRoleId());
-//            SysRole sysRole = sysRoleService.selectByPk(record.getRoleId());
-            if (SysConstants.ADMIN.equalsIgnoreCase(sysRole.getName())) {
-                // 如果是超级管理员,不允许修改
-                return HttpResult.error("超级管理员拥有所有菜单权限,不允许修改!");
-            }
+
+        if(null == records || records.size() < 1){
+            return HttpResult.error("参数空");
         }
+        SysRole sysRole = sysRoleService.getById(records.get(0).getRoleId());
+        if (SysConstants.ADMIN.equalsIgnoreCase(sysRole.getName())) {
+            // 如果是超级管理员,不允许修改
+            return HttpResult.error("超级管理员拥有所有菜单权限,不允许修改!");
+        }
+
+//        for (SysRoleMenu record : records) {
+//            SysRole sysRole = sysRoleService.getById(record.getRoleId());
+////            SysRole sysRole = sysRoleService.selectByPk(record.getRoleId());
+//            if (SysConstants.ADMIN.equalsIgnoreCase(sysRole.getName())) {
+//                // 如果是超级管理员,不允许修改
+//                return HttpResult.error("超级管理员拥有所有菜单权限,不允许修改!");
+//            }
+//        }
         return HttpResult.ok(sysRoleMenuService.saveRoleMenus(records));
     }
 }

+ 24 - 8
src/main/java/com/ydtech/modules/admin/service/impl/SysDeptServiceImpl.java

@@ -18,6 +18,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
 
 
 @Service
@@ -29,20 +30,35 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept>
         lqw.eq(SysDept::getDelFlag, 0);
         if (null != sysDept) {
             lqw.like(StringUtils.isNotEmpty(sysDept.getName()), SysDept::getName, sysDept.getName());
-//            lqw.like(StringUtils.isNotEmpty(req.getParentId()), EsmInsCompany::getParentId, req.getParentId());
+//            lqw.like(StringUtils.isNotEmpty(sysDept.getParentId()), SysDept::getParentId, sysDept.getParentId());
+//            lqw.like(StringUtils.isNotEmpty(sysDept.getParentId()), SysDept::getParentId, sysDept.getParentId());
+            lqw.like(StringUtils.isNotEmpty(sysDept.getId()), SysDept::getId, sysDept.getId());
         }
+//        lqw.like(SysDept::getId,"99140109M13D01");
 
         List<SysDept> list = new ArrayList<>();
         List<SysDept> allList = list(lqw);
 
-        allList.stream().forEach(r -> {
-            if (StringUtils.isNullOrEmpty(r.getParentId()) || r.getParentId().equalsIgnoreCase("0")) {
-                if (!exists(list, r)) {
-                    list.add(r);
-                }
-            }
 
-        });
+        list.addAll(allList.stream().filter(s -> s.getParentId().equalsIgnoreCase("0")).collect(Collectors.toList()));
+
+//        allList.stream().forEach(r -> {
+//            if (StringUtils.isNullOrEmpty(r.getParentId()) || r.getParentId().equalsIgnoreCase("0")) {
+//                if (!exists(list, r)) {
+//                    list.add(r);
+//                }
+//            }
+//
+//        });
+
+
+        //指定部门
+        if (list.size() < 1) {
+            list.addAll(allList.stream().filter(s -> s.getId().equalsIgnoreCase(sysDept.getId())).collect(Collectors.toList()));
+//            allList.stream().forEach(r -> {
+//                list.add(r);
+//            });
+        }
 
 
         findChildren(list, allList);

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

@@ -22,9 +22,6 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo
     @Transactional
     @Override
     public Integer saveRoleMenus(List<SysRoleMenu> records) {
-        if (records == null || records.isEmpty()) {
-            return 1;
-        }
         Long roleId = records.get(0).getRoleId();
         LambdaQueryWrapper<SysRoleMenu> lqw = new LambdaQueryWrapper<>();
         lqw.eq(SysRoleMenu::getRoleId,roleId);

+ 15 - 0
src/main/java/com/ydtech/modules/demo/controller/DemoController.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.demo.controller;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.core.page.HttpResult;
@@ -9,6 +10,7 @@ import com.ydtech.modules.admin.service.SysUserService;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.base.model.dto.BaseDto;
 import com.ydtech.modules.base.model.dto.TestDto;
+import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetails;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -18,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.List;
+
 /**
  * 演示控制器
  *
@@ -87,6 +91,17 @@ public class DemoController extends BaseController {
     }
 
 
+    @PostMapping(value = "/demo06")
+    @ApiOperation(value = "post请求,数组参数,常用与批量操作复选框")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "String", paramType = "body", allowMultiple = true, required = true)
+    })
+    public HttpResult pay(@RequestBody List<String> ids) {
+        //业务代码
+        return HttpResult.ok(ids);
+    }
+
+
 
 
 

+ 2 - 0
src/main/java/com/ydtech/modules/esm/service/EsmInsCompanyService.java

@@ -29,6 +29,8 @@ public interface EsmInsCompanyService extends IService<EsmInsCompany> {
     List<EsmInsCompany> findTree(EsmInsCompanyReq req);
 
     EsmInsCompany isExists(String companyId);
+
+    EsmInsCompany findInsCompanyByName(String companyName);
 }
 
 

+ 11 - 0
src/main/java/com/ydtech/modules/esm/service/impl/EsmInsCompanyServiceImpl.java

@@ -71,6 +71,17 @@ public class EsmInsCompanyServiceImpl extends ServiceImpl<EsmInsCompanyMapper, E
         return esmInsCompany;
     }
 
+    @Override
+    public EsmInsCompany findInsCompanyByName(String companyName) {
+        LambdaQueryWrapper<EsmInsCompany> lqw = new LambdaQueryWrapper();
+        lqw.eq(EsmInsCompany::getName,companyName);
+        List<EsmInsCompany> list = list(lqw);
+        if(null != list && list.size()>0){
+            return list.get(0);
+        }
+        return null;
+    }
+
     private void findChildren(List<EsmInsCompany> list, List<EsmInsCompany> allList) {
         for (EsmInsCompany l : list) {
             List<EsmInsCompany> children = new ArrayList<>();

+ 89 - 62
src/main/java/com/ydtech/modules/inv/controller/InvChannelsExternalBillsDetailsController.java

@@ -3,18 +3,22 @@ package com.ydtech.modules.inv.controller;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.copier.CopyOptions;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.core.page.HttpResult;
 import com.ydtech.core.page.PageRequest;
 import com.ydtech.core.page.PageResult;
+import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.base.model.dto.BaseDto;
 import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetails;
 import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetailsHistory;
+import com.ydtech.modules.inv.model.InvInsExternalBillsDetails;
 import com.ydtech.modules.inv.model.vo.req.InvInsExternalBillsDetailsReqVO;
 import com.ydtech.modules.inv.service.InvChannelsExternalBillsDetailsHistoryService;
 import com.ydtech.modules.inv.service.InvChannelsExternalBillsDetailsService;
+import com.ydtech.modules.inv.service.InvInsExternalBillsDetailsService;
 import com.ydtech.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -26,11 +30,13 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.constraints.NotBlank;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.function.Function;
 
 /**
  * 财务 - 渠道 - 外部票据控制层 详情
@@ -44,11 +50,18 @@ import java.util.List;
 @Slf4j
 public class InvChannelsExternalBillsDetailsController extends BaseController {
 
-    @Autowired
+    //渠道
+    @Resource
     private InvChannelsExternalBillsDetailsService icebdService;
-    @Autowired
+
+    //渠道 历史
+    @Resource
     private InvChannelsExternalBillsDetailsHistoryService icebdhService;
 
+    //保险公司
+    @Resource
+    private InvInsExternalBillsDetailsService InvInsExternalBillsDetailsService;
+
 
     /**
      * 分页查询
@@ -58,10 +71,14 @@ public class InvChannelsExternalBillsDetailsController extends BaseController {
      */
     @ApiOperation(value = "分页查询")
     @PostMapping(value = "/queryPage")
-    public HttpResult queryPage(@RequestBody InvInsExternalBillsDetailsReqVO reqVo) {
+    public HttpResult<PageResult<InvChannelsExternalBillsDetails>> queryPage(@RequestBody InvInsExternalBillsDetailsReqVO reqVo) {
 
         LambdaQueryWrapper<InvChannelsExternalBillsDetails> lqw = new LambdaQueryWrapper();
         lqw.eq(StringUtils.isNotEmpty(reqVo.getBatchNum()), InvChannelsExternalBillsDetails::getBatchNum, reqVo.getBatchNum());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getStatus()), InvChannelsExternalBillsDetails::getStatus, reqVo.getStatus());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getInsCompanyId()), InvChannelsExternalBillsDetails::getInsCompanyId, reqVo.getInsCompanyId());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getChannel()), InvChannelsExternalBillsDetails::getChannel, reqVo.getChannel());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getPlateNum()), InvChannelsExternalBillsDetails::getPlateNum, reqVo.getPlateNum());
 
         Page p = PageRequest.buildPageRequestByVo(reqVo);
         IPage<InvChannelsExternalBillsDetails> pResult = icebdService.page(p, lqw);
@@ -78,69 +95,11 @@ public class InvChannelsExternalBillsDetailsController extends BaseController {
 
     }
 
-    @PutMapping("/aaaaa")
-    @ApiOperation(value = "测试用户ID是否获取到", notes = "" +
-            "参数1:列表ID" +
-            "</br>参数2:通过状态(1通过,2失败)" +
-            "</br>参数3:类型(1报价,2核保)")
-    public HttpResult aaaa(@RequestBody BaseDto dto) {
-//    public HttpResult aaaa(@ApiIgnore @RequestBody BaseDto dto) {
-//        log.error("********************");
-//        log.error("Authorization:"+request.getHeader("Authorization"));
-//        log.error("token:"+request.getHeader("token"));
-//
-//
-//        Authentication authentication = SecurityUtils.getAuthentication();
-//
-//        JwtAuthenticatioToken j = (JwtAuthenticatioToken) authentication;
-//        log.error("JwtAuthenticatioToken:"+j);
-//        log.error("JwtAuthenticatioToken  token:"+j.getToken());
-//        log.error("*********end********");
-//
-//        log.error("测试获取的用户ID 2222:"+getUserId2());
-//        log.error("测试获取的用户ID 1111:"+getUserId());
-//        return HttpResult.ok("获取用户ID测试:",getUserId());
-//        return HttpResult.ok("获取用户部门ID:",getdeptId(request));
-        return HttpResult.ok(dto);
-
-    }
-
-    @GetMapping(value = "/bbbb")
-    @ApiOperation(value = "测试用户ID是否获取到2222")
-    public HttpResult bbbb() {
-        return HttpResult.ok("获取用户信息测试:", getUser());
-//        return HttpResult.ok("获取用户ID测试2222:",getUserId2());
-
-    }
-
-
-    @PostMapping(value = "/demo02")
-    @ApiOperation(value = "数据导入")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "file", value = "excel文件", required = true, dataType = "__file"),
-            @ApiImplicitParam(name = "batchNum", value = "批次号", required = true, dataType = "String")
-    })
-    public HttpResult demo02(@RequestPart MultipartFile file, @RequestParam String batchNum) {
-        //业务代码
-        return HttpResult.ok();
-    }
-
-    @GetMapping(value = "/demo03")
-    @ApiOperation(value = "查询")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "file", value = "excel文件", required = true, dataType = "__file"),
-            @ApiImplicitParam(name = "batchNum", value = "批次号", required = true, dataType = "String")
-    })
-    public HttpResult demo03(@RequestParam @NotBlank(message = "报价号ID不能为空") String quoteNo) {
-        return HttpResult.ok();
-    }
-
-
 
     @ApiOperation(value = "修改")
     @PostMapping(value = "/edit")
     @Transactional
-    public HttpResult edit(@RequestBody InvChannelsExternalBillsDetails icebd, HttpServletRequest request) {
+    public HttpResult edit(@RequestBody InvChannelsExternalBillsDetails icebd) {
 
 
         List<InvChannelsExternalBillsDetailsHistory> list = icebdhService.gainListByEditId(icebd.getId());
@@ -183,4 +142,72 @@ public class InvChannelsExternalBillsDetailsController extends BaseController {
     }
 
 
+    @GetMapping(value = "/receive/{batchNum}")
+    @ApiOperation(value = "确认领取")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "batchNum", value = "批次号", required = true, dataType = "String")
+    })
+    @Transactional
+    public HttpResult receive(@PathVariable String batchNum) {
+
+        LambdaQueryWrapper<InvChannelsExternalBillsDetails> lqw = new LambdaQueryWrapper<>();
+        lqw.select(InvChannelsExternalBillsDetails::getPlateNum);
+        lqw.eq(InvChannelsExternalBillsDetails::getBatchNum,batchNum);
+//        List<InvChannelsExternalBillsDetails> iebdList = icebdService.list(lqw);
+        //车牌号
+        List<String> plateNums = icebdService.listObjs(lqw, new Function<Object, String>() {
+            @Override
+            public String apply(Object id) {
+                return id.toString();
+            }
+        });
+
+        //保险公司 更新状态
+        LambdaUpdateWrapper<InvInsExternalBillsDetails> insLuw = new LambdaUpdateWrapper<>();
+        insLuw.set(InvInsExternalBillsDetails::getStatus,"1");
+        insLuw.in(InvInsExternalBillsDetails::getPlateNum,plateNums);
+        InvInsExternalBillsDetailsService.update(insLuw);
+
+
+
+
+        //渠道 更新批次号状态
+        LambdaUpdateWrapper<InvChannelsExternalBillsDetails> luw = new LambdaUpdateWrapper<>();
+        luw.set(InvChannelsExternalBillsDetails::getStatus,"1");
+        luw.eq(InvChannelsExternalBillsDetails::getBatchNum,batchNum);
+        icebdService.update(luw);
+
+        return HttpResult.ok("领取成功");
+    }
+
+
+    @PostMapping(value = "/batchPay")
+    @ApiOperation(value = "批量支付")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids", value = "渠道数据ID数组", dataType = "String", paramType = "body", allowMultiple = true, required = true)
+    })
+    public HttpResult pay(@RequestBody List<String> ids) {
+        SysUser user = getUser();
+        icebdService.pay(ids,user);
+
+        return HttpResult.ok("支付成功");
+    }
+
+
+    @PostMapping(value = "/pay/{id}")
+    @ApiOperation(value = "支付")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "渠道数据ID", dataType = "String", paramType = "path", required = true)
+    })
+    public HttpResult pay(@PathVariable String id) {
+        SysUser user = getUser();
+        List<String> ids = new ArrayList<>();
+        ids.add(id);
+
+        icebdService.pay(ids,user);
+
+        return HttpResult.ok("支付成功");
+    }
+
+
 }

+ 85 - 44
src/main/java/com/ydtech/modules/inv/controller/InvExternalBillsController.java

@@ -11,6 +11,7 @@ import com.ydtech.modules.base.controller.BaseController;
 import com.ydtech.modules.esm.model.EsmInsCompany;
 import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.inv.model.InvExternalBills;
+import com.ydtech.modules.inv.model.dto.InvInsImportDto;
 import com.ydtech.modules.inv.model.vo.req.InvChannelExternalBillsDetailsReqVO;
 import com.ydtech.modules.inv.model.vo.req.InvInsExternalBillsReqVO;
 import com.ydtech.modules.inv.model.vo.res.InvBaseChannelMatchInsResVO;
@@ -33,7 +34,7 @@ import java.util.Date;
  * @author: lig
  * @date: 2023-05-31
  */
-@Api(tags = "财务 - 保险公司 - 外部票据控制层")
+@Api(tags = "财务 - 外部票据控制层")
 @RestController
 @RequestMapping("api/inv/insExternalBills")
 public class InvExternalBillsController extends BaseController {
@@ -73,29 +74,37 @@ public class InvExternalBillsController extends BaseController {
     }
 
 
-    @PostMapping("/importDataAdd")
-    @ApiOperation(value = "excel导入数据(新增)")
-    public HttpResult importDataAdd(@ApiParam(name = "file", value = "excel文件", required = true) @RequestPart MultipartFile file
-            , HttpServletRequest request
-            , @ApiParam(name = "insCompanyId", value = "保险公司ID") String insCompanyId
-            , @ApiParam(name = "businessChannels", value = "业务渠道") String businessChannels
-            , @ApiParam(name = "flag", value = "标识(1 保险公司模板导入   2 渠道模板导入)", required = true) @RequestParam String flag
-    ) {
+    @PostMapping("/importData")
+    @ApiOperation(value = "excel导入数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "file", value = "excel文件", required = true, dataType = "__file")
+    })
+//    public HttpResult importData( InvInsImportDto importDto) {
+    public HttpResult importData(@RequestPart MultipartFile file,InvInsImportDto importDto) {
+//    public HttpResult importData(@RequestBody InvInsImportDto importDto) {
+
+        if(importDto.getFlag().equals("1") && StringUtils.isEmpty(importDto.getInsCompanyId()))return HttpResult.error("保险公司导入模式下,保险公司ID为必填。");
+
+        InvExternalBills iieb = null;
+        if(StringUtils.isNotEmpty(importDto.getBatchNum())){
+            iieb = invExternalBillsService.getById(importDto.getBatchNum());
+            //删除详细数据
+            invInsExternalBillsDetailsService.deleteByBatchNum(iieb.getId());
+        }else{
+            iieb = new InvExternalBills();
+            iieb.setCreateTime(new Date());
+            iieb.setCreateBy(getUserId());
+            iieb.setImportStatus("1");
+            iieb.setFlag(importDto.getFlag());
+
+            //渠道
+            iieb.setBusinessChannels(importDto.getBusinessChannels());
+            invExternalBillsService.save(iieb);
 
-        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
-            throw new SystemException("上传文件大小为空");
         }
 
 
-        HttpResult result = null;
-
-        InvExternalBills iieb = new InvExternalBills();
-        iieb.setCreateTime(new Date());
-        iieb.setCreateBy(getUserId());
-        iieb.setImportStatus("1");
-        iieb.setFlag(flag);
-
-        invExternalBillsService.importData(flag, insCompanyId, businessChannels, iieb, file);
+        invExternalBillsService.importData(importDto,iieb,file);
 
 
         return HttpResult.ok("导入成功");
@@ -103,32 +112,64 @@ public class InvExternalBillsController extends BaseController {
     }
 
 
-    @PostMapping("/importDataEdit")
-    @ApiOperation(value = "excel导入数据(修改)")
-    public HttpResult importDataEdit(@ApiParam(name = "file", value = "excel文件", required = true) @RequestPart MultipartFile file
-            , @ApiParam(name = "batchNum", value = "批次号", required = true) @RequestParam String batchNum
-            , HttpServletRequest request
-    ) {
-
-        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
-            throw new SystemException("上传文件大小为空");
-        }
-
-        InvExternalBills ieb = invExternalBillsService.getById(batchNum);
-
-
-        ieb.setCreateTime(new Date());
-        ieb.setCreateBy(getUserId());
-        ieb.setImportStatus("1");
-        invExternalBillsService.updateById(ieb);
-
-        //重新导入
-        invExternalBillsService.importDataAnew(ieb.getFlag(), batchNum, file, ieb);
 
 
-        return HttpResult.ok("重新导入成功");
-
-    }
+//    @PostMapping("/importDataAdd")
+//    @ApiOperation(value = "excel导入数据(新增)")
+//    public HttpResult importDataAdd(@ApiParam(name = "file", value = "excel文件", required = true) @RequestPart MultipartFile file
+//            , HttpServletRequest request
+//            , @ApiParam(name = "insCompanyId", value = "保险公司ID") String insCompanyId
+//            , @ApiParam(name = "businessChannels", value = "业务渠道") String businessChannels
+//            , @ApiParam(name = "flag", value = "标识(1 保险公司模板导入   2 渠道模板导入)", required = true) @RequestParam String flag
+//    ) {
+//
+//        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
+//            throw new SystemException("上传文件大小为空");
+//        }
+//
+//
+//        HttpResult result = null;
+//
+//        InvExternalBills iieb = new InvExternalBills();
+//        iieb.setCreateTime(new Date());
+//        iieb.setCreateBy(getUserId());
+//        iieb.setImportStatus("1");
+//        iieb.setFlag(flag);
+//
+//        invExternalBillsService.importData(flag, insCompanyId, businessChannels, iieb, file);
+//
+//
+//        return HttpResult.ok("导入成功");
+//
+//    }
+//
+//
+//    @PostMapping("/importDataEdit")
+//    @ApiOperation(value = "excel导入数据(修改)")
+//    public HttpResult importDataEdit(@ApiParam(name = "file", value = "excel文件", required = true) @RequestPart MultipartFile file
+//            , @ApiParam(name = "batchNum", value = "批次号", required = true) @RequestParam String batchNum
+//            , HttpServletRequest request
+//    ) {
+//
+//        if (ObjectUtils.isEmpty(file) || file.getSize() <= 0) {
+//            throw new SystemException("上传文件大小为空");
+//        }
+//
+//        InvExternalBills ieb = invExternalBillsService.getById(batchNum);
+//
+//
+//        ieb.setCreateTime(new Date());
+//        ieb.setCreateBy(getUserId());
+//        ieb.setImportStatus("1");
+//        invExternalBillsService.updateById(ieb);
+//
+//        //重新导入
+//        invExternalBillsService.importDataAnew(ieb.getFlag(), batchNum, file, ieb);
+//
+//
+//        return HttpResult.ok("重新导入成功");
+//
+//    }
 
 
 //    @PostMapping("/import")

+ 7 - 3
src/main/java/com/ydtech/modules/inv/controller/InvInsExternalBillsDetailsController.java

@@ -18,6 +18,8 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
+
 /**
  * 财务 - 保险公司 - 外部票据控制层 详情
  *
@@ -29,11 +31,11 @@ import org.springframework.web.bind.annotation.*;
 @RequestMapping("api/inv/insExternalBillsDetails")
 public class InvInsExternalBillsDetailsController extends BaseController {
 
-    @Autowired
+    @Resource
     private InvExternalBillsService insExternalBillsService;
-    @Autowired
+    @Resource
     private InvInsExternalBillsDetailsService invInsExternalBillsDetailsService;
-    @Autowired
+    @Resource
     private EsmInsCompanyService esmInsCompanyService;
 
 
@@ -51,6 +53,8 @@ public class InvInsExternalBillsDetailsController extends BaseController {
 
         LambdaQueryWrapper<InvInsExternalBillsDetails> lqw = new LambdaQueryWrapper();
         lqw.eq(StringUtils.isNotEmpty(reqVo.getBatchNum()),InvInsExternalBillsDetails::getBatchNum,reqVo.getBatchNum());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getStatus()),InvInsExternalBillsDetails::getStatus,reqVo.getStatus());
+        lqw.eq(StringUtils.isNotEmpty(reqVo.getInsCompanyId()),InvInsExternalBillsDetails::getInsCompanyId,reqVo.getInsCompanyId());
 
         Page p = PageRequest.buildPageRequestByVo(reqVo);
         IPage<InvInsExternalBillsDetails> pResult = invInsExternalBillsDetailsService.page(p, lqw);

+ 12 - 6
src/main/java/com/ydtech/modules/inv/dao/InvChannelsExternalBillsDetailsMapper.java

@@ -14,17 +14,23 @@ public interface InvChannelsExternalBillsDetailsMapper extends BaseMapper<InvCha
     //匹配sql
     String selectFrom = "select t1.id,t1.batch_num as batchNum,t1.mlifta as mlifta1" +
             ",t2.mlifta as mlifta2" +
-            ",if(t1.mlifta = t2.mlifta,true,false) as 'mliftaMatch'" +
+            ",if(t2.id is null ,'数据未找到','数据不匹配') AS 'notMatchMsg'" +
+            ",if(t1.mlifta &lt;=&gt; t2.mlifta,true,false) as 'mliftaMatch'" +
             ",t1.vavt as vavt1" +
             ",t2.vavt as vavt2" +
-            ",if(t1.vavt = t2.vavt,true,false) as 'vavtMatch'" +
+            ",if(t1.vavt &lt;=&gt; t2.vavt,true,false) as 'vavtMatch'" +
             ",t1.cip as cip1" +
             ",t2.cip as cip2" +
-            ",if(t1.cip = t2.cip,true,false) as 'cipMatch'" +
+            ",if(t1.cip &lt;=&gt; t2.cip,true,false) as 'cipMatch'" +
             ",t1.plate_num as plateNum1" +
             ",t2.plate_num as plateNum2" +
-            ",if(t1.plate_num = t2.plate_num,true,false) as 'plateNumMatch'" +
+            ",if(t1.plate_num &lt;=&gt; t2.plate_num,true,false) as 'plateNumMatch'" +
             ",t1.pay_date as payDate" +
+            ",t1.insured as insured" +
+            ",t1.ins_coverage as insCoverage" +
+            ",t1.level as level" +
+            ",t1.cope as cope" +
+            ",IFNULL(t1.status,'0') AS status " +
             " from " +
             "inv_channels_external_bills_details t1 " +
             "left join inv_ins_external_bills_details t2 on t1.plate_num = t2.plate_num ";
@@ -46,10 +52,10 @@ public interface InvChannelsExternalBillsDetailsMapper extends BaseMapper<InvCha
             " and t.batchNum = #{page.batchNum} " +
             "</if> " +
             "<if test='page.isMatch !=null and page.isMatch!=\"\" and page.isMatch == 1  '>" +
-            " and t.mliftaMatch=1 and t.plateNumMatch=1 and t.vavtMatch=1 and t.cipMatch=1 " +
+            " and t.mliftaMatch=1 and t.plateNumMatch=1 and t.vavtMatch=1 and t.cipMatch=1 and t.status &lt;=&gt; 0 " +
             "</if> " +
             "<if test='page.isMatch !=null and page.isMatch!=\"\" and page.isMatch == 0  '>" +
-            " and (t.mliftaMatch=0 or t.plateNumMatch=0 or t.vavtMatch=0 or t.cipMatch=0 ) " +
+            " and (t.mliftaMatch=0 or t.plateNumMatch=0 or t.vavtMatch=0 or t.cipMatch=0  and t.status &lt;=&gt; 0) " +
             "</if> ";
 
 

+ 18 - 109
src/main/java/com/ydtech/modules/inv/model/InvBaseExternalBillsDetails.java

@@ -3,6 +3,7 @@ package com.ydtech.modules.inv.model;
 import cn.afterturn.easypoi.excel.annotation.Excel;
 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 io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -29,18 +30,11 @@ public class InvBaseExternalBillsDetails implements Serializable {
     @ApiModelProperty(value = "批次号")
     private String batchNum;
 
-    /**
-     * 保单号
-     */
-    @Excel(name = "保单号")
-    @TableField(value = "policy_num")
-    @ApiModelProperty(value = "保单号")
-    private String policyNum;
+
 
     /**
      * 车牌号
      */
-    @Excel(name = "车牌号")
     @TableField(value = "plate_num")
     @ApiModelProperty(value = "车牌号")
     private String plateNum;
@@ -48,65 +42,27 @@ public class InvBaseExternalBillsDetails implements Serializable {
     /**
      * 付款日期
      */
-    @Excel(name = "付款日期")
     @TableField(value = "pay_date")
     @ApiModelProperty(value = "付款日期")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     private Date payDate;
 
-    /**
-     * 起保日期
-     */
-    @Excel(name = "起保日期")
-    @TableField(value = "coc_date")
-    @ApiModelProperty(value = "起保日期")
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
-    private Date cocDate;
 
-    /**
-     * 险种名称
-     */
-    @Excel(name = "险种名称")
-    @TableField(value = "ins_kind_name")
-    @ApiModelProperty(value = "险种名称")
-    private String insKindName;
 
-    /**
-     * 投保习惯
-     */
-    @Excel(name = "投保习惯")
-    @TableField(value = "ins_habit")
-    @ApiModelProperty(value = "投保习惯")
-    private String insHabit;
 
-    /**
-     * 使用性质
-     */
-    @Excel(name = "使用性质")
-    @TableField(value = "use_nature")
-    @ApiModelProperty(value = "使用性质")
-    private String useNature;
 
     /**
      * 被保险人
      */
-    @Excel(name = "被保险人")
     @TableField(value = "insured")
     @ApiModelProperty(value = "被保险人")
     private String insured;
 
-    /**
-     * 投保人
-     */
-    @Excel(name = "投保人")
-    @TableField(value = "applicant")
-    @ApiModelProperty(value = "投保人")
-    private String applicant;
+
 
     /**
      * 交强保费
      */
-    @Excel(name = "交强保费")
     @TableField(value = "mlifta")
     @ApiModelProperty(value = "交强保费")
     private BigDecimal mlifta;
@@ -114,7 +70,6 @@ public class InvBaseExternalBillsDetails implements Serializable {
     /**
      * 车船税保费
      */
-    @Excel(name = "车船税保费")
     @TableField(value = "vavt")
     @ApiModelProperty(value = "车船税保费")
     private BigDecimal vavt;
@@ -122,67 +77,10 @@ public class InvBaseExternalBillsDetails implements Serializable {
     /**
      * 商业保费
      */
-    @Excel(name = "商业保费")
     @TableField(value = "cip")
     @ApiModelProperty(value = "商业保费")
     private BigDecimal cip;
 
-    /**
-     * 三者保额
-     */
-    @Excel(name = "三者保额")
-    @TableField(value = "tpi")
-    @ApiModelProperty(value = "三者保额")
-    private String tpi;
-
-    /**
-     * 批改类型
-     */
-    @Excel(name = "批改类型")
-    @TableField(value = "correction_type")
-    @ApiModelProperty(value = "批改类型")
-    private String correctionType;
-
-    /**
-     * 排量
-     */
-    @Excel(name = "排量")
-    @TableField(value = "cc")
-    @ApiModelProperty(value = "排量")
-    private String cc;
-
-    /**
-     * 投保人年龄
-     */
-    @Excel(name = "投保人年龄")
-    @TableField(value = "applicant_age")
-    @ApiModelProperty(value = "投保人年龄")
-    private String applicantAge;
-
-    /**
-     * 投保人身份证号
-     */
-    @Excel(name = "投保人身份证号")
-    @TableField(value = "applicant_id_card")
-    @ApiModelProperty(value = "投保人身份证号")
-    private String applicantIdCard;
-
-    /**
-     * 投保人性别
-     */
-    @Excel(name = "投保人性别")
-    @TableField(value = "applicant_sex")
-    @ApiModelProperty(value = "投保人性别")
-    private String applicantSex;
-
-    /**
-     * 投保联系人
-     */
-    @Excel(name = "投保联系人")
-    @TableField(value = "applicant_contact")
-    @ApiModelProperty(value = "投保联系人")
-    private String applicantContact;
-
 
     /**
      * 交强费用
@@ -205,12 +103,23 @@ public class InvBaseExternalBillsDetails implements Serializable {
     @ApiModelProperty(value = "商业费用")
     private BigDecimal cipCost;
 
+
+
     /**
-     * 三者费用
+     * 保险公司
      */
-    @TableField(value = "tpi_cost")
-    @ApiModelProperty(value = "三者费用")
-    private String tpiCost;
+    @TableField(value = "ins_company")
+    @ApiModelProperty(value = "保险公司")
+    private String insCompany;
+
+    /**
+     * 保险公司ID
+     */
+    @ApiModelProperty(value = "保险公司ID")
+    @TableField(value = "ins_company_id")
+    private String insCompanyId;
+
+
 
 
 

+ 56 - 155
src/main/java/com/ydtech/modules/inv/model/InvChannelsExternalBillsDetails.java

@@ -1,8 +1,12 @@
 package com.ydtech.modules.inv.model;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 /**
  * 财务 - 渠道 - 外部票据 - 详情
  * @TableName inv_ins_external_bills_details
@@ -16,159 +20,56 @@ public class InvChannelsExternalBillsDetails extends InvBaseExternalBillsDetails
 //    @TableId(value = "id")
 //    private String id;
 //
-//    /**
-//     * 批次号
-//     */
-//    @TableField(value = "batch_num")
-//    private String batchNum;
-//
-//    /**
-//     * 保单号
-//     */
-//    @Excel(name = "保单号")
-//    @TableField(value = "policy_num")
-//    private String policyNum;
-//
-//    /**
-//     * 车牌号
-//     */
-//    @Excel(name = "车牌号")
-//    @TableField(value = "plate_num")
-//    private String plateNum;
-//
-//    /**
-//     * 付款日期
-//     */
-//    @Excel(name = "付款日期")
-//    @TableField(value = "pay_date")
-//    private Date payDate;
-//
-//    /**
-//     * 起保日期
-//     */
-//    @Excel(name = "起保日期")
-//    @TableField(value = "coc_date")
-//    private Date cocDate;
-//
-//    /**
-//     * 险种名称
-//     */
-//    @Excel(name = "险种名称")
-//    @TableField(value = "ins_kind_name")
-//    private String insKindName;
-//
-//    /**
-//     * 投保习惯
-//     */
-//    @Excel(name = "投保习惯")
-//    @TableField(value = "ins_habit")
-//    private String insHabit;
-//
-//    /**
-//     * 使用性质
-//     */
-//    @Excel(name = "使用性质")
-//    @TableField(value = "use_nature")
-//    private String useNature;
-//
-//    /**
-//     * 被保险人
-//     */
-//    @Excel(name = "被保险人")
-//    @TableField(value = "insured")
-//    private String insured;
-//
-//    /**
-//     * 投保人
-//     */
-//    @Excel(name = "投保人")
-//    @TableField(value = "applicant")
-//    private String applicant;
-//
-//    /**
-//     * 交强保费
-//     */
-//    @Excel(name = "交强保费")
-//    @TableField(value = "mlifta")
-//    private BigDecimal mlifta;
-//
-//    /**
-//     * 车船税保费
-//     */
-//    @Excel(name = "车船税保费")
-//    @TableField(value = "vavt")
-//    private BigDecimal vavt;
-//
-//    /**
-//     * 商业保费
-//     */
-//    @Excel(name = "商业保费")
-//    @TableField(value = "cip")
-//    private BigDecimal cip;
-//
-//    /**
-//     * 三者保额
-//     */
-//    @Excel(name = "三者保额")
-//    @TableField(value = "tpi_si")
-//    private String tpiSi;
-//
-//    /**
-//     * 批改类型
-//     */
-//    @Excel(name = "批改类型")
-//    @TableField(value = "correction_type")
-//    private String correctionType;
-//
-//    /**
-//     * 排量
-//     */
-//    @Excel(name = "排量")
-//    @TableField(value = "cc")
-//    private String cc;
-//
-//    /**
-//     * 投保人年龄
-//     */
-//    @Excel(name = "投保人年龄")
-//    @TableField(value = "applicant_age")
-//    private String applicantAge;
-//
-//    /**
-//     * 投保人身份证号
-//     */
-//    @Excel(name = "投保人身份证号")
-//    @TableField(value = "applicant_id_card")
-//    private String applicantIdCard;
-//
-//    /**
-//     * 投保人性别
-//     */
-//    @Excel(name = "投保人性别")
-//    @TableField(value = "applicant_sex")
-//    private String applicantSex;
-//
-//    /**
-//     * 投保联系人
-//     */
-//    @Excel(name = "投保联系人")
-//    @TableField(value = "applicant_contact")
-//    private String applicantContact;
-//
-//    /**
-//     * 广博分
-//     */
-//    @Excel(name = "广博分")
-//    @TableField(value = "wide_grades")
-//    private String wideGrades;
-//
-//    /**
-//     * 光博分
-//     */
-//    @Excel(name = "光博分")
-//    @TableField(value = "light_grades")
-//    private String lightGrades;
-//
-//    @TableField(exist = false)
-//    private static final long serialVersionUID = 1L;
+    /**
+     * 等级
+     */
+    @TableField(value = "level")
+    private String level;
+
+    /**
+     * 渠道
+     */
+    @TableField(value = "channel")
+    private String channel;
+
+    /**
+     * 险别
+     */
+    @TableField(value = "ins_coverage")
+    private String insCoverage;
+
+
+
+    /**
+     * 出单渠道
+     */
+    @TableField(value = "out_channel")
+    private String outChannel;
+
+    /**
+     * 应付
+     */
+    @ApiModelProperty(value = "应付")
+    @TableField(value = "cope")
+    private BigDecimal cope;
+
+    /**
+     * 状态(0 未领取、1 未支付、2已支付)
+     */
+    @TableField(value = "status")
+    private String status;
+
+    /**
+     * 付款操作人
+     */
+    @ApiModelProperty(value = "付款操作人")
+    @TableField(value = "pay_operator")
+    private String payOperator;
+
+    /**
+     * 付款操作人ID
+     */
+    @ApiModelProperty(value = "付款操作人ID")
+    @TableField(value = "pay_operator_id")
+    private String payOperatorId;
 }

+ 21 - 43
src/main/java/com/ydtech/modules/inv/model/InvExternalBills.java

@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import springfox.documentation.annotations.ApiIgnore;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -126,49 +127,26 @@ public class InvExternalBills implements Serializable {
     private static final long serialVersionUID = 1L;
 
 
-//    /**
-//     * ID
-//     */
-//    @TableId(value = "id", type = IdType.ASSIGN_ID)
-//    private String id;
-//
-//    @Excel(name = "车牌号")
-//    @ApiModelProperty(value = "车牌号")
-//    @TableField(value = "fieldName1")
-//    private String fieldName1;
-//    @Excel(name = "发动机号")
-//    @ApiModelProperty(value = "发动机号")
-//    @TableField(value = "fieldName2")
-//    private String fieldName2;
-//    @Excel(name = "车架号")
-//    @ApiModelProperty(value = "车架号")
-//    @TableField(value = "fieldName3")
-//    private String fieldName3;
-//    @Excel(name = "核保核批通过日期")
-//    @ApiModelProperty(value = "核保核批通过日期")
-//    @TableField(value = "fieldName4")
-//    private String fieldName4;
-//    @Excel(name = "签单保额")
-//    @TableField(value = "fieldName5")
-//    @ApiModelProperty(value = "签单保额")
-//    private String fieldName5;
-//    @Excel(name = "税后保费")
-//    @ApiModelProperty(value = "税后保费")
-//    @TableField(value = "fieldName6")
-//    private String fieldName6;
-//    @Excel(name = "光博分")
-//    @ApiModelProperty(value = "光博分")
-//    @TableField(value = "fieldName7")
-//    private String fieldName7;
-//    @Excel(name = "中煤分")
-//    @ApiModelProperty(value = "中煤分")
-//    @TableField(value = "fieldName8")
-//    private String fieldName8;
-//
-//    @Excel(name = "车船税缴税金额")
-//    @ApiModelProperty(value = "车船税缴税金额")
-//    @TableField(value = "carShipTax")
-//    private String carShipTax;
+
+
+    @ApiIgnore
+    public static InvExternalBills buildImportInvExternalBills(InvExternalBills iieb, boolean boo, BigDecimal totalMlifta, BigDecimal totalVavt, BigDecimal totalCip){
+        if (!boo) {
+            iieb.setImportStatus("0");
+            iieb.setErrorMsg("保存数据出错");
+
+        } else {
+            iieb.setMlifta(totalMlifta);
+            iieb.setVavt(totalVavt);
+            iieb.setCip(totalCip);
+            iieb.setImportStatus("1");
+
+
+        }
+        return iieb;
+    }
+
+
 
 
 

+ 110 - 3
src/main/java/com/ydtech/modules/inv/model/InvInsExternalBillsDetails.java

@@ -3,10 +3,13 @@ package com.ydtech.modules.inv.model;
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Date;
+
 /**
  * 财务 - 保险公司 - 外部票据 - 详情
  * @TableName inv_ins_external_bills_details
@@ -17,10 +20,109 @@ import lombok.Data;
 public class InvInsExternalBillsDetails extends InvBaseExternalBillsDetails {
 
 
+    /**
+     * 保单号
+     */
+    @TableField(value = "policy_num")
+    @ApiModelProperty(value = "保单号")
+    private String policyNum;
+
+    /**
+     * 起保日期
+     */
+    @TableField(value = "coc_date")
+    @ApiModelProperty(value = "起保日期")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    private Date cocDate;
+
+
+    /**
+     * 险种名称
+     */
+    @TableField(value = "ins_kind_name")
+    @ApiModelProperty(value = "险种名称")
+    private String insKindName;
+
+    /**
+     * 投保习惯
+     */
+    @TableField(value = "ins_habit")
+    @ApiModelProperty(value = "投保习惯")
+    private String insHabit;
+
+    /**
+     * 使用性质
+     */
+    @TableField(value = "use_nature")
+    @ApiModelProperty(value = "使用性质")
+    private String useNature;
+
+    /**
+     * 投保人
+     */
+    @TableField(value = "applicant")
+    @ApiModelProperty(value = "投保人")
+    private String applicant;
+
+    /**
+     * 三者保额
+     */
+    @TableField(value = "tpi")
+    @ApiModelProperty(value = "三者保额")
+    private String tpi;
+
+    /**
+     * 排量
+     */
+    @TableField(value = "cc")
+    @ApiModelProperty(value = "排量")
+    private String cc;
+
+    /**
+     * 投保人年龄
+     */
+    @TableField(value = "applicant_age")
+    @ApiModelProperty(value = "投保人年龄")
+    private String applicantAge;
+
+    /**
+     * 三者费用
+     */
+    @TableField(value = "tpi_cost")
+    @ApiModelProperty(value = "三者费用")
+    private String tpiCost;
+
+//    /**
+//     * 投保人身份证号
+//     */
+//    @TableField(value = "applicant_id_card")
+//    @ApiModelProperty(value = "投保人身份证号")
+//    private String applicantIdCard;
+//
+//    /**
+//     * 投保人性别
+//     */
+//    @TableField(value = "applicant_sex")
+//    @ApiModelProperty(value = "投保人性别")
+//    private String applicantSex;
+//
+//    /**
+//     * 投保联系人
+//     */
+//    @TableField(value = "applicant_contact")
+//    @ApiModelProperty(value = "投保联系人")
+//    private String applicantContact;
+
+    /**
+     * 批改类型
+     */
+    @TableField(value = "correction_type")
+    @ApiModelProperty(value = "批改类型")
+    private String correctionType;
+
     /**
      * 广博分
      */
-    @Excel(name = "广博分")
     @TableField(value = "wide_grades")
     @ApiModelProperty(value = "广博分")
     private String wideGrades;
@@ -28,7 +130,6 @@ public class InvInsExternalBillsDetails extends InvBaseExternalBillsDetails {
     /**
      * 光博分
      */
-    @Excel(name = "光博分")
     @TableField(value = "light_grades")
     @ApiModelProperty(value = "光博分")
     private String lightGrades;
@@ -37,11 +138,17 @@ public class InvInsExternalBillsDetails extends InvBaseExternalBillsDetails {
     /**
      *  保险公司账号说明
      */
-    @Excel(name = "账号说明")
     @TableField(value = "ins_account")
     @ApiModelProperty(value = "保险公司账号说明")
     private String insAccount;
 
+    /**
+     *  状态
+     */
+    @TableField(value = "status")
+    @ApiModelProperty(value = "状态(0 待领取、1已领取)")
+    private String status;
+
     @TableField(exist = false)
     private static final long serialVersionUID = 1L;
 }

+ 110 - 0
src/main/java/com/ydtech/modules/inv/model/dto/InvInsChannelExcelDto.java

@@ -0,0 +1,110 @@
+package com.ydtech.modules.inv.model.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 财务 - 渠道 DTO   模板
+ */
+@Data
+public class InvInsChannelExcelDto  {
+
+    /**
+     * 等级
+     */
+    @Excel(name = "等级")
+    private String level;
+
+    @Excel(name = "业务渠道")
+    private String channel;
+
+    /**
+     * 付款日期
+     */
+    @Excel(name = "签单日期")
+    private Date payDate;
+
+    /**
+     * 车牌号
+     */
+    @Excel(name = "车牌号")
+    private String plateNum;
+
+    /**
+     * 被保险人
+     */
+    @Excel(name = "被保险人")
+    private String insured;
+
+    /**
+     * 保险公司
+     */
+    @Excel(name = "保险公司")
+    private String insCompany;
+
+    /**
+     * 险别
+     */
+    @Excel(name = "险别")
+    private String insCoverage;
+
+    /**
+     * 出单渠道
+     */
+    @Excel(name = "出单渠道")
+    private String outChannel;
+
+    /**
+     * 交强保费
+     */
+    @Excel(name = "交强保费")
+    private BigDecimal mlifta;
+
+    /**
+     * 车船税保费
+     */
+    @Excel(name = "车船税保费")
+    private BigDecimal vavt;
+
+    /**
+     * 商业保费
+     */
+    @Excel(name = "商业保费")
+    private BigDecimal cip;
+
+    /**
+     * 交强费用
+     */
+    @Excel(name = "交强费用")
+    private BigDecimal mliftaCost;
+
+
+    /**
+     * 商业费用
+     */
+    @Excel(name = "商业费用")
+    private BigDecimal cipCost;
+
+    /**
+     * 车船税费用
+     */
+    @Excel(name = "车船税费用")
+    private BigDecimal vavtCost;
+
+    /**
+     * 应付
+     */
+    @Excel(name = "应付")
+    private BigDecimal cope;
+
+
+
+
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+}

+ 0 - 9
src/main/java/com/ydtech/modules/inv/model/dto/InvInsChinaCoalExcelDto.java

@@ -14,9 +14,7 @@ import java.util.Date;
 /**
  * 财务 - 保险公司 - 中煤Excel模板 DTO
  */
-@TableName(value ="inv_ins_external_bills_details")
 @Data
-@ApiModel
 public class InvInsChinaCoalExcelDto {
 
     @Excel(name = "保单号")
@@ -86,13 +84,6 @@ public class InvInsChinaCoalExcelDto {
     @Excel(name = "车船税缴税金额")
     private BigDecimal vavt;
 
-    /**
-     * 商业保费
-     */
-    @Excel(name = "商业保费")
-    @TableField(value = "cip")
-    @ApiModelProperty(value = "商业保费")
-    private BigDecimal cip;
 
     /**
      * 三者险保额

+ 38 - 0
src/main/java/com/ydtech/modules/inv/model/dto/InvInsImportDto.java

@@ -0,0 +1,38 @@
+package com.ydtech.modules.inv.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 财务 - 保险公司导入 DTO
+ */
+@Data
+@ApiModel(value = "财务 - 保险公司导入 DTO")
+public class InvInsImportDto {
+
+    @ApiModelProperty(value = "批次号(重新导入需要传值)")
+    private String batchNum;
+
+//    @ApiModelProperty(value = "excel文件",required = true)
+//    @NotNull(message = "excel文件不能为空")
+//    private MultipartFile file;
+
+    @ApiModelProperty(value = "保险公司ID")
+    private String insCompanyId;
+
+    @ApiModelProperty(value = "业务渠道")
+    private String businessChannels;
+
+    @ApiModelProperty(value = "标识(1 保险公司模板导入   2 渠道模板导入)",required = true)
+    @NotNull(message = "标识不能为空")
+    private String flag;
+
+    @ApiModelProperty(value = "是标准模板 true")
+    private boolean standard;
+
+}

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

@@ -0,0 +1,90 @@
+package com.ydtech.modules.inv.model.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 财务 - 保险公司 - 简易系统 万家模板 DTO
+ */
+@Data
+public class InvInsSimpleSysExcelDto {
+
+
+    @Excel(name = "车牌号")
+    private String plateNum;
+
+    @Excel(name = "保单号")
+    private String policyNum;
+
+    /**
+     * 付款日期
+     */
+    @Excel(name = "签单日期")
+    private Date payDate;
+
+    /**
+     * 保费
+     */
+    @Excel(name = "含税保费")
+    private BigDecimal premium;
+
+    /**
+     * 渠道账号
+     */
+    @Excel(name = "出单账号")
+    private String insAccount;
+
+
+
+    /**
+     * 排量
+     */
+    @Excel(name = "车辆排量")
+    private String cc;
+
+    /**
+     * 投保人
+     */
+    @Excel(name = "投保人姓名")
+    private String applicant;
+
+    /**
+     * 车船税
+     */
+    @Excel(name = "车船税")
+    private BigDecimal vavt;
+
+    /**
+     * 车船税滞纳金
+     */
+    @Excel(name = "车船税滞纳金")
+    private BigDecimal vavtSfotp;
+
+    /**
+     * 被保险人
+     */
+    @Excel(name = "被保人姓名")
+    private String insured;
+
+
+
+    /**
+     * 险种名称
+     */
+    @Excel(name = "险种")
+    private String insKindName;
+
+
+
+
+
+
+
+
+
+
+
+}

+ 76 - 0
src/main/java/com/ydtech/modules/inv/model/dto/InvInsStandardExcelDto.java

@@ -0,0 +1,76 @@
+package com.ydtech.modules.inv.model.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 财务 - 保险公司 - 标准Excel模板 DTO
+ */
+@Data
+public class InvInsStandardExcelDto {
+
+    @Excel(name = "保单号")
+    private String policyNum;
+
+
+    @Excel(name = "车牌号")
+    private String plateNum;
+
+    /**
+     * 付款日期
+     */
+    @Excel(name = "付款日期")
+    private Date payDate;
+
+
+    /**
+     * 产品名称
+     */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /**
+     * 被保人
+     */
+    @Excel(name = "被保人")
+    private String insured;
+
+    /**
+     * 投保人
+     */
+    @Excel(name = "投保人")
+    private String applicant;
+
+    /**
+     * 交强保费
+     */
+    @Excel(name = "交强保费")
+    private BigDecimal mlifta;
+
+    @Excel(name = "车船税保费")
+    private BigDecimal vavt;
+
+    @Excel(name = "商业保费")
+    private BigDecimal cip;
+
+    @Excel(name = "三者保费")
+    private String tpi;
+
+    @Excel(name = "交强费用")
+    private BigDecimal mliftaCost;
+
+    @Excel(name = "车船税费用")
+    private BigDecimal vavtCost;
+
+    @Excel(name = "商业费用")
+    private BigDecimal cipCost;
+
+    @Excel(name = "三者费用")
+    private String tpiCost;
+
+
+}

+ 13 - 0
src/main/java/com/ydtech/modules/inv/model/vo/req/InvInsExternalBillsDetailsReqVO.java

@@ -18,6 +18,19 @@ public class InvInsExternalBillsDetailsReqVO extends BasePageVO {
     @ApiModelProperty(value = "批次号")
     private String batchNum;
 
+    @ApiModelProperty(value = "状态(0是未领取   1是未支付    2是已支付)")
+    private String status;
+
+    @ApiModelProperty(value = "保险公司ID")
+    private String insCompanyId;
+
+    @ApiModelProperty(value = "渠道")
+    private String channel;
+
+    @ApiModelProperty(value = "车牌号")
+    private String plateNum;
+
+
 
 
 

+ 17 - 0
src/main/java/com/ydtech/modules/inv/model/vo/res/InvBaseChannelMatchInsResVO.java

@@ -21,6 +21,9 @@ public class InvBaseChannelMatchInsResVO  {
     @ApiModelProperty(value = "渠道数据详情ID")
     private String id;
 
+    @ApiModelProperty(value = "不匹配信息")
+    private String notMatchMsg;
+
     @ApiModelProperty(value = "渠道批次号")
     private String batchNum;
 
@@ -63,6 +66,20 @@ public class InvBaseChannelMatchInsResVO  {
     @ApiModelProperty(value = "付款日期")
     private String payDate;
 
+    @ApiModelProperty(value = "被保险人")
+    private String insured;
+
+    @ApiModelProperty(value = "险别")
+    private String insCoverage;
+
+    @ApiModelProperty(value = "等级")
+    private String level;
+
+    @ApiModelProperty(value = "应付")
+    private String cope;
+
+
+
 
 
 

+ 8 - 2
src/main/java/com/ydtech/modules/inv/service/InvChannelsExternalBillsDetailsService.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.inv.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.core.page.PageResult;
+import com.ydtech.modules.admin.model.SysUser;
 import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetails;
 import com.ydtech.modules.inv.model.InvExternalBills;
 import com.ydtech.modules.inv.model.vo.req.InvChannelExternalBillsDetailsReqVO;
@@ -10,6 +11,8 @@ import com.ydtech.modules.inv.model.vo.res.InvChannelMatchInsResVO;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.List;
+
 public interface InvChannelsExternalBillsDetailsService extends IService<InvChannelsExternalBillsDetails> {
 
 
@@ -17,9 +20,12 @@ public interface InvChannelsExternalBillsDetailsService extends IService<InvChan
 
     boolean deleteByBatchNum(String batchNum);
 
-//    @Async
-    void importData(MultipartFile file, InvExternalBills iieb) ;
+    //    @Async
+    InvExternalBills importData(MultipartFile file, InvExternalBills iieb);
+
+
 
+    void pay(List<String> ids, SysUser user);
 
 
 }

+ 30 - 18
src/main/java/com/ydtech/modules/inv/service/InvExternalBillsService.java

@@ -2,6 +2,7 @@ package com.ydtech.modules.inv.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.modules.inv.model.InvExternalBills;
+import com.ydtech.modules.inv.model.dto.InvInsImportDto;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -20,30 +21,41 @@ public interface InvExternalBillsService extends IService<InvExternalBills> {
 
     /**
      * 导入数据
+     * 重构
      *
-     * @param flag             标识(1 保险公司模板导入   2 渠道模板导入)
-     * @param insCompanyId     保险公司ID  flag=1 必填
-     * @param businessChannels 渠道  flag=2 必填
      * @param iieb             导入基本信息实体   保险公司、渠道信息
      * @param file             上传的附件
      *
      * @author: lig
      * @date: 2023年07月04日 0004
      */
-    void importData(String flag, String insCompanyId, String businessChannels, InvExternalBills iieb, MultipartFile file);
-
-
-    /**
-     * 重新导入
-     *
-     * @param flag     标识(1 保险公司模板导入   2 渠道模板导入)
-     * @param batchNum 批次号
-     * @param file     上传的附件
-     * @param ieb      导入基本信息实体
-     *
-     * @author: lig
-     * @date: 2023-07-04 0004
-     */
-    void importDataAnew(String flag, String batchNum, MultipartFile file, InvExternalBills ieb);
+    void importData(InvInsImportDto importDto,InvExternalBills iieb,MultipartFile file);
+//    /**
+//     * 导入数据
+//     *
+//     * @param flag             标识(1 保险公司模板导入   2 渠道模板导入)
+//     * @param insCompanyId     保险公司ID  flag=1 必填
+//     * @param businessChannels 渠道  flag=2 必填
+//     * @param iieb             导入基本信息实体   保险公司、渠道信息
+//     * @param file             上传的附件
+//     *
+//     * @author: lig
+//     * @date: 2023年07月04日 0004
+//     */
+//    void importData(String flag, String insCompanyId, String businessChannels, InvExternalBills iieb, MultipartFile file);
+
+
+//    /**
+//     * 重新导入
+//     *
+//     * @param flag     标识(1 保险公司模板导入   2 渠道模板导入)
+//     * @param batchNum 批次号
+//     * @param file     上传的附件
+//     * @param ieb      导入基本信息实体
+//     *
+//     * @author: lig
+//     * @date: 2023-07-04 0004
+//     */
+//    void importDataAnew(String flag, String batchNum, MultipartFile file, InvExternalBills ieb);
 
 }

+ 7 - 6
src/main/java/com/ydtech/modules/inv/service/InvInsExternalBillsDetailsService.java

@@ -3,20 +3,21 @@ package com.ydtech.modules.inv.service;
 import com.ydtech.modules.inv.model.InvExternalBills;
 import com.ydtech.modules.inv.model.InvInsExternalBillsDetails;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.inv.model.dto.InvInsImportDto;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.web.multipart.MultipartFile;
 
 /**
-* @author Administrator
-* @description 针对表【inv_ins_external_bills_details(财务 - 保险公司 - 外部票据 - 详情)】的数据库操作Service
-* @createDate 2023-06-06 11:08:53
-*/
+ * @author Administrator
+ * @description 针对表【inv_ins_external_bills_details(财务 - 保险公司 - 外部票据 - 详情)】的数据库操作Service
+ * @createDate 2023-06-06 11:08:53
+ */
 public interface InvInsExternalBillsDetailsService extends IService<InvInsExternalBillsDetails> {
 
     boolean deleteByBatchNum(String batchNum);
 
-    @Async
-    void importData(MultipartFile file, InvExternalBills iieb);
+    //    @Async
+    InvExternalBills importData(InvInsImportDto importDto,MultipartFile file, InvExternalBills iieb) throws Exception;
 
 
 }

+ 116 - 21
src/main/java/com/ydtech/modules/inv/service/impl/InvChannelsExternalBillsDetailsServiceImpl.java

@@ -1,13 +1,20 @@
 package com.ydtech.modules.inv.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.core.page.BasePageVO;
 import com.ydtech.core.page.PageResult;
+import com.ydtech.exception.SystemException;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.esm.model.EsmInsCompany;
+import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.inv.dao.InvChannelsExternalBillsDetailsMapper;
 import com.ydtech.modules.inv.model.InvChannelsExternalBillsDetails;
 import com.ydtech.modules.inv.model.InvExternalBills;
 import com.ydtech.modules.inv.model.InvInsExternalBillsDetails;
+import com.ydtech.modules.inv.model.dto.InvInsChannelExcelDto;
 import com.ydtech.modules.inv.model.vo.req.InvChannelExternalBillsDetailsReqVO;
 import com.ydtech.modules.inv.model.vo.res.InvBaseChannelMatchInsResVO;
 import com.ydtech.modules.inv.model.vo.res.InvChannelMatchInsResVO;
@@ -20,17 +27,24 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Service
 public class InvChannelsExternalBillsDetailsServiceImpl extends ServiceImpl<InvChannelsExternalBillsDetailsMapper, InvChannelsExternalBillsDetails>
-    implements InvChannelsExternalBillsDetailsService {
+        implements InvChannelsExternalBillsDetailsService {
 
-    @Autowired
+    @Resource
     InvExternalBillsService invExternalBillsService;
+    @Resource
+    private EsmInsCompanyService esmInsCompanyService;
 
     @Override
     public PageResult<InvBaseChannelMatchInsResVO> gainChannelMatchIns(InvChannelExternalBillsDetailsReqVO reqVo) {
@@ -51,10 +65,10 @@ public class InvChannelsExternalBillsDetailsServiceImpl extends ServiceImpl<InvC
         //请求替换分页开始索引
         reqVo.setPageNum(PageResult.buildPageLimitStart(reqVo));
 
-        List<InvBaseChannelMatchInsResVO> resVOList =  super.baseMapper.gainChannelMatchIns(reqVo);
+        List<InvBaseChannelMatchInsResVO> resVOList = super.baseMapper.gainChannelMatchIns(reqVo);
 
 
-        return PageResult.buildPageResult(reqVo,total,resVOList);
+        return PageResult.buildPageResult(reqVo, total, resVOList);
 
     }
 
@@ -66,43 +80,124 @@ public class InvChannelsExternalBillsDetailsServiceImpl extends ServiceImpl<InvC
     }
 
     @Override
-    public void importData(MultipartFile file, InvExternalBills iieb) {
+    public InvExternalBills importData(MultipartFile file, InvExternalBills iieb) {
 
         String errorMsg = "";
         List<InvChannelsExternalBillsDetails> list = null;
         try {
-            list = ExcelUtils2.importExcel(file, InvChannelsExternalBillsDetails.class,0,1,1);
+            List<InvInsChannelExcelDto> dtoList =  ExcelUtils2.importExcel(file, InvInsChannelExcelDto.class, 0, 1, 1);
+
+            dtoList = dtoList.stream().filter(l -> l.getPlateNum() != null).collect(Collectors.toList());
+            if(null == dtoList || dtoList.size() < 1){
+                errorMsg = "导入失败!匹配数据 0 条";
+
+            }
+            Map<String, InvChannelsExternalBillsDetails> m = new HashMap();
+            dtoList.stream().forEach(a ->{
+                InvChannelsExternalBillsDetails icebd = new InvChannelsExternalBillsDetails();
+                if (m.containsKey(a.getPlateNum())) {
+                    icebd = m.get(a.getPlateNum());
+
+                } else {
+                    BeanUtil.copyProperties(a, icebd);
+                    //对应保险公司
+                    EsmInsCompany insCompany = esmInsCompanyService.findInsCompanyByName(a.getInsCompany());
+                    if(null == insCompany)throw new SystemException("保险公司:" + a.getInsCompany() + "不匹配");
+                    icebd.setInsCompanyId(insCompany.getId());
+                    icebd.setInsCompany(insCompany.getName());
+
+                    icebd.setMliftaCost(a.getMliftaCost());
+
+                    icebd.setStatus("1");
+
+                }
+                m.put(a.getPlateNum(), icebd);
+            });
+
+            //获取车牌号list
+            List<String> listKey = m.keySet().stream().collect(Collectors.toList());
+            //获取车牌号重复的list  渠道
+            List<String> longs = gainPlateNumRepetitionList(listKey);
+
+
+            if(longs.size() > 0){
+                errorMsg = "车牌号已经存在:"+longs;
+//                throw new SystemException("车牌号已经存在:"+longs);
+            }else{
+                list = new ArrayList<>(m.values());
+            }
+
+
+
 
         } catch (IOException e) {
-//            return HttpResult.error("导入失败!" + e.getMessage());
-//            throw new SystemException("导入失败!" + e.getMessage());
             errorMsg = "导入失败!" + e.getMessage();
         }
 
-        list = list.stream().filter(l -> l.getPlateNum()!=null).collect(Collectors.toList());
 
-        BigDecimal totalMlifta =  BigDecimal.ZERO;
-        for(int i = 0 ; i < list.size() ;i++){
+        if (StringUtils.isNotEmpty(errorMsg)) {
+            iieb.setImportStatus("0");
+            iieb.setErrorMsg(errorMsg);
+
 
-            list.get(i).setBatchNum(iieb.getId());
-            totalMlifta = totalMlifta.add(list.get(i).getMlifta());
-        }
+        } else {
 
-        boolean boo = saveBatch(list);
-        if(!boo) errorMsg = "保存数据出错";
+            BigDecimal totalMlifta = BigDecimal.ZERO;
+            BigDecimal totalVavt = BigDecimal.ZERO;
+            BigDecimal totalCip = BigDecimal.ZERO;
+            for (int i = 0; i < list.size(); i++) {
 
+                list.get(i).setBatchNum(iieb.getId());
+                totalMlifta = totalMlifta.add(list.get(i).getMlifta());
+            }
 
-        if(StringUtils.isNullOrEmpty(errorMsg)){
-            iieb.setImportStatus("1");
-            iieb.setErrorMsg(errorMsg);
-            iieb.setMlifta(totalMlifta);
-            invExternalBillsService.updateById(iieb);
+            boolean boo = saveBatch(list);
+            iieb.setInventoryQuantity(list.size());
+            iieb = InvExternalBills.buildImportInvExternalBills(iieb, boo, totalMlifta, totalVavt, totalCip);
         }
+        return iieb;
+//        invExternalBillsService.updateById(iieb);
 
 
+    }
 
+    @Override
+    public void pay(List<String> ids, SysUser user) {
+        //更新批次号状态
+        LambdaUpdateWrapper<InvChannelsExternalBillsDetails> luw = new LambdaUpdateWrapper<>();
+        luw.set(InvChannelsExternalBillsDetails::getStatus,"2");
+        luw.set(InvChannelsExternalBillsDetails::getPayOperatorId,user.getId());
+        luw.set(InvChannelsExternalBillsDetails::getPayOperator,user.getName());
+        luw.in(InvChannelsExternalBillsDetails::getId,ids);
+        update(luw);
     }
 
+
+    /**
+     *  获取车牌号重复的list  渠道
+     *
+     * @author: lig
+     * @date: 2023年07月07日 0007
+     */
+    private List<String> gainPlateNumRepetitionList(List<String> listKey){
+        LambdaQueryWrapper<InvChannelsExternalBillsDetails> lqw = new LambdaQueryWrapper();
+                lqw.select(InvChannelsExternalBillsDetails::getPlateNum);
+                lqw.in(InvChannelsExternalBillsDetails::getPlateNum,listKey);
+
+        //查询获取对象具体字段的集合
+        List<String> longs = listObjs(lqw, new Function<Object, String>() {
+            @Override
+            public String apply(Object id) {
+                return id.toString();
+            }
+        });
+        return longs;
+
+    }
+
+
+
+
 }
 
 

+ 54 - 55
src/main/java/com/ydtech/modules/inv/service/impl/InvExternalBillsServiceImpl.java

@@ -7,6 +7,7 @@ import com.ydtech.modules.esm.service.EsmInsCompanyService;
 import com.ydtech.modules.inv.dao.InvInsExternalBillsMapper;
 import com.ydtech.modules.inv.model.InvExternalBills;
 import com.ydtech.modules.inv.model.InvInsExternalBillsDetails;
+import com.ydtech.modules.inv.model.dto.InvInsImportDto;
 import com.ydtech.modules.inv.service.InvChannelsExternalBillsDetailsService;
 import com.ydtech.modules.inv.service.InvInsExternalBillsDetailsService;
 import com.ydtech.modules.inv.service.InvExternalBillsService;
@@ -31,7 +32,7 @@ public class InvExternalBillsServiceImpl extends ServiceImpl<InvInsExternalBills
     @Resource
     private InvChannelsExternalBillsDetailsService invChannelsExternalBillsDetailsService;
     @Resource
-    private EsmInsCompanyService esmInsCompanyServiceService;
+    private EsmInsCompanyService esmInsCompanyService;
 
 
 //    @Override
@@ -65,71 +66,69 @@ public class InvExternalBillsServiceImpl extends ServiceImpl<InvInsExternalBills
 
 
     @Override
-    public void importData(String flag, String insCompanyId, String businessChannels, InvExternalBills iieb, MultipartFile file) {
-        if (flag.equals("1")) {
-            if (StringUtils.isNullOrEmpty(insCompanyId)) throw new SystemException("保险公司ID不存在");
-            EsmInsCompany eic = esmInsCompanyServiceService.getById(insCompanyId);
-            if (null == eic) throw new SystemException("保险公司不存在");
-            iieb.setInsCompanyId(eic.getId());
-            iieb.setInsCompanyName(eic.getName());
-            save(iieb);
-            try {
-                //导入保险公司详细数据
-                invInsExternalBillsDetailsService.importData(file, iieb);
-            }catch (Exception e){
-                log.error("导入保险公司数据失败:"+e.getMessage());
-                iieb.setImportStatus("0");
-                iieb.setErrorMsg(e.getMessage());
-            }
+    public void importData(InvInsImportDto importDto, InvExternalBills iieb,MultipartFile file) {
+        try {
+
+
 
+            if (importDto.getFlag().equals("1")) {
 
-        } else if (flag.equals("2")) {
-            iieb.setBusinessChannels(businessChannels);
-            save(iieb);
-            try {
+                EsmInsCompany eic = esmInsCompanyService.getById(importDto.getInsCompanyId());
+                if (null == eic) throw new SystemException("未找到匹配的保险公司信息");
+                iieb.setInsCompanyId(eic.getId());
+                iieb.setInsCompanyName(eic.getName());
+                //导入保险公司详细数据
+                invInsExternalBillsDetailsService.importData(importDto,file, iieb);
+            } else if (importDto.getFlag().equals("2")) {
+                //导入渠道详细数据
                 invChannelsExternalBillsDetailsService.importData(file, iieb);
-            }catch (Exception e){
-                log.error("导入渠道信息数据失败:"+e.getMessage());
-                iieb.setImportStatus("0");
-                iieb.setErrorMsg(e.getMessage());
             }
-
+        } catch (Exception e) {
+            e.printStackTrace();
+            log.error("导入数据失败:" + e.getMessage());
+            iieb.setImportStatus("0");
+            iieb.setErrorMsg(e.getMessage());
         }
 
         updateById(iieb);
-
     }
 
-    @Override
-    public void importDataAnew(String flag, String batchNum, MultipartFile file, InvExternalBills ieb) {
-
-        if(flag.equals("1")){
-
-            try {
-                //删除详细数据
-                invInsExternalBillsDetailsService.deleteByBatchNum(batchNum);
-                //导入《保司》详细数据
-                invInsExternalBillsDetailsService.importData(file, ieb);
-            } catch (Exception e) {
-                ieb.setImportStatus("0");
-                updateById(ieb);
-            }
-        }else if(flag.equals("2")){
-
-            try {
-                //删除详细数据
-                invChannelsExternalBillsDetailsService.deleteByBatchNum(batchNum);
-                //导入《渠道》详细数据
-                invChannelsExternalBillsDetailsService.importData(file, ieb);
-            } catch (Exception e) {
-                ieb.setImportStatus("0");
-                updateById(ieb);
-            }
-        }
-
 
+//    @Override
+//    public void importData(String flag, String insCompanyId, String businessChannels, InvExternalBills iieb, MultipartFile file) {
+//
+//
+//    }
 
-    }
+//    @Override
+//    public void importDataAnew(String flag, String batchNum, MultipartFile file, InvExternalBills ieb) {
+//
+//        if (flag.equals("1")) {
+//
+//            try {
+//                //删除详细数据
+//                invInsExternalBillsDetailsService.deleteByBatchNum(batchNum);
+//                //导入《保司》详细数据
+//                invInsExternalBillsDetailsService.importData(file, ieb);
+//            } catch (Exception e) {
+//                ieb.setImportStatus("0");
+//                updateById(ieb);
+//            }
+//        } else if (flag.equals("2")) {
+//
+//            try {
+//                //删除详细数据
+//                invChannelsExternalBillsDetailsService.deleteByBatchNum(batchNum);
+//                //导入《渠道》详细数据
+//                invChannelsExternalBillsDetailsService.importData(file, ieb);
+//            } catch (Exception e) {
+//                ieb.setImportStatus("0");
+//                updateById(ieb);
+//            }
+//        }
+//
+//
+//    }
 }
 
 

+ 187 - 31
src/main/java/com/ydtech/modules/inv/service/impl/InvInsExternalBillsDetailsServiceImpl.java

@@ -1,32 +1,43 @@
 package com.ydtech.modules.inv.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 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.inv.dao.InvInsExternalBillsDetailsMapper;
 import com.ydtech.modules.inv.model.InvExternalBills;
 import com.ydtech.modules.inv.model.InvInsExternalBillsDetails;
+import com.ydtech.modules.inv.model.dto.InvInsChinaCoalExcelDto;
+import com.ydtech.modules.inv.model.dto.InvInsImportDto;
+import com.ydtech.modules.inv.model.dto.InvInsSimpleSysExcelDto;
+import com.ydtech.modules.inv.model.dto.InvInsStandardExcelDto;
 import com.ydtech.modules.inv.service.InvExternalBillsService;
 import com.ydtech.modules.inv.service.InvInsExternalBillsDetailsService;
 import com.ydtech.utils.BigDecimalUtils;
 import com.ydtech.utils.StringUtils;
 import com.ydtech.utils.excel.ExcelUtils2;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
 import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
-* @author Administrator
-* @description 针对表【inv_ins_external_bills_details(财务 - 保险公司 - 外部票据 - 详情)】的数据库操作Service实现
-* @createDate 2023-06-06 11:08:53
-*/
+ * @author Administrator
+ * @description 针对表【inv_ins_external_bills_details(财务 - 保险公司 - 外部票据 - 详情)】的数据库操作Service实现
+ * @createDate 2023-06-06 11:08:53
+ */
 @Service
 public class InvInsExternalBillsDetailsServiceImpl extends ServiceImpl<InvInsExternalBillsDetailsMapper, InvInsExternalBillsDetails>
-    implements InvInsExternalBillsDetailsService {
+        implements InvInsExternalBillsDetailsService {
 
     @Autowired
     InvExternalBillsService invExternalBillsService;
@@ -40,49 +51,194 @@ public class InvInsExternalBillsDetailsServiceImpl extends ServiceImpl<InvInsExt
 
 
     @Override
-    public void importData(MultipartFile file, InvExternalBills iieb) {
+    public InvExternalBills importData(InvInsImportDto importDto, MultipartFile file, InvExternalBills iieb) throws Exception {
 
-        String errorMsg = "";
-        List<InvInsExternalBillsDetails> list = null;
-        try {
-            list = ExcelUtils2.importExcel(file, InvInsExternalBillsDetails.class,0,1,1);
-
-        } catch (IOException e) {
-//            return HttpResult.error("导入失败!" + e.getMessage());
-//            throw new SystemException("导入失败!" + e.getMessage());
-            errorMsg = "导入失败!" + e.getMessage();
-        }
+        List<InvInsExternalBillsDetails> list = buildImportExcel(importDto, file, iieb);
 
+        BigDecimal totalMlifta = BigDecimal.ZERO;
+        BigDecimal totalVavt = BigDecimal.ZERO;
+        BigDecimal totalCip = BigDecimal.ZERO;
 
-        list = list.stream().filter(l -> l.getPlateNum()!=null).collect(Collectors.toList());
-        BigDecimal totalMlifta =  BigDecimal.ZERO;
-        BigDecimal totalVavt =  BigDecimal.ZERO;
-        BigDecimal totalCip =  BigDecimal.ZERO;
-        for(int i = 0 ; i < list.size() ;i++){
-            if(null == list.get(i)) list.remove(list.get(i));
+//            list = list.stream().filter(l -> l.getPlateNum() != null).collect(Collectors.toList());
+        for (int i = 0; i < list.size(); i++) {
+            if (null == list.get(i)) list.remove(list.get(i));
             list.get(i).setBatchNum(iieb.getId());
             totalMlifta = totalMlifta.add(BigDecimalUtils.nullToZero(list.get(i).getMlifta()));
             totalVavt = totalVavt.add(BigDecimalUtils.nullToZero(list.get(i).getVavt()));
             totalCip = totalCip.add(BigDecimalUtils.nullToZero(list.get(i).getCip()));
 
         }
-
         boolean boo = saveBatch(list);
-        if(!boo) errorMsg = "保存数据出错";
+
+        iieb.setInventoryQuantity(list.size());
+        iieb = InvExternalBills.buildImportInvExternalBills(iieb, boo, totalMlifta, totalVavt, totalCip);
+//        invExternalBillsService.updateById(iieb);
+        return iieb;
+
+
+    }
+
+
+    /**
+     * 构造导入excel数据
+     *
+     * @author: lig
+     * @date: 2023年07月06日 0006
+     */
+    private List<InvInsExternalBillsDetails> buildImportExcel(InvInsImportDto importDto, MultipartFile file, InvExternalBills iieb) throws Exception {
+
+
+        List<InvInsExternalBillsDetails> list;
+        Map<String, InvInsExternalBillsDetails> m = new HashMap();
+
+        //标准模板
+        if (importDto.isStandard()) {
+            List<InvInsStandardExcelDto> standardList = ExcelUtils2.importExcel(file, InvInsStandardExcelDto.class, 0, 1, 1);
+            standardList.stream().forEach(a -> {
+
+                InvInsExternalBillsDetails iiebd = new InvInsExternalBillsDetails();
+                if (m.containsKey(a.getPlateNum())) {
+                    iiebd = m.get(a.getPlateNum());
+
+                } else {
+                    BeanUtil.copyProperties(a, iiebd);
+                }
+                buildStandardDtoParam(a, iiebd);
+                m.put(a.getPlateNum(), iiebd);
+            });
+
+        } else if (iieb.getInsCompanyId().equals("000019")) {
+            //中煤
+            List<InvInsChinaCoalExcelDto> zmlist = ExcelUtils2.importExcel(file, InvInsChinaCoalExcelDto.class, 0, 1, 1);
+            zmlist.stream().forEach(a -> {
+
+                InvInsExternalBillsDetails iiebd = new InvInsExternalBillsDetails();
+                if (m.containsKey(a.getPlateNum())) {
+                    iiebd = m.get(a.getPlateNum());
+
+                } else {
+                    BeanUtil.copyProperties(a, iiebd);
+                }
+                buildChinaCoalDtoParam(a, iiebd);
+                m.put(a.getPlateNum(), iiebd);
+            });
+
+        } else {
+            //万家模板
+            List<InvInsSimpleSysExcelDto> wjlist = ExcelUtils2.importExcel(file, InvInsSimpleSysExcelDto.class, 0, 1, 1);
+            wjlist.stream().forEach(b -> {
+
+                InvInsExternalBillsDetails iiebd = new InvInsExternalBillsDetails();
+                if (m.containsKey(b.getPlateNum())) {
+                    iiebd = m.get(b.getPlateNum());
+
+                } else {
+                    BeanUtil.copyProperties(b, iiebd);
+                }
+
+                buildSimpleSysDtoParam(b, iiebd);
+
+
+                m.put(b.getPlateNum(), iiebd);
 
 
-        if(StringUtils.isNullOrEmpty(errorMsg)){
-            iieb.setImportStatus("1");
-            iieb.setErrorMsg(errorMsg);
-            iieb.setMlifta(totalMlifta);
-            iieb.setVavt(totalVavt);
-            iieb.setCip(totalCip);
-            invExternalBillsService.updateById(iieb);
+            });
         }
 
 
+        //判断车牌号是否存在  保司
 
+        List<String> listKey = m.keySet().stream().collect(Collectors.toList());
+        LambdaQueryWrapper<InvInsExternalBillsDetails> lqw = new LambdaQueryWrapper();
+        lqw.select(InvInsExternalBillsDetails::getPlateNum);
+        lqw.in(InvInsExternalBillsDetails::getPlateNum, listKey);
+
+        //查询获取对象具体字段的集合
+        List<String> longs = listObjs(lqw, new Function<Object, String>() {
+            @Override
+            public String apply(Object id) {
+                return id.toString();
+            }
+        });
+
+        List<InvInsExternalBillsDetails> plateNumRepetitionList = list(lqw);
+
+        if (plateNumRepetitionList.size() > 0 && plateNumRepetitionList.size() < 5) {
+            throw new SystemException("车牌号已经存在:" + longs);
+        } else if (plateNumRepetitionList.size() > 5) {
+            throw new SystemException("大量车牌号已经存在");
+        }
+
+
+        list = new ArrayList<>(m.values());
+
+
+        return list;
+
+
+    }
+
+
+    /**
+     * 构造 中煤 dto参数
+     *
+     * @author: lig
+     * @date: 2023年07月10日 0010
+     */
+    void buildChinaCoalDtoParam(InvInsChinaCoalExcelDto dto, InvInsExternalBillsDetails iiebd) {
+
+        iiebd.setStatus("0");
+        if (dto.getInsKindName().equals("机动车交通事故责任强制保险")) {
+            iiebd.setMlifta(dto.getPremium());
+            iiebd.setVavt(dto.getVavt());
+        } else {
+            //商业保费
+            iiebd.setCip(dto.getPremium());
+            //三者保额
+            iiebd.setTpi(dto.getTpi());
+            //三者保费
+            iiebd.setTpiCost(dto.getTpiPremium());
+        }
     }
+
+
+    /**
+     * 构造 简易系统(万家) dto参数
+     *
+     * @author: lig
+     * @date: 2023年07月10日 0010
+     */
+    void buildSimpleSysDtoParam(InvInsSimpleSysExcelDto simpleSysDto, InvInsExternalBillsDetails iiebd) {
+
+        iiebd.setStatus("0");
+        if (StringUtils.isNotEmpty(simpleSysDto.getInsKindName()) && simpleSysDto.getInsKindName().equals("交强险")) {
+            iiebd.setMlifta(simpleSysDto.getPremium());
+            iiebd.setVavt(simpleSysDto.getVavt());
+        } else {
+            //商业保费
+            iiebd.setCip(simpleSysDto.getPremium());
+//            //三者保额
+//            iiebd.setTpi(simpleSysDto.getTpi());
+//            //三者保费
+//            iiebd.setTpiCost(simpleSysDto.getTpiPremium());
+        }
+    }
+
+    /**
+     * 构造 标准模板 dto参数
+     *
+     * @author: lig
+     * @date: 2023-07-10
+     */
+    void buildStandardDtoParam(InvInsStandardExcelDto simpleSysDto, InvInsExternalBillsDetails iiebd) {
+
+        iiebd.setInsHabit(simpleSysDto.getProductName());
+        iiebd.setStatus("0");
+
+
+    }
+
+
 }
 
 

+ 3 - 1
src/main/java/com/ydtech/utils/excel/ExcelUtils2.java

@@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.ExcelImportUtil;
 import cn.afterturn.easypoi.excel.entity.ExportParams;
 import cn.afterturn.easypoi.excel.entity.ImportParams;
 import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import com.ydtech.exception.SystemException;
 import com.ydtech.modules.inv.model.InvInvoiceInfo;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -164,7 +165,8 @@ public class ExcelUtils2 {
         try {
             return ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, importParams);
         } catch (Exception e) {
-            throw new RuntimeException(e);
+            throw new SystemException("导入excel失败:" + e.getMessage());
+//            throw new RuntimeException(e);
         }
 
     }

BIN
src/main/resources/template/finance_channel_model_A.xlsx


BIN
src/main/resources/template/finance_ins_model_A.xlsx