保存进度
This commit is contained in:
		@@ -1,87 +0,0 @@
 | 
				
			|||||||
/*
 | 
					 | 
				
			||||||
 * @Author: Kane
 | 
					 | 
				
			||||||
 * @Date: 2025-03-16 00:35:09
 | 
					 | 
				
			||||||
 * @LastEditors: Kane
 | 
					 | 
				
			||||||
 * @FilePath: /cpicxim-huixiabao/.vscode/fileheader.template.js
 | 
					 | 
				
			||||||
 * @Description: 
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * This file is generated by VSCode extension: Fileheader Pro
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * These comments can help you write your own template with type hint
 | 
					 | 
				
			||||||
 * @typedef {Object} FileheaderVariable  Fileheader variables
 | 
					 | 
				
			||||||
 * @property {string} birthtime file birth time. will get it from VCS or fallback to filesystem when it is not available
 | 
					 | 
				
			||||||
 * @property {string} mtime file modification time. will get it from VCS or fallback to filesystem when it is not available
 | 
					 | 
				
			||||||
 * @property {string} authorName if the file is tracked by VCS, it will get the author name from VCS. else it will get it from current user name
 | 
					 | 
				
			||||||
 * @property {string} authorEmail if the file is tracked by VCS, it will get the author email from VCS. else it will get it from current user email
 | 
					 | 
				
			||||||
 * @property {string} userName else it will get it from current user name
 | 
					 | 
				
			||||||
 * @property {string} userEmail  user email is from VSCode config, and fallback to VCS config
 | 
					 | 
				
			||||||
 * @property {string} companyName
 | 
					 | 
				
			||||||
 * @property {string} projectName name of current project
 | 
					 | 
				
			||||||
 * @property {string} filePath the file path, relative to project root with POSIX path separator
 | 
					 | 
				
			||||||
 * @property {string} dirPath the directory path, relative to project root with POSIX path separator
 | 
					 | 
				
			||||||
 * @property {string} fileName filename with extension
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 /**
 | 
					 | 
				
			||||||
 * @typedef {string | number | null | undefined | Template | boolean} TemplateInterpolation NOTE: boolean or falsy value will render empty string
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * @typedef {{ strings: TemplateStringsArray; interpolations: TemplateInterpolation[]; }} Template
 | 
					 | 
				
			||||||
 * @typedef {(strings: TemplateStringsArray, ...values: any[]) => string} ITemplateFunction
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Please confirm your provider extends from globalThis.FileheaderLanguageProvider
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
class CustomLanguageProvider extends globalThis.FileheaderLanguageProvider {
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @type {string[]}
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  languages = [
 | 
					 | 
				
			||||||
    "java",
 | 
					 | 
				
			||||||
    "javascript",
 | 
					 | 
				
			||||||
    "typescript",
 | 
					 | 
				
			||||||
    "javascriptreact",
 | 
					 | 
				
			||||||
    "typescriptreact",
 | 
					 | 
				
			||||||
  ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @type {string=} the language block comment start string.
 | 
					 | 
				
			||||||
   * this is for future feature: support detect old custom template when custom template changes
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  blockCommentStart = "/**";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * @type {string=}
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  blockCommentEnd = "*/";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /**
 | 
					 | 
				
			||||||
   * get your template when document language matched
 | 
					 | 
				
			||||||
   * @param {ITemplateFunction} tpl template function, it is a tagged function, support nested interpolation
 | 
					 | 
				
			||||||
   * @param {FileheaderVariable} variables template variables
 | 
					 | 
				
			||||||
   * @returns {Template}
 | 
					 | 
				
			||||||
   */
 | 
					 | 
				
			||||||
  getTemplate(tpl, variables) {
 | 
					 | 
				
			||||||
    // prettier-ignore
 | 
					 | 
				
			||||||
    return tpl
 | 
					 | 
				
			||||||
`/**
 | 
					 | 
				
			||||||
 * @Author:        ${variables.authorName} <${variables.authorEmail}>
 | 
					 | 
				
			||||||
 * @Date:          ${variables.birthtime}
 | 
					 | 
				
			||||||
 * @LastEditors:   ${variables.userName}
 | 
					 | 
				
			||||||
 * @LastModified:  ${variables.mtime}
 | 
					 | 
				
			||||||
 * @FilePath:      ${variables.filePath}
 | 
					 | 
				
			||||||
 * @Description:
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 * Copyright (c) ${2025} by Kane All rights reserved
 | 
					 | 
				
			||||||
 */`;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// export your provider classes
 | 
					 | 
				
			||||||
module.exports = [CustomLanguageProvider];
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
    "java.configuration.updateBuildConfiguration": "automatic"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,152 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
 | 
					 | 
				
			||||||
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
					 | 
				
			||||||
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
					 | 
				
			||||||
  <modelVersion>4.0.0</modelVersion>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <groupId>com.cpic.xim</groupId>
 | 
					 | 
				
			||||||
  <artifactId>east-utils</artifactId>
 | 
					 | 
				
			||||||
  <version>20250808.1921</version>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <name>east</name>
 | 
					 | 
				
			||||||
  <!-- FIXME change it to the project's website -->
 | 
					 | 
				
			||||||
  <url>http://www.example.com</url>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <properties>
 | 
					 | 
				
			||||||
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
					 | 
				
			||||||
    <maven.compiler.release>17</maven.compiler.release>
 | 
					 | 
				
			||||||
    <log4j.version>2.24.3</log4j.version>
 | 
					 | 
				
			||||||
    <jackson.version>2.19.2</jackson.version>
 | 
					 | 
				
			||||||
  </properties>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <dependencyManagement>
 | 
					 | 
				
			||||||
    <dependencies>
 | 
					 | 
				
			||||||
      <dependency>
 | 
					 | 
				
			||||||
        <groupId>org.junit</groupId>
 | 
					 | 
				
			||||||
        <artifactId>junit-bom</artifactId>
 | 
					 | 
				
			||||||
        <version>5.11.0</version>
 | 
					 | 
				
			||||||
        <type>pom</type>
 | 
					 | 
				
			||||||
        <scope>import</scope>
 | 
					 | 
				
			||||||
      </dependency>
 | 
					 | 
				
			||||||
    </dependencies>
 | 
					 | 
				
			||||||
  </dependencyManagement>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <dependencies>
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.junit.jupiter</groupId>
 | 
					 | 
				
			||||||
      <artifactId>junit-jupiter-api</artifactId>
 | 
					 | 
				
			||||||
      <scope>test</scope>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- Optionally: parameterized tests support -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.junit.jupiter</groupId>
 | 
					 | 
				
			||||||
      <artifactId>junit-jupiter-params</artifactId>
 | 
					 | 
				
			||||||
      <scope>test</scope>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- POI -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.apache.poi</groupId>
 | 
					 | 
				
			||||||
      <artifactId>poi</artifactId>
 | 
					 | 
				
			||||||
      <version>5.4.1</version> <!-- 请根据实际情况选择最新版本 -->
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.apache.poi</groupId>
 | 
					 | 
				
			||||||
      <artifactId>poi-ooxml</artifactId>
 | 
					 | 
				
			||||||
      <version>5.4.1</version> <!-- 请根据实际情况选择最新版本 -->
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.apache.xmlbeans</groupId>
 | 
					 | 
				
			||||||
      <artifactId>xmlbeans</artifactId>
 | 
					 | 
				
			||||||
      <version>5.3.0</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>org.apache.poi</groupId>
 | 
					 | 
				
			||||||
      <artifactId>poi-ooxml-schemas</artifactId>
 | 
					 | 
				
			||||||
      <version>4.1.2</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
 <!--jackson-->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>com.fasterxml.jackson.core</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jackson-databind</artifactId>
 | 
					 | 
				
			||||||
      <version>${jackson.version}</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>com.fasterxml.jackson.core</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jackson-core</artifactId>
 | 
					 | 
				
			||||||
      <version>${jackson.version}</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
 | 
					 | 
				
			||||||
    <dependency>
 | 
					 | 
				
			||||||
      <groupId>com.fasterxml.jackson.core</groupId>
 | 
					 | 
				
			||||||
      <artifactId>jackson-annotations</artifactId>
 | 
					 | 
				
			||||||
      <version>${jackson.version}</version>
 | 
					 | 
				
			||||||
    </dependency>
 | 
					 | 
				
			||||||
  </dependencies>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  <build>
 | 
					 | 
				
			||||||
    <defaultGoal>compile</defaultGoal>
 | 
					 | 
				
			||||||
    <plugins>
 | 
					 | 
				
			||||||
      <plugin>
 | 
					 | 
				
			||||||
        <artifactId>maven-surefire-plugin</artifactId>
 | 
					 | 
				
			||||||
        <version>3.5.2</version>
 | 
					 | 
				
			||||||
        <configuration>
 | 
					 | 
				
			||||||
          <skip>true</skip>
 | 
					 | 
				
			||||||
        </configuration>
 | 
					 | 
				
			||||||
      </plugin>
 | 
					 | 
				
			||||||
      <plugin>
 | 
					 | 
				
			||||||
        <artifactId>maven-compiler-plugin</artifactId>
 | 
					 | 
				
			||||||
        <version>3.14.0</version>
 | 
					 | 
				
			||||||
        <configuration>
 | 
					 | 
				
			||||||
          <source>1.8</source>
 | 
					 | 
				
			||||||
          <target>1.8</target>
 | 
					 | 
				
			||||||
          <encoding>UTF-8</encoding>
 | 
					 | 
				
			||||||
          <compilerArguments>
 | 
					 | 
				
			||||||
            <extdirs>${project.basedir}/lib</extdirs>
 | 
					 | 
				
			||||||
          </compilerArguments>
 | 
					 | 
				
			||||||
        </configuration>
 | 
					 | 
				
			||||||
      </plugin>
 | 
					 | 
				
			||||||
      <plugin>
 | 
					 | 
				
			||||||
        <groupId>org.apache.maven.plugins</groupId>
 | 
					 | 
				
			||||||
        <artifactId>maven-assembly-plugin</artifactId>
 | 
					 | 
				
			||||||
        <version>3.7.1</version>
 | 
					 | 
				
			||||||
        <configuration>
 | 
					 | 
				
			||||||
          <descriptorRefs>
 | 
					 | 
				
			||||||
            <descriptorRef>jar-with-dependencies</descriptorRef>
 | 
					 | 
				
			||||||
          </descriptorRefs>
 | 
					 | 
				
			||||||
          <archive>
 | 
					 | 
				
			||||||
            <manifest>
 | 
					 | 
				
			||||||
              <mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
 | 
					 | 
				
			||||||
            </manifest>
 | 
					 | 
				
			||||||
          </archive>
 | 
					 | 
				
			||||||
        </configuration>
 | 
					 | 
				
			||||||
        <executions>
 | 
					 | 
				
			||||||
          <execution>
 | 
					 | 
				
			||||||
            <id>make-assembly</id>
 | 
					 | 
				
			||||||
            <phase>package</phase>
 | 
					 | 
				
			||||||
            <goals>
 | 
					 | 
				
			||||||
              <goal>single</goal>
 | 
					 | 
				
			||||||
            </goals>
 | 
					 | 
				
			||||||
          </execution>
 | 
					 | 
				
			||||||
        </executions>
 | 
					 | 
				
			||||||
      </plugin>
 | 
					 | 
				
			||||||
      <plugin>
 | 
					 | 
				
			||||||
        <groupId>org.springframework.boot</groupId>
 | 
					 | 
				
			||||||
        <artifactId>spring-boot-maven-plugin</artifactId>
 | 
					 | 
				
			||||||
        <version>2.6.0</version>
 | 
					 | 
				
			||||||
        <configuration>
 | 
					 | 
				
			||||||
          <mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
 | 
					 | 
				
			||||||
          <includeSystemScope>true</includeSystemScope>
 | 
					 | 
				
			||||||
        </configuration>
 | 
					 | 
				
			||||||
        <executions>
 | 
					 | 
				
			||||||
          <execution>
 | 
					 | 
				
			||||||
            <id>repackage</id>
 | 
					 | 
				
			||||||
            <goals>
 | 
					 | 
				
			||||||
              <goal>repackage</goal>
 | 
					 | 
				
			||||||
            </goals>
 | 
					 | 
				
			||||||
          </execution>
 | 
					 | 
				
			||||||
        </executions>
 | 
					 | 
				
			||||||
      </plugin>
 | 
					 | 
				
			||||||
    </plugins>
 | 
					 | 
				
			||||||
  </build>
 | 
					 | 
				
			||||||
</project>
 | 
					 | 
				
			||||||
@@ -1,13 +0,0 @@
 | 
				
			|||||||
<h1 style="font-size:4rem;text-align:center;color:red;" align="center" title >EAST 数据处理工具</h1>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# 概述
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
这是产险厦门分公司用于处理EAST数据的工具。
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## 功能描述
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-   拆分过大的txt文件;
 | 
					 | 
				
			||||||
-   文件转换成excel表格用于核对;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -1,33 +0,0 @@
 | 
				
			|||||||
/**
 | 
					 | 
				
			||||||
 * @Author: Kane Wang <wangkane@qq.com>
 | 
					 | 
				
			||||||
 * @Date: 2025-08-08 17:21:32
 | 
					 | 
				
			||||||
 * @LastEditors: Kane Wang
 | 
					 | 
				
			||||||
 * @LastModified: 2025-08-08 19:05:06
 | 
					 | 
				
			||||||
 * @FilePath: src/main/java/com/cpic/xim/App.java
 | 
					 | 
				
			||||||
 * @Description:
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 *               Copyright (c) 2025 by Kane All rights reserved
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package com.cpic.xim;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.File;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Hello world!
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class App
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    private static final int    MAX_LINE_COUNT_PER_FILE = 250000;
 | 
					 | 
				
			||||||
    private static final String TITLE_BDJBXXB           = "流水号$保险机构代码$保险机构名称$采集日期$保单编号$虚拟单标志$保单件数$险类$保单团个性质$监管辖区$司法管辖$业务性质$续保标志$被续保保单编号$保单状态$保单终止原因$核保类型$联共保类型$涉农标志$分保标志$统保标志$投保单申请日期$签单日期$核保通过时间$保费收费确认时间$保单生成时间$保单起始日期$保单终止日期$保单中止日期$保单效力恢复日期$保单满期日期$约定分期交费次数$累计保费$交费方式$被保险人数量$保险金额$保险金额币种$保险金额人民币金额$保险费率$基准保费$签单保费$税额$政府补贴保费金额$保费币种$保费人民币金额$管理机构代码$管理机构名称$核保机构代码$核保机构名称$承保地区$争议解决方式$佣金比例$佣金$佣金币种$佣金人民币金额$特别约定标志$特别约定$经办业务标志$经办管理费$医保个人账户购买标志";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public static void main( String[] args )
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        String fileNameBDJBXXB = "L:\\east\\MD5_BDJCXX_BDJBXXB_RESULT_3080100.txt";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        com.cpic.xim.east.utils.DataFileSpliter.splitFile( new File( fileNameBDJBXXB ),
 | 
					 | 
				
			||||||
                                                           MAX_LINE_COUNT_PER_FILE,
 | 
					 | 
				
			||||||
                                                           TITLE_BDJBXXB );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        System.out.println( "拆完了!" );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,85 +0,0 @@
 | 
				
			|||||||
/**
 | 
					 | 
				
			||||||
 * @Author: Kane Wang <wangkane@qq.com>
 | 
					 | 
				
			||||||
 * @Date: 2025-08-08 17:23:44
 | 
					 | 
				
			||||||
 * @LastEditors: Kane Wang
 | 
					 | 
				
			||||||
 * @LastModified: 2025-08-08 17:25:07
 | 
					 | 
				
			||||||
 * @FilePath: src/main/java/com/cpic/xim/east/utils/DataFileSpliter.java
 | 
					 | 
				
			||||||
 * @Description: 
 | 
					 | 
				
			||||||
 * 
 | 
					 | 
				
			||||||
 *               Copyright (c) 2025 by Kane All rights reserved
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
package com.cpic.xim.east.utils;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.BufferedReader;
 | 
					 | 
				
			||||||
import java.io.BufferedWriter;
 | 
					 | 
				
			||||||
import java.io.File;
 | 
					 | 
				
			||||||
import java.io.FileReader;
 | 
					 | 
				
			||||||
import java.io.FileWriter;
 | 
					 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * @author Kane
 | 
					 | 
				
			||||||
 * @description 用于拆分大文件。
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
public class DataFileSpliter
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public static void splitFile( File inputFile, int lineCountPerFile , String titleString )
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        try (
 | 
					 | 
				
			||||||
                BufferedReader reader = new BufferedReader( new FileReader( inputFile ) )
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            String line;
 | 
					 | 
				
			||||||
            int    lineCount = 0;
 | 
					 | 
				
			||||||
            int    fileCount = 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            BufferedWriter writer = createWriterForFile( inputFile, fileCount );
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            while ( (line = reader.readLine()) != null )
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                if ( lineCount >= lineCountPerFile )
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    writer.close();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    fileCount++;
 | 
					 | 
				
			||||||
                    lineCount = 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    writer    = createWriterForFile( inputFile, fileCount );
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                // 如果是第一行,则写入标题
 | 
					 | 
				
			||||||
                if ( lineCount == 0 && !titleString.isEmpty() )
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    writer.write( titleString );
 | 
					 | 
				
			||||||
                    writer.newLine();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                writer.write( line );
 | 
					 | 
				
			||||||
                writer.newLine();
 | 
					 | 
				
			||||||
                lineCount++;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            writer.close();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        catch ( IOException e )
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            e.printStackTrace();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private static BufferedWriter createWriterForFile( File inputFile, int fileCount )
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        try
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            String     outputFileName = String.format( "%s_part%d.txt", inputFile.getName(), fileCount );
 | 
					 | 
				
			||||||
            FileWriter fileWriter     = new FileWriter( new File( inputFile.getParent(), outputFileName ) );
 | 
					 | 
				
			||||||
            
 | 
					 | 
				
			||||||
            return new BufferedWriter( fileWriter );
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        catch ( IOException e )
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            e.printStackTrace();
 | 
					 | 
				
			||||||
            return null;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										19
									
								
								code/east-datafile-utils/.editorconfig1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								code/east-datafile-utils/.editorconfig1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					# top-most EditorConfig file
 | 
				
			||||||
 | 
					root = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[*]
 | 
				
			||||||
 | 
					charset = utf-8
 | 
				
			||||||
 | 
					indent_style = space
 | 
				
			||||||
 | 
					indent_size = 2
 | 
				
			||||||
 | 
					end_of_line = lf
 | 
				
			||||||
 | 
					insert_final_newline = true
 | 
				
			||||||
 | 
					trim_trailing_whitespace = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[*.js]
 | 
				
			||||||
 | 
					indent_size = 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[*.py]
 | 
				
			||||||
 | 
					indent_size = 4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# [*.java]
 | 
				
			||||||
 | 
					# indent_size = 4
 | 
				
			||||||
@@ -0,0 +1,52 @@
 | 
				
			|||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * @Author: Kane Wang <wangkane@qq.com>
 | 
				
			||||||
 | 
					 * @Date: 2025-08-09 01:09:26
 | 
				
			||||||
 | 
					 * @LastEditors: Kane Wang
 | 
				
			||||||
 | 
					 * @LastModified: 2025-08-09 01:09:26
 | 
				
			||||||
 | 
					 * @FilePath: src/main/java/com/cpic/xim/east/utils/DataFileConverter.java
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *               Copyright (c) 2025 by Kane All rights reserved
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					package com.cpic.xim.east.utils;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.io.BufferedReader;
 | 
				
			||||||
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
 | 
					import java.io.FileReader;
 | 
				
			||||||
 | 
					import java.io.IOException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Sheet;
 | 
				
			||||||
 | 
					import org.apache.poi.ss.usermodel.Workbook;
 | 
				
			||||||
 | 
					import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class DataFileConverter
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public static void convertEASTDataFileToXLSX( String eastDataFilePath,
 | 
				
			||||||
 | 
					                                                  String xlsxFilePath,
 | 
				
			||||||
 | 
					                                                  String spliteString
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					      throws FileNotFoundException,
 | 
				
			||||||
 | 
					      IOException
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        Workbook       workbook = new XSSFWorkbook();
 | 
				
			||||||
 | 
					        Sheet          sheet    = workbook.createSheet( "sheet1" );
 | 
				
			||||||
 | 
					        BufferedReader reader   = null;
 | 
				
			||||||
 | 
					        String         line;
 | 
				
			||||||
 | 
					        int            rowIndex = 0;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        reader = new BufferedReader( new FileReader( eastDataFilePath ) );
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        while ( (line = reader.readLine()) != null )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            String[] rowData = line.split( spliteString );
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            for ( String cellData : rowData )
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        reader.close();
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -24,7 +24,9 @@ import java.io.IOException;
 | 
				
			|||||||
public class DataFileSpliter
 | 
					public class DataFileSpliter
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    public static void splitFile( File inputFile, int lineCountPerFile , String titleString )
 | 
					    public static void splitFile( File inputFile,
 | 
				
			||||||
 | 
					                                  int lineCountPerFile,
 | 
				
			||||||
 | 
					                                  String titleString )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        try (
 | 
					        try (
 | 
				
			||||||
                BufferedReader reader = new BufferedReader( new FileReader( inputFile ) )
 | 
					                BufferedReader reader = new BufferedReader( new FileReader( inputFile ) )
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										68
									
								
								文档/EAST表结构/dbload_dm3.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								文档/EAST表结构/dbload_dm3.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dir="/cpic/cpicapp/east"
 | 
				
			||||||
 | 
					dmdir="/cpic/cpicapp/dm3/bin"
 | 
				
			||||||
 | 
					cd $dir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ $# -ne 1 ];then
 | 
				
			||||||
 | 
					cat << EOF
 | 
				
			||||||
 | 
					Usage: $0 dirname 
 | 
				
			||||||
 | 
					       dirname 
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					exit 1
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					dirname=$1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					list=`ls ${dirname}/*.txt`
 | 
				
			||||||
 | 
					for line in $list
 | 
				
			||||||
 | 
					##cat table.list|while read line
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					   filename=${line#*/}
 | 
				
			||||||
 | 
					   tabname="EAST_"${filename%-*}
 | 
				
			||||||
 | 
					   echo $tabname
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ##将表名转换为小写
 | 
				
			||||||
 | 
					    c_tabname=`echo "${tabname}"|tr [A-Z] [a-z]`
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					    ##c_tabname=`echo "${tabname}"`
 | 
				
			||||||
 | 
					    echo $c_tabname
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   result=`${dmdir}/disql ****/'"********"'@*******:***** << ! 
 | 
				
			||||||
 | 
					        set heading off
 | 
				
			||||||
 | 
					        set feedback off
 | 
				
			||||||
 | 
					        set pagesize 0
 | 
				
			||||||
 | 
					        set verify off
 | 
				
			||||||
 | 
					        set echo off
 | 
				
			||||||
 | 
					        set lineshow off
 | 
				
			||||||
 | 
					        SET TIMING off
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         select '|'||trim(LISTAGG(column_name,',')within group(order by column_id))||'|' from (select column_name||'#'||case when data_type in('CHAR','VARCHAR2','NVARCHAR2','VARCHAR','TEXT') AND DATA_LENGTH > 255 THEN 'CHAR(8000)'  ELSE '' END column_name,column_id from user_tab_columns ta  where table_name = upper('${tabname}'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       exit
 | 
				
			||||||
 | 
					!`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    echo $result>clumns01.txt
 | 
				
			||||||
 | 
					    result2=`cut -d$'|' -f2 clumns01.txt`
 | 
				
			||||||
 | 
					    echo $result2>clumns01.txt
 | 
				
			||||||
 | 
					    sed s/[[:space:]]//g clumns01.txt>clumns.txt
 | 
				
			||||||
 | 
					    sed -i 's/#/ /g' clumns.txt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     ##拼装control文件
 | 
				
			||||||
 | 
					    echo "load data">tmp.ctl
 | 
				
			||||||
 | 
					    echo "infile '${dir}/import20250630/${filename}'">>tmp.ctl
 | 
				
			||||||
 | 
					    ##echo "infile '${dir}/import20250228/${c_tabname}.txt'">>tmp.ctl
 | 
				
			||||||
 | 
					    echo "badfile '${dir}/bad/${c_tabname}.bad'">>tmp.ctl
 | 
				
			||||||
 | 
					    echo "into table ${c_tabname}">>tmp.ctl
 | 
				
			||||||
 | 
					    echo "fields terminated by '	'" >> tmp.ctl
 | 
				
			||||||
 | 
					    ##echo "fields  '	'">>tmp.ctl
 | 
				
			||||||
 | 
					    echo "(">>tmp.ctl
 | 
				
			||||||
 | 
					    cat clumns.txt>>tmp.ctl
 | 
				
			||||||
 | 
					    echo ")">>tmp.ctl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   ${dmdir}/dmfldr userid=****/'"*********"'@********:*****  control=\'${dir}/tmp.ctl\' null_mode=true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										3306
									
								
								文档/EAST表结构/east_table_create_sql.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3306
									
								
								文档/EAST表结构/east_table_create_sql.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								文档/EAST表结构/规范附件3:保险业监管数据标准化规范(财产保险公司版)数据结构一览表.xlsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								文档/EAST表结构/规范附件3:保险业监管数据标准化规范(财产保险公司版)数据结构一览表.xlsx
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user