Explorar o código

添加读取pdf的配置,添加文件读取

hxl13994548489 hai 1 ano
pai
achega
b14868d0ab

+ 116 - 0
src/main/java/com/ydtech/modules/order/controller/InsOrderReadPdfController.java

@@ -0,0 +1,116 @@
+package com.ydtech.modules.order.controller;
+
+
+import com.ydtech.core.page.HttpResult;
+import com.ydtech.modules.admin.model.dto.SysUserDto;
+import com.ydtech.modules.admin.model.dto.SysUserLinkAreaDto;
+import com.ydtech.modules.admin.model.vo.*;
+import com.ydtech.modules.admin.service.SysUserLinkAreaService;
+import com.ydtech.modules.base.controller.BaseController;
+import com.ydtech.modules.order.entity.BasePageResult;
+import com.ydtech.modules.order.entity.dto.InsOrderReadPdfContentDto;
+import com.ydtech.modules.order.entity.po.InsOrderReadPdf;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfContentVo;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfVo;
+import com.ydtech.modules.order.service.InsOrderReadPdfService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/10/14 17:30
+ *  @Description:
+ */
+@Api(tags = "读取保单配置")
+@RequestMapping("/insOrderReadPdf")
+@RestController
+public class InsOrderReadPdfController extends BaseController {
+
+
+    @Autowired
+    private InsOrderReadPdfService insOrderReadPdfService;
+
+    @PostMapping("queryPage")
+    @ApiOperation(value = "读取保单配置分页")
+    public HttpResult<BasePageResult<InsOrderReadPdf>> queryPage(@RequestBody InsOrderReadPdfVo insOrderReadPdfVo) {
+
+        try{
+            BasePageResult<InsOrderReadPdf> result = insOrderReadPdfService.queryPage(insOrderReadPdfVo);
+            return HttpResult.ok("查询数据成功", result);
+        }catch (Exception e){
+            return HttpResult.error("查询错误"+e.getMessage());
+        }
+    }
+
+    @PostMapping("addOrUpdate")
+    @ApiOperation("读取保单配置添加修改")
+    public HttpResult<Object> addOrUpdate(@RequestBody InsOrderReadPdfVo insOrderReadPdfVo) {
+
+        try{
+            insOrderReadPdfService.addOrUpdate(insOrderReadPdfVo,getUser());
+            return HttpResult.ok("操作成功");
+        }catch (Exception e){
+            return HttpResult.error("操作失败"+e.getMessage());
+        }
+
+    }
+
+    @GetMapping("deleteById")
+    @ApiOperation("读取保单配置删除")
+    public HttpResult<Object> deleteById(String id) {
+        if(id==null || "".equals(id)) {
+            return HttpResult.error("id不能为空");
+        }
+        try{
+            insOrderReadPdfService.removeById(id);
+            return HttpResult.ok("删除成功");
+        }catch (Exception e){
+            return HttpResult.error("删除失败"+e.getMessage());
+        }
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/14 17:31
+     *  @Description: 回显
+     */
+    @GetMapping("/findById")
+    @ApiOperation(value = "通过id查询信息")
+    public HttpResult<InsOrderReadPdf> findAreaListByUserId(String id) {
+        if(id==null || "".equals(id)) {
+            return HttpResult.error("id不能为空");
+        }
+        try{
+            InsOrderReadPdf insOrderReadPdf = insOrderReadPdfService.getById(id);
+            return HttpResult.ok(insOrderReadPdf);
+        }catch (Exception e){
+            return HttpResult.error("查询失败"+e.getMessage());
+        }
+
+    }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 14:24
+     *  @Description: 读取pdf内容
+     */
+    @PostMapping("readPdfContent")
+    @ApiOperation("读取保单内容")
+    public HttpResult<Object> readPdfContent(@RequestBody @Valid InsOrderReadPdfContentVo insOrderReadPdfContentVo) {
+
+        try{
+            InsOrderReadPdfContentDto dto= insOrderReadPdfService.readPdfContent(insOrderReadPdfContentVo);
+            return HttpResult.ok(dto);
+        }catch (Exception e){
+            return HttpResult.error("操作失败"+e.getMessage());
+        }
+
+    }
+}

+ 23 - 0
src/main/java/com/ydtech/modules/order/dao/InsOrderReadPdfMapper.java

@@ -0,0 +1,23 @@
+package com.ydtech.modules.order.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ydtech.modules.order.entity.po.InsOrderReadPdf;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfVo;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ *  @version
+ *  @author: hxl
+ *  @Date: 2024/10/14 17:27
+ *  @Description: 保单读取配置
+ */
+public interface InsOrderReadPdfMapper extends BaseMapper<InsOrderReadPdf> {
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/14 18:04
+     *  @Description: 分頁查詢
+     */
+    Page<InsOrderReadPdf> queryPage(@Param("page") Page<InsOrderReadPdf> page, @Param("vo") InsOrderReadPdfVo insOrderReadPdfVo);
+}

+ 435 - 5
src/main/java/com/ydtech/modules/order/entity/api/pingan/utils/PDFUtil.java

@@ -1,8 +1,18 @@
 package com.ydtech.modules.order.entity.api.pingan.utils;
 
+import com.ydtech.constants.InsuranceEnum;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.text.PDFTextStripper;
+
 
 import java.io.*;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.HashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
  *  @version
  *  @author: hxl
@@ -23,11 +33,11 @@ public class PDFUtil {
         String parentPath = encryptFile.getParent();
         String name = encryptFile.getName();
         String fileName = name.split("\\.")[0] + "-decipher.pdf";
-        PDDocument load = PDDocument.load(encryptFile, password);
-        load.setAllSecurityToBeRemoved(true);
-        String decodeFilePath = parentPath + File.separator+fileName;
-        load.save(decodeFilePath);
-        load.close();
+        //PDDocument load = PDDocument.load(encryptFile, password);
+        //load.setAllSecurityToBeRemoved(true);
+        //String decodeFilePath = parentPath + File.separator+fileName;
+       // load.save(decodeFilePath);
+       // load.close();
     }
 
     /**
@@ -147,4 +157,424 @@ public class PDFUtil {
         decipher(targetPath,password);
     }
 
+    public static String getPdfText(String pdfFilePath) {
+        PDDocument document = null;
+        String text ="";
+        try {
+            document = PDDocument.load(new File(pdfFilePath));
+            PDFTextStripper pdfStripper = new PDFTextStripper();
+            pdfStripper.setSortByPosition(true); // 设置为true以按照文档中的顺序提取文本
+            pdfStripper.setShouldSeparateByBeads(true);
+            text= pdfStripper.getText(document);
+            text = text.replaceAll("\\s+", " ");
+            document.close();
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+       return text;
+    }
+
+    public static String getPdfContentStr(String pdfText, String beginStr,String endStr,String dateType) {
+        String contentStr = getContentStr(pdfText, beginStr, endStr);
+        if(StringUtils.isNotBlank(contentStr)){
+            contentStr=contentStr.replaceAll(" ", "");
+            contentStr=contentStr.replaceAll("\\n+", "");
+            contentStr=contentStr.replaceAll("\\t+", "");
+            contentStr=contentStr.replaceAll("\\r+", "");
+            contentStr = contentStr.replaceAll("\\s+", "");
+            contentStr = contentStr.replaceAll("[^\u4E00-\u9FA50-9年月日:-]+", "");
+            contentStr = contentStr.replaceAll("时", "");
+        }
+        return contentStr;
+    }
+
+    public static LocalDateTime getPdfContentDate(String pdfText, String beginStr,String endStr,String dateType) {
+        String payDate = getContentStr(pdfText, beginStr, endStr);
+        LocalDateTime payDateTime = null;
+        if("1".equals(dateType)){
+            payDateTime = getStringTranferDate(payDate);
+        }else if("2".equals(dateType)){
+            payDateTime = getStringTranferDateCPIC(payDate);
+        }else if("3".equals(dateType)){
+            payDateTime = getStringTranferDatePinAn(payDate);
+        }
+        return payDateTime;
+    }
+    public static HashMap<String,LocalDateTime> getPdfContent(String pdfPath, String companyId){
+        HashMap<String,LocalDateTime>  map =new  HashMap<String,LocalDateTime>();
+        String pdfText = getPdfText(pdfPath);
+        System.out.println(pdfText);
+        String payDate=null;
+        String signDate=null;
+        if(StringUtils.isNotBlank(pdfText)){
+            //缴费时间、签单时间 payDate signingTime
+            //中煤  ===================== 11
+           if(companyId.contains(InsuranceEnum.ZMBX.getCode())){
+               payDate = getContentStr(pdfText, "收付确认时间:", "保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           //永诚 ----------------------------11
+           }else if(companyId.contains(InsuranceEnum.AICS.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "电子保单生成时间");
+               //payDate = getContentStr(pdfText, "收费确认时间:", "业 电子保单生成时间:");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           //安盛  ================================11
+           }else if(companyId.contains(InsuranceEnum.TPBX.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间", "微信二维码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           //恒邦    ====================   11
+           }else if(companyId.contains(InsuranceEnum.HBIC.getCode())){
+               payDate = getContentStr(pdfText, "保费确认时间:", "保单打印时间");
+               signDate = getContentStr(pdfText, "签单日期:", "核保");
+           }
+           //国任   =========================  11
+           else if(companyId.contains(InsuranceEnum.XDCX.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "核保");
+           }
+           //平安 =================================33
+           else if(companyId.contains(InsuranceEnum.PAIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           // 华农   ============================1.1
+           else if(companyId.contains(InsuranceEnum.HNIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "有效保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+
+           // 华泰   ============================  1  1
+           else if(companyId.contains(InsuranceEnum.HTIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "有效保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           // 众安   ================================ 2.2
+           else if(companyId.contains(InsuranceEnum.ZAPA.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //诚泰    ========================   1.2
+           else if(companyId.contains(InsuranceEnum.CHAC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //大家   ======================   111
+           else if(companyId.contains(InsuranceEnum.DJPC.getCode())){
+               payDate = getContentStr(pdfText, "收付确认时间:", "投保确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //泰康   =================================   1.2
+           else if(companyId.contains(InsuranceEnum.TKIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //紫金   =============================   1.1
+           else if(companyId.contains(InsuranceEnum.ZKIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //渤海  ===========================  11
+           else if(companyId.contains(InsuranceEnum.BPIC.getCode())){
+               payDate = getContentStr(pdfText, "收款确认时间:", "投保确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "核保");
+           }
+           //太平   ===================   1.2
+           else if(companyId.contains(InsuranceEnum.TPIC.getCode())){
+               payDate = getContentStr(pdfText, "保费确认时间:", "确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //天安   ==============================1.1
+           else if(companyId.contains(InsuranceEnum.TAIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "生成保单时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //人保 ================================1.1
+           else if(companyId.contains(InsuranceEnum.PICC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //人寿   ===========================1 ,2
+           else if(companyId.contains(InsuranceEnum.GPIC.getCode())){
+               payDate = getContentStr(pdfText, "收付确认时间:", "保单打印时间");
+               signDate = getContentStr(pdfText, "签单日期:", "保险人签章");
+           }
+
+           //阳光  ===========================  11
+           else if(companyId.contains(InsuranceEnum.YGBX.getCode())){
+               payDate = getContentStr(pdfText, "收款确认:", "电子保单流水号");
+               signDate = getContentStr(pdfText, "签单日期:", "经办");
+           }
+
+           //太平洋  ================================2.2
+           else if(companyId.contains(InsuranceEnum.CPIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+            // 泰山   =========================  1.1
+           else if(companyId.contains(InsuranceEnum.TSBX.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           //中华  ============================  3.1
+           else if(companyId.contains(InsuranceEnum.CICP.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "核保");
+           }
+
+           // 华安  ===================   1.1
+           else if(companyId.contains(InsuranceEnum.HAIC.getCode())){
+               payDate = getContentStr(pdfText, "收费时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           // 大地  ===========================1.1
+           else if(companyId.contains(InsuranceEnum.CCIC.getCode())){
+               payDate = getContentStr(pdfText, "收费确认时间:", "投保确认时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+           // 安诚 ======================  1.3
+           else if(companyId.contains(InsuranceEnum.ACIC.getCode())){
+               payDate = getContentStr(pdfText, "缴费确认时间:", "保单生成时间");
+               signDate = getContentStr(pdfText, "签单日期:", "(保");
+           }
+           // 永安   ===============================  11
+           else if(companyId.contains(InsuranceEnum.YAIC.getCode())){
+               payDate = getContentStr(pdfText, "支付确认时间:", "投保确认码");
+               signDate = getContentStr(pdfText, "签单日期:", "(保险人签章)");
+           }
+        }
+        LocalDateTime payDateTime = null;
+        LocalDateTime signDateTime = null;
+        if(companyId.contains(InsuranceEnum.PAIC.getCode()) || companyId.contains(InsuranceEnum.ZAPA.getCode())){
+            payDateTime = getStringTranferDatePinAn(payDate);
+            signDateTime = getStringTranferDatePinAn(signDate);
+        }else if(companyId.contains(InsuranceEnum.CHAC.getCode()) || companyId.contains(InsuranceEnum.TKIC.getCode()) || companyId.contains(InsuranceEnum.TPIC.getCode())
+         || companyId.contains(InsuranceEnum.GPIC.getCode()) || companyId.contains(InsuranceEnum.ACIC.getCode())){
+            payDateTime = getStringTranferDate(payDate);
+            signDateTime = getStringTranferDatePinAn(signDate);
+        }else if(companyId.contains(InsuranceEnum.CPIC.getCode())){
+            payDateTime = getStringTranferDateCPIC(payDate);
+            signDateTime = getStringTranferDateCPIC(signDate);
+        }else if(companyId.contains(InsuranceEnum.CICP.getCode())){
+            payDateTime = getStringTranferDatePinAn(payDate);
+            signDateTime = getStringTranferDate(signDate);
+        }
+        else{
+            payDateTime = getStringTranferDate(payDate);
+            signDateTime = getStringTranferDate(signDate);
+        }
+
+        map.put("payDate",payDateTime);
+        map.put("signDate",signDateTime);
+        return map;
+    }
+    private static LocalDateTime getStringTranferDateCPIC(String payDate) {
+        if (StringUtils.isNotBlank(payDate)) {
+            payDate = payDate.replaceAll(" ", "");
+            payDate = payDate.replaceAll("\\n+", "");
+            payDate = payDate.replaceAll("\\t+", "");
+            payDate = payDate.replaceAll("\\r+", "");
+            payDate = payDate.replaceAll("\\s+", "");
+            payDate = payDate.replaceAll("[\u4e00-\u9fa5]", "");
+            System.out.println(payDate.length());
+            if (payDate.length() == 18) {
+                payDate = payDate.substring(0, 10) + " " + payDate.substring(10, 18);
+            } else if (payDate.length() == 15) {
+                payDate = payDate.substring(0, 10) + " " + payDate.substring(10, 15) + ":00";
+            } else if (payDate.length() == 10) {
+                payDate = payDate + " 00:00:00";
+            }
+            return LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"));
+        }
+        return null;
+    }
+    private static LocalDateTime getStringTranferDate(String payDate) {
+        if(StringUtils.isNotBlank(payDate)){
+            payDate=payDate.replaceAll(" ", "");
+            payDate=payDate.replaceAll("\\n+", "");
+            payDate=payDate.replaceAll("\\t+", "");
+            payDate=payDate.replaceAll("\\r+", "");
+            payDate = payDate.replaceAll("\\s+", "");
+            payDate = payDate.replaceAll("[\u4e00-\u9fa5]", "");
+            System.out.println(payDate.length());
+            if(payDate.length() == 18){
+                payDate = payDate.substring(0,10)+" "+ payDate.substring(10,18);
+            }else if(payDate.length() == 15){
+                    payDate = payDate.substring(0,10)+" "+ payDate.substring(10,15)+":00";
+            }else if(payDate.length() == 10){
+                payDate = payDate+" 00:00:00";
+            }
+            return LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        }
+        return null;
+    }
+
+    private static LocalDateTime getStringTranferDatePinAn(String payDate) {
+        if(StringUtils.isNotBlank(payDate)){
+            payDate=payDate.replaceAll(" ", "");
+            payDate=payDate.replaceAll("\\n+", "");
+            payDate=payDate.replaceAll("\\t+", "");
+            payDate=payDate.replaceAll("\\r+", "");
+            payDate = payDate.replaceAll("\\s+", "");
+            payDate = payDate.replaceAll("[^\u4E00-\u9FA50-9年月日:]+", "");
+            payDate = payDate.replaceAll("时", "");
+            int count = 0;
+            int index = 0;
+            while ((index = payDate.indexOf(":", index)) != -1) {
+                index += ":".length();
+                count++;
+            }
+            System.out.println(payDate.length());
+            if((payDate.length() == 17 && count==2 ) || (payDate.length() == 18 && count==2 ) || ( payDate.length() == 19 && count==2 ) ) {
+                String minnute = payDate.substring(payDate.indexOf("日") + 1, payDate.length());
+                String day = payDate.substring(0, payDate.indexOf("日") + 1);
+                payDate = getContentStr(day) + " " + minnute;
+            }else if((payDate.length() == 14 && count==1 ) || ( payDate.length() == 15 && count==1 ) || ( payDate.length() == 16 && count==1 )){
+                String minnute = payDate.substring(payDate.indexOf("日")+1, payDate.length());
+                String day = payDate.substring(0, payDate.indexOf("日")+1);
+                payDate = getContentStr(day)+" "+ minnute+":00";
+            }else if(payDate.length() == 9 ||payDate.length() == 10 || payDate.length() == 11){
+                payDate = getContentStr(payDate)+" 00:00:00";
+            }
+            return LocalDateTime.parse(payDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        }
+        return null;
+    }
+
+    public static String  getContentStr(String input){
+        Pattern pattern = Pattern.compile("(\\d{4})年(\\d{1,2})月(\\d{1,2})日");
+        Matcher matcher = pattern.matcher(input);
+        if (matcher.matches()) {
+            String year = matcher.group(1);
+            String month = matcher.group(2);
+            String day = matcher.group(3);
+            return year+"-"+((Integer.parseInt(month)<10 && month.length()==1) ?"0"+month:month)+"-"+((Integer.parseInt(month)<10 && month.length()==1)  ?"0"+day:day);
+        } else {
+            return null;
+        }
+    }
+
+    public static String  getContentStr(String input, String beginStr, String endStr){
+        // 创建正则表达式,其中"(?s)"表示忽略换行符,"."匹配任何字符(包括换行符)
+        String regex = "(?s)" + Pattern.quote(beginStr) + "(.+?)" + Pattern.quote(endStr);
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(input);
+
+        if (matcher.find()) {
+            return matcher.group(1);
+        } else {
+            return null;
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+        //中煤
+        //String pdfFilePath = "D:\\nasData\\carInsPolicy\\晋AC692F\\晋AC692F-商业险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "ZMBX");
+        //永城
+        // String pdfFilePath = "D:\\nasData\\carInsPolicy\\1834183151125594114\\晋LD580R114B4032620240026390-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "AICS");
+        //安盛
+       // String pdfFilePath = "D:\\nasData\\carInsPolicy\\1823634528262541312\\晋JH6836-交强险保单.pdf"; // PDF文件路径
+        //  HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TPBX");
+        //恒邦
+        String pdfFilePath = "D:\\nasData\\carInsPolicy\\晋KLY103\\晋KLY103-交强险保单.pdf"; // PDF文件路径
+        HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "HBIC");
+        //国任
+        // String pdfFilePath = "D:\\nasData\\carInsPolicy\\晋A139LV\\晋A139LV-交强险保单.pdf"; // PDF文件路径
+        //  HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "XDCX");
+        //平安
+        // String pdfFilePath = "D:\\nasData\\carInsPolicy\\晋C5523Q\\晋C5523Q-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "PAIC");
+
+        //华农
+        //String pdfFilePath = "D:\\bx\\huanong\\晋KME755-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "HNIC");
+
+        // 华泰
+        //String pdfFilePath = "D:\\bx\\huatai\\晋AH15L3-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "HTIC");
+
+        //众安
+       // String pdfFilePath = "D:\\bx\\zongan\\晋JTT447-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "ZAPA");
+
+        //诚泰
+       // String pdfFilePath = "D:\\bx\\chengtai\\晋A1WJ61-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "CHAC");
+
+        //大家
+        //String pdfFilePath = "D:\\bx\\dajia\\晋FH3550-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "DJPC");
+
+        //泰康
+        //String pdfFilePath = "D:\\bx\\taikang\\晋BB0233-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TKIC");
+
+        //紫荆
+        //String pdfFilePath = "D:\\bx\\zijin\\晋KTY710-交强险保单.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "ZKIC");
+
+        //渤海
+       // String pdfFilePath = "D:\\bx\\bohai\\晋C1358S-2141103302024015981-交强险保单.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "BPIC");
+
+       //太平
+       // String pdfFilePath = "D:\\bx\\taiping\\63fe59c9f37a2a1ab62fe8f23f63943c.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TPIC");
+
+        //天安
+        //String pdfFilePath = "D:\\bx\\tianan\\829d3f8efdc565b61092cc675d8ac316.pdf"; // PDF文件路径
+        //HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TAIC");
+
+        //人民
+        //String pdfFilePath = "D:\\bx\\renbao\\b504310a9897db5be1745c76463d9e0a.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "PICC");
+
+        //人寿
+       // String pdfFilePath = "D:\\bx\\renshou\\4d36d1b7f19059ffb14a59d04ae140fb.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "GPIC");
+
+      //  String pdfFilePath = "D:\\bx\\renshou\\4d36d1b7f19059ffb14a59d04ae140fb.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "GPIC");
+
+       // String pdfFilePath = "D:\\bx\\renshou\\4d36d1b7f19059ffb14a59d04ae140fb.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "GPIC");
+
+        //阳光
+       // String pdfFilePath = "D:\\bx\\yangguang\\e364a2ea5b29b5056005c084c69fbcde.pdf"; // PDF文件路径
+       // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "YGBX");
+
+        //太平洋
+        // String pdfFilePath = "D:\\bx\\taipingyang\\31f92fc448ef7aab3127a6d7fa07621c.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "CPIC");
+
+
+        //泰山
+        // String pdfFilePath = "D:\\bx\\taishan\\2c46d1bd604efe4d1894bf826af30e0a.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TSBX");
+
+        // String pdfFilePath = "D:\\bx\\taishan\\2c46d1bd604efe4d1894bf826af30e0a.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "TSBX");
+
+
+        //中华
+        // String pdfFilePath = "D:\\bx\\zhonghua\\e3358efb60e4924c65d28971f4a01f94.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "CICP");
+
+        // 华安
+       //  String pdfFilePath = "D:\\bx\\huaan\\9560fc38737dc922db73bf8ffaa56482.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "HAIC");
+        // 大地
+        // String pdfFilePath = "D:\\bx\\dadi\\24f9830c1807fa47ecb933b78e155ed5.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "CCIC");
+        // 安诚
+        // String pdfFilePath = "D:\\bx\\ancheng\\f0b6430219fe3f32b2d63ab41dba95c4.pdf"; // PDF文件路径
+        // HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "ACIC");
+        // 永安
+        // String pdfFilePath = "D:\\bx\\yongan\\交强.pdf"; // PDF文件路径
+        //   HashMap<String, LocalDateTime> zmbx = getPdfContent(pdfFilePath, "YAIC");
+
+        System.out.println(zmbx.toString());
+
+    }
+
 }

+ 35 - 0
src/main/java/com/ydtech/modules/order/entity/dto/InsOrderReadPdfContentDto.java

@@ -0,0 +1,35 @@
+package com.ydtech.modules.order.entity.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 保单读取信息配置表查询
+ *
+ */
+@Data
+@ApiModel(value = "保单读取信息")
+public class InsOrderReadPdfContentDto implements Serializable {
+
+
+    @ApiModelProperty("pdf内容")
+    private String pdfContent;
+    /**
+     * 保险公司名称
+     */
+
+    @ApiModelProperty("pdf解析内容")
+    private String readContent;
+
+    public InsOrderReadPdfContentDto() {
+    }
+
+    public InsOrderReadPdfContentDto(String pdfContent, String readContent) {
+        this.pdfContent = pdfContent;
+        this.readContent = readContent;
+    }
+}

+ 134 - 0
src/main/java/com/ydtech/modules/order/entity/po/InsOrderReadPdf.java

@@ -0,0 +1,134 @@
+package com.ydtech.modules.order.entity.po;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 保单读取信息配置表
+ * @TableName ins_order_read_pdf
+ */
+@TableName(value ="ins_order_read_pdf")
+@Data
+public class InsOrderReadPdf implements Serializable {
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 保险公司id
+     */
+    private String companyId;
+
+    /**
+     * 保险公司名称
+     */
+    private String companyName;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建人
+     */
+    private String createUser;
+
+    /**
+     * 读取pdf字段
+     */
+    private String readName;
+
+    /**
+     * 截取前缀
+     */
+    private String readBegin;
+
+    /**
+     * 截取后缀
+     */
+    private String readEnd;
+
+    /**
+     * 1.yyyy-mm-dd  2. yyyy/mm/dd   3.年月日
+     */
+    private String readType;
+
+    /**
+     * 保单字段信息
+     */
+    private String orderMsg;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        InsOrderReadPdf other = (InsOrderReadPdf) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
+            && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
+            && (this.getReadName() == null ? other.getReadName() == null : this.getReadName().equals(other.getReadName()))
+            && (this.getReadBegin() == null ? other.getReadBegin() == null : this.getReadBegin().equals(other.getReadBegin()))
+            && (this.getReadEnd() == null ? other.getReadEnd() == null : this.getReadEnd().equals(other.getReadEnd()))
+            && (this.getReadType() == null ? other.getReadType() == null : this.getReadType().equals(other.getReadType()))
+            && (this.getOrderMsg() == null ? other.getOrderMsg() == null : this.getOrderMsg().equals(other.getOrderMsg()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
+        result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
+        result = prime * result + ((getReadName() == null) ? 0 : getReadName().hashCode());
+        result = prime * result + ((getReadBegin() == null) ? 0 : getReadBegin().hashCode());
+        result = prime * result + ((getReadEnd() == null) ? 0 : getReadEnd().hashCode());
+        result = prime * result + ((getReadType() == null) ? 0 : getReadType().hashCode());
+        result = prime * result + ((getOrderMsg() == null) ? 0 : getOrderMsg().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", companyId=").append(companyId);
+        sb.append(", companyName=").append(companyName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", createUser=").append(createUser);
+        sb.append(", readName=").append(readName);
+        sb.append(", readBegin=").append(readBegin);
+        sb.append(", readEnd=").append(readEnd);
+        sb.append(", readType=").append(readType);
+        sb.append(", orderMsg=").append(orderMsg);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 27 - 0
src/main/java/com/ydtech/modules/order/entity/vo/InsOrderReadPdfContentVo.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;
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * 保单读取信息配置表查询
+ *
+ */
+@Data
+@ApiModel(value = "保单读取信息查询")
+public class InsOrderReadPdfContentVo implements Serializable {
+
+
+    @NotBlank(message = "保险公司id不能为空")
+    @ApiModelProperty("保险公司Id")
+    private String companyId;
+    /**
+     * 保险公司名称
+     */
+    @NotBlank(message = "保单路径不能为空")
+    @ApiModelProperty("保单路径")
+    private String url;
+}

+ 72 - 0
src/main/java/com/ydtech/modules/order/entity/vo/InsOrderReadPdfVo.java

@@ -0,0 +1,72 @@
+package com.ydtech.modules.order.entity.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 保单读取信息配置表查询
+ *
+ */
+@Data
+@ApiModel(value = "保单读取信息配置表查询")
+public class InsOrderReadPdfVo implements Serializable {
+
+    @ApiModelProperty("编号")
+    private Long id;
+
+    @ApiModelProperty("保险公司Id")
+    private String companyId;
+
+    /**
+     * 保险公司名称
+     */
+    @ApiModelProperty("保险公司名称")
+    private String companyName;
+
+
+    /**
+     * 读取pdf字段
+     */
+    @ApiModelProperty("读取pdf字段")
+    private String readName;
+
+    /**
+     * 截取前缀
+     */
+    @ApiModelProperty("字段截取前缀")
+    private String readBegin;
+
+    /**
+     * 截取后缀
+     */
+    @ApiModelProperty("字段截取后缀")
+    private String readEnd;
+
+    /**
+     * 1.yyyy-mm-dd 2.年月日 3. yyyy/mm/dd 
+     */
+    @ApiModelProperty("时间类型 1.yyyy-mm-dd 2.年月日 3. yyyy/mm/dd")
+    private String readType;
+
+    /**
+     * 保单字段信息
+     */
+    @ApiModelProperty("保单字段信息")
+    private String orderMsg;
+
+    @ApiModelProperty(value = "每页页数")
+    private int pageSize;
+
+    @ApiModelProperty(value = "页数")
+    @Min(value = 1, message = "页数最小为1")
+    private int pageNum;
+}

+ 38 - 0
src/main/java/com/ydtech/modules/order/service/InsOrderReadPdfService.java

@@ -0,0 +1,38 @@
+package com.ydtech.modules.order.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.order.entity.BasePageResult;
+import com.ydtech.modules.order.entity.dto.InsOrderReadPdfContentDto;
+import com.ydtech.modules.order.entity.po.InsOrderReadPdf;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfContentVo;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfVo;
+
+/**
+* @author Administrator
+* @description 针对表【ins_order_read_pdf(保单读取信息配置表)】的数据库操作Service
+* @createDate 2024-10-14 17:20:00
+*/
+public interface InsOrderReadPdfService extends IService<InsOrderReadPdf> {
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/14 17:44
+     *  @Description: 分页显示
+     */
+    BasePageResult<InsOrderReadPdf> queryPage(InsOrderReadPdfVo insOrderReadPdfVo);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/14 17:50
+     *  @Description: 保存更新
+     */
+    void addOrUpdate(InsOrderReadPdfVo insOrderReadPdfVo, SysUser user);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 14:32
+     *  @Description:  通過保險公司和pdf路徑读取配置信息
+     */
+    InsOrderReadPdfContentDto readPdfContent(InsOrderReadPdfContentVo insOrderReadPdfContentVo);
+}

+ 84 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsOrderReadPdfServiceImpl.java

@@ -0,0 +1,84 @@
+package com.ydtech.modules.order.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ydtech.modules.admin.model.SysUser;
+import com.ydtech.modules.admin.model.SysUserRole;
+import com.ydtech.modules.admin.model.dto.SysUserLinkAreaDto;
+import com.ydtech.modules.order.dao.InsOrderReadPdfMapper;
+import com.ydtech.modules.order.entity.BasePageResult;
+import com.ydtech.modules.order.entity.api.pingan.utils.PDFUtil;
+import com.ydtech.modules.order.entity.dto.InsOrderReadPdfContentDto;
+import com.ydtech.modules.order.entity.po.InsOrderReadPdf;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfContentVo;
+import com.ydtech.modules.order.entity.vo.InsOrderReadPdfVo;
+import com.ydtech.modules.order.service.InsOrderReadPdfService;
+import com.ydtech.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Administrator
+ * @description 针对表【ins_order_read_pdf(保单读取信息配置表)】的数据库操作Service实现
+ * @createDate 2024-10-14 17:20:00
+ */
+@Service
+public class InsOrderReadPdfServiceImpl extends ServiceImpl<InsOrderReadPdfMapper, InsOrderReadPdf>
+        implements InsOrderReadPdfService {
+
+    @Autowired
+    private InsOrderReadPdfMapper  insOrderReadPdfMapper;
+
+    @Override
+    public BasePageResult<InsOrderReadPdf> queryPage(InsOrderReadPdfVo insOrderReadPdfVo) {
+        Page<InsOrderReadPdf> page = new Page<>(insOrderReadPdfVo.getPageNum(),
+                insOrderReadPdfVo.getPageSize());
+        Page<InsOrderReadPdf> sysUserLinkAreaDtoBasePageResult = insOrderReadPdfMapper.queryPage(page, insOrderReadPdfVo);
+        return  new BasePageResult<>(insOrderReadPdfVo.getPageNum(), page.getSize(), sysUserLinkAreaDtoBasePageResult.getTotal(), page.getPages(),
+                sysUserLinkAreaDtoBasePageResult.getRecords());
+    }
+
+    @Override
+    public void addOrUpdate(InsOrderReadPdfVo insOrderReadPdfVo, SysUser user) {
+
+        InsOrderReadPdf  insOrderReadPdf  =new InsOrderReadPdf();
+        BeanUtils.copyProperties(insOrderReadPdfVo, insOrderReadPdf);
+        insOrderReadPdf.setCreateTime(new Date());
+        insOrderReadPdf.setCreateUser(user.getId());
+        if(insOrderReadPdfVo.getId()==null){
+             this.save(insOrderReadPdf);
+        }else{
+            this.updateById(insOrderReadPdf);
+        }
+
+    }
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 14:33
+     *  @Description: 读取pdf信息
+     */
+    @Override
+    public InsOrderReadPdfContentDto readPdfContent(InsOrderReadPdfContentVo insOrderReadPdfContentVo) {
+        LambdaQueryWrapper<InsOrderReadPdf> qw = new LambdaQueryWrapper<>();
+        qw.eq(InsOrderReadPdf::getCompanyId,insOrderReadPdfContentVo.getCompanyId());
+        List<InsOrderReadPdf> list = this.list(qw);
+        String pdfText = PDFUtil.getPdfText(insOrderReadPdfContentVo.getUrl());
+        String content ="";
+        if(StringUtils.isNotBlank(pdfText)){
+            if(list!=null  && list.size()>0){
+                for(InsOrderReadPdf insOrderReadPdf:list){
+                    String pdfContentStr = PDFUtil.getPdfContentStr(pdfText, insOrderReadPdf.getReadBegin(), insOrderReadPdf.getReadEnd(), insOrderReadPdf.getReadType());
+                    content+=insOrderReadPdf.getReadName()+"的值为:"+pdfContentStr+";";
+                }
+            }
+        }
+        return new InsOrderReadPdfContentDto(pdfText,content);
+    }
+}

+ 12 - 0
src/main/java/com/ydtech/modules/scheme/controller/PtlSchemeController.java

@@ -515,4 +515,16 @@ public class PtlSchemeController extends BaseController {
         Page page = new Page(drivingIntentionQueryVo.getPageNum(), drivingIntentionQueryVo.getPageSize());
         return HttpResult.ok("",insDrivingIntentionInsuranceService.getSchemeDrivingIntentionInsuranceList(page,drivingIntentionQueryVo));
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 11:27
+     *  @Description: 获取已承保保险公司列表
+     */
+    @ApiOperation(value = "获取已承保保险公司列表")
+    @PostMapping("/allCompanyList")
+    public HttpResult allCompanyList(@RequestBody SchemeQueryVo schemeQueryVo) {
+        Page page = buildPageRequest(schemeQueryVo.getPageDto());
+        return HttpResult.ok(ptlSchemeService.allCompanyList(page,schemeQueryVo));
+    }
 }

+ 2 - 0
src/main/java/com/ydtech/modules/scheme/dao/PtlSchemeMapper.java

@@ -48,6 +48,8 @@ public interface PtlSchemeMapper extends BaseMapper<PtlScheme> {
 
     List<PtlSchemeRules> getSchemeRules(@Param("companyIds") List<String> companyIds,@Param("productId") String productId,
                                         @Param("vehicleType") String vehicleType,@Param("energyType") String energyType);
+
+    Page<EsmInsCompany> allCompanyList(Page page, @Param("vo") SchemeQueryVo schemeQueryVo);
 }
 
 

+ 7 - 0
src/main/java/com/ydtech/modules/scheme/service/PtlSchemeService.java

@@ -78,4 +78,11 @@ public interface PtlSchemeService extends IService<PtlScheme> {
      * @return
      */
     List<CompanySchemeVo> getCompanySchemeInfo(SchemeQueryVo schemeQueryVo);
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 11:28
+     *  @Description: 查询已承保的保险公司机构
+     */
+    Page<EsmInsCompany>  allCompanyList(Page page, @Param("vo") SchemeQueryVo schemeQueryVo);
 }

+ 10 - 0
src/main/java/com/ydtech/modules/scheme/service/impl/PtlSchemeServiceImpl.java

@@ -628,4 +628,14 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
         });
         return schemeVos;
     }
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/10/15 11:29
+     *  @Description: 获取已经承包的保险公司列表
+     */
+    @Override
+    public Page<EsmInsCompany> allCompanyList(Page page, SchemeQueryVo schemeQueryVo) {
+        return baseMapper.allCompanyList(page,schemeQueryVo);
+    }
 }

+ 44 - 0
src/main/resources/mapper/modules/order/InsOrderReadPdfMapper.xml

@@ -0,0 +1,44 @@
+<?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.InsOrderReadPdfMapper">
+
+    <resultMap id="BaseResultMap" type="com.ydtech.modules.order.entity.po.InsOrderReadPdf">
+            <id property="id" column="id" jdbcType="BIGINT"/>
+            <result property="companyId" column="company_id" jdbcType="VARCHAR"/>
+            <result property="companyName" column="company_name" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="createUser" column="create_user" jdbcType="VARCHAR"/>
+            <result property="readName" column="read_name" jdbcType="VARCHAR"/>
+            <result property="readBegin" column="read_begin" jdbcType="VARCHAR"/>
+            <result property="readEnd" column="read_end" jdbcType="VARCHAR"/>
+            <result property="readType" column="read_type" jdbcType="VARCHAR"/>
+            <result property="orderMsg" column="order_msg" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,company_id,company_name,
+        create_time,create_user,read_name,
+        read_begin,read_end,read_type,
+        order_msg
+    </sql>
+    <select id="queryPage" resultType="com.ydtech.modules.order.entity.po.InsOrderReadPdf">
+       select
+            iorp.id,
+            iorp.company_id,
+            iorp.company_name,
+            iorp.read_name,
+            iorp.read_begin,
+            iorp.read_end,read_type,
+            iorp.order_msg
+       from
+           ins_order_read_pdf iorp
+        <where>
+            <if test="vo.companyId != null and vo.companyId != ''">
+                and iorp.company_id = #{vo.companyId}
+            </if>
+        </where>
+
+    </select>
+</mapper>

+ 19 - 0
src/main/resources/mapper/modules/scheme/PtlSchemeMapper.xml

@@ -121,5 +121,24 @@
           AND ps.vehicle_type = #{vehicleType}
     </select>
 
+    <select id="allCompanyList" resultType="com.ydtech.modules.esm.model.EsmInsCompany">
+        SELECT
+            eic.*
+        FROM
+            esm_ins_company eic
+        WHERE
+            id IN (
+                SELECT
+                    eic.id
+                FROM
+                    ins_area_company iac
+                        LEFT JOIN esm_ins_company eic ON iac.company_id = eic.id
+                WHERE
+                    iac.orderstatus = 3
+                GROUP BY
+                    eic.id
+            )
+    </select>
+
 
 </mapper>