commit bf6691a065274c7a0b97c907de02c6b753672f60
Author: dulei <907367559@qq.com>
Date: Fri Jan 17 15:08:19 2025 +0800
绩效考核数据修正
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..b0c18a0
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/../../../../:\trkf-java\jxkh\.idea/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/artifacts/jxkh_jar.xml b/.idea/artifacts/jxkh_jar.xml
new file mode 100644
index 0000000..bd3453e
--- /dev/null
+++ b/.idea/artifacts/jxkh_jar.xml
@@ -0,0 +1,23 @@
+
+
+ $PROJECT_DIR$/out/artifacts/jxkh_jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 0000000..a55e7a1
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml
new file mode 100644
index 0000000..20ae51b
--- /dev/null
+++ b/.idea/libraries/lib.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..0548357
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..d311e0e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jxkh.iml b/jxkh.iml
new file mode 100644
index 0000000..fb8e866
--- /dev/null
+++ b/jxkh.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/artifacts/jxkh_jar/jxkh.jar b/out/artifacts/jxkh_jar/jxkh.jar
new file mode 100644
index 0000000..ffca0c8
Binary files /dev/null and b/out/artifacts/jxkh_jar/jxkh.jar differ
diff --git a/out/production/jxkh/META-INF/MANIFEST.MF b/out/production/jxkh/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..20cadb5
--- /dev/null
+++ b/out/production/jxkh/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: jx.jxkhMain
+
diff --git a/out/production/jxkh/jx/DBUtil.class b/out/production/jxkh/jx/DBUtil.class
new file mode 100644
index 0000000..d7b825e
Binary files /dev/null and b/out/production/jxkh/jx/DBUtil.class differ
diff --git a/out/production/jxkh/jx/LogCommon.class b/out/production/jxkh/jx/LogCommon.class
new file mode 100644
index 0000000..16b2f14
Binary files /dev/null and b/out/production/jxkh/jx/LogCommon.class differ
diff --git a/out/production/jxkh/jx/jxkhMain$1.class b/out/production/jxkh/jx/jxkhMain$1.class
new file mode 100644
index 0000000..812be3c
Binary files /dev/null and b/out/production/jxkh/jx/jxkhMain$1.class differ
diff --git a/out/production/jxkh/jx/jxkhMain.class b/out/production/jxkh/jx/jxkhMain.class
new file mode 100644
index 0000000..e213c59
Binary files /dev/null and b/out/production/jxkh/jx/jxkhMain.class differ
diff --git a/out/production/jxkh/lib/HikariCP-3.3.1.jar b/out/production/jxkh/lib/HikariCP-3.3.1.jar
new file mode 100644
index 0000000..476e0c0
Binary files /dev/null and b/out/production/jxkh/lib/HikariCP-3.3.1.jar differ
diff --git a/out/production/jxkh/lib/dom4j-2.0.3.jar b/out/production/jxkh/lib/dom4j-2.0.3.jar
new file mode 100644
index 0000000..1ef5c52
Binary files /dev/null and b/out/production/jxkh/lib/dom4j-2.0.3.jar differ
diff --git a/out/production/jxkh/lib/fastjson-1.2.78.jar b/out/production/jxkh/lib/fastjson-1.2.78.jar
new file mode 100644
index 0000000..bb42302
Binary files /dev/null and b/out/production/jxkh/lib/fastjson-1.2.78.jar differ
diff --git a/out/production/jxkh/lib/httpclient-4.5.13.jar b/out/production/jxkh/lib/httpclient-4.5.13.jar
new file mode 100644
index 0000000..218ee25
Binary files /dev/null and b/out/production/jxkh/lib/httpclient-4.5.13.jar differ
diff --git a/out/production/jxkh/lib/httpcore-4.4.14.jar b/out/production/jxkh/lib/httpcore-4.4.14.jar
new file mode 100644
index 0000000..349db18
Binary files /dev/null and b/out/production/jxkh/lib/httpcore-4.4.14.jar differ
diff --git a/out/production/jxkh/lib/httpmime-4.5.13.jar b/out/production/jxkh/lib/httpmime-4.5.13.jar
new file mode 100644
index 0000000..cc52f44
Binary files /dev/null and b/out/production/jxkh/lib/httpmime-4.5.13.jar differ
diff --git a/out/production/jxkh/lib/mssql-jdbc-7.4.1.jre8.jar b/out/production/jxkh/lib/mssql-jdbc-7.4.1.jre8.jar
new file mode 100644
index 0000000..9cad1f0
Binary files /dev/null and b/out/production/jxkh/lib/mssql-jdbc-7.4.1.jre8.jar differ
diff --git a/out/production/jxkh/lib/ojdbc6-11.2.0.4.jar b/out/production/jxkh/lib/ojdbc6-11.2.0.4.jar
new file mode 100644
index 0000000..767eba7
Binary files /dev/null and b/out/production/jxkh/lib/ojdbc6-11.2.0.4.jar differ
diff --git a/out/production/jxkh/lib/slf4j-api-1.7.25.jar b/out/production/jxkh/lib/slf4j-api-1.7.25.jar
new file mode 100644
index 0000000..0143c09
Binary files /dev/null and b/out/production/jxkh/lib/slf4j-api-1.7.25.jar differ
diff --git a/out/production/jxkh/lib/slf4j-simple-1.7.25.jar b/out/production/jxkh/lib/slf4j-simple-1.7.25.jar
new file mode 100644
index 0000000..a7260f3
Binary files /dev/null and b/out/production/jxkh/lib/slf4j-simple-1.7.25.jar differ
diff --git a/out/production/jxkh/lib/spring-beans-5.2.16.RELEASE.jar b/out/production/jxkh/lib/spring-beans-5.2.16.RELEASE.jar
new file mode 100644
index 0000000..40dc420
Binary files /dev/null and b/out/production/jxkh/lib/spring-beans-5.2.16.RELEASE.jar differ
diff --git a/out/production/jxkh/lib/spring-core-5.2.16.RELEASE.jar b/out/production/jxkh/lib/spring-core-5.2.16.RELEASE.jar
new file mode 100644
index 0000000..74f1ceb
Binary files /dev/null and b/out/production/jxkh/lib/spring-core-5.2.16.RELEASE.jar differ
diff --git a/out/production/jxkh/lib/spring-jcl-5.2.16.RELEASE.jar b/out/production/jxkh/lib/spring-jcl-5.2.16.RELEASE.jar
new file mode 100644
index 0000000..1c85dab
Binary files /dev/null and b/out/production/jxkh/lib/spring-jcl-5.2.16.RELEASE.jar differ
diff --git a/out/production/jxkh/lib/spring-jdbc-5.2.16.RELEASE.jar b/out/production/jxkh/lib/spring-jdbc-5.2.16.RELEASE.jar
new file mode 100644
index 0000000..acaa0af
Binary files /dev/null and b/out/production/jxkh/lib/spring-jdbc-5.2.16.RELEASE.jar differ
diff --git a/out/production/jxkh/lib/spring-tx-5.2.16.RELEASE.jar b/out/production/jxkh/lib/spring-tx-5.2.16.RELEASE.jar
new file mode 100644
index 0000000..3c879ce
Binary files /dev/null and b/out/production/jxkh/lib/spring-tx-5.2.16.RELEASE.jar differ
diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..20cadb5
--- /dev/null
+++ b/src/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: jx.jxkhMain
+
diff --git a/src/jx/DBUtil.java b/src/jx/DBUtil.java
new file mode 100644
index 0000000..bdc6dc5
--- /dev/null
+++ b/src/jx/DBUtil.java
@@ -0,0 +1,55 @@
+package jx;
+
+import com.zaxxer.hikari.HikariConfig;
+import com.zaxxer.hikari.HikariDataSource;
+
+import javax.sql.DataSource;
+
+public class DBUtil {
+ public DataSource Hikar_DataSource_NMGGS() throws Exception{
+ HikariConfig config=new HikariConfig();
+ try {
+ config.setDriverClassName("oracle.jdbc.driver.OracleDriver");
+ config.setJdbcUrl("jdbc:oracle:thin:@//10.15.0.11:1521/orcl");
+ config.setUsername("nmggs");
+ config.setPoolName("nmggs");
+ config.setPassword("sysadmin");
+ config.addDataSourceProperty("v$session.osuser","DL");
+ config.addDataSourceProperty("v$session.machine","10.15.0.36");
+ config.addDataSourceProperty("v$session.program","DIV_SEC");
+ config.setMaximumPoolSize(6);
+ config.setMinimumIdle(2);
+ config.setConnectionTestQuery("select 1 from dual");
+ config.setAutoCommit(true);
+ }
+ catch (Exception e){
+ System.out.println("连接池错误:"+e.toString());
+ }
+ DataSource ds=new HikariDataSource(config);
+ return ds;
+ }
+
+ public DataSource Hikar_DataSource_NMGMPAY() throws Exception{
+ HikariConfig config=new HikariConfig();
+ try {
+ config.setDriverClassName("oracle.jdbc.driver.OracleDriver");
+ config.setJdbcUrl("jdbc:oracle:thin:@//10.15.100.5:1521/torcl");
+ config.setUsername("nmgmpayadmin");
+ config.setPoolName("100.5mpay");
+ config.setPassword("nmgh90[]");
+ config.addDataSourceProperty("v$session.osuser","DL");
+ config.addDataSourceProperty("v$session.machine","10.15.99.66");
+ config.addDataSourceProperty("v$session.program","gantry_pass_all");
+
+ config.setMaximumPoolSize(4);
+ config.setMinimumIdle(2);
+ config.setConnectionTestQuery("select 1 from dual");
+ config.setAutoCommit(true);
+ }
+ catch (Exception e){
+ System.out.println("连接池错误:"+e.toString());
+ }
+ DataSource ds=new HikariDataSource(config);
+ return ds;
+ }
+}
diff --git a/src/jx/LogCommon.java b/src/jx/LogCommon.java
new file mode 100644
index 0000000..534d0ab
--- /dev/null
+++ b/src/jx/LogCommon.java
@@ -0,0 +1,102 @@
+package jx;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.channels.FileLock;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.Date;
+
+public class LogCommon {
+ public static void WriteLogNormal(String logStr, String suffix)
+ {
+ // String s = String.format(" 消息:%s", logStr);
+
+ WriteLog(logStr, suffix );
+ }
+
+
+ public String getPath()
+ {
+ String path = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
+ if(System.getProperty("os.name").contains("dows"))
+ {
+ path = path.substring(1,path.length());
+ }
+ if(path.contains("jar"))
+ {
+ path = path.substring(0,path.lastIndexOf("."));
+ return path.substring(0,path.lastIndexOf("/"));
+ }
+ return path.replace("target/classes/", "");
+ }
+ private static void WriteLog(String content,String suffix) {
+
+
+ try {
+ StringBuffer sb = new StringBuffer();
+ String str = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss SSS")) + "---";
+
+ sb.append(str);
+ sb.append(content);
+ sb.append("\r\n");
+ String logPath= new LogCommon().getPath()+"/LogFile/";
+
+ File logPathFile = new File(logPath);
+ if (!logPathFile.isDirectory()) {
+ Boolean f= logPathFile.mkdir();
+ System.out.println(f);
+ }
+
+ String fileDic = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"));
+ File filedir = new File(logPath + fileDic);
+ if (!filedir.isDirectory()) {
+ filedir.mkdir();
+ File[] fs = logPathFile.listFiles();
+ LocalDateTime now = LocalDateTime.now();
+ int delFlag = Integer.parseInt(now.minus(10, ChronoUnit.DAYS).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
+ for (File f : fs) {
+ int deldir = Integer.parseInt(f.getName());
+ if (deldir < delFlag) {
+ if (f.isDirectory()) {
+ deleteDirectory(f);
+ }
+ }
+ }
+ }
+ String newFileName = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
+ String fullFilePath = logPath + fileDic + "/" + newFileName +"_"+ suffix+".txt";
+
+ try (RandomAccessFile reader = new RandomAccessFile(new File(fullFilePath), "rw");
+ FileLock lock = reader.getChannel().lock()) {
+
+ reader.seek(reader.length());
+ reader.write(sb.toString().getBytes("UTF-8"));
+
+ } catch (IOException e) {
+ System.out.println(e.getMessage());
+ }
+
+ } catch (Exception exception) {
+ System.out.println(exception.getMessage());
+ }
+ }
+
+ private static void deleteDirectory(File file) {
+ if (file.isFile()) {// 表示该文件不是文件夹
+ file.delete();
+ } else {
+ // 首先得到当前的路径
+ String[] childFilePaths = file.list();
+ for (String childFilePath : childFilePaths) {
+ File childFile = new File(file.getAbsolutePath() + "/" + childFilePath);
+ deleteDirectory(childFile);
+ }
+ file.delete();
+ }
+ }
+}
diff --git a/src/jx/jxkhMain.java b/src/jx/jxkhMain.java
new file mode 100644
index 0000000..5d03fc4
--- /dev/null
+++ b/src/jx/jxkhMain.java
@@ -0,0 +1,381 @@
+package jx;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.util.StringUtils;
+
+import javax.lang.model.util.ElementFilter;
+import javax.sound.midi.Soundbank;
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class jxkhMain {
+
+
+ public static void main(String[] args) throws Exception {
+ JdbcTemplate jdbcTemplate = new JdbcTemplate(new DBUtil().Hikar_DataSource_NMGGS());
+ startTimer(jdbcTemplate);
+ //SetJxkh(jdbcTemplate);
+
+// List dates=findEveryDay("2023-02-28","2023-03-05");
+// String sql="merge into div_passid_all_classdate t1 using(select to_date(:classdate,'yyyy-mm-dd') as classdate,'div_passid_all' as type from dual) t2" +
+// " on (t1.classdate=t2.classdate and t1.type=t2.type) when not matched then insert(classdate,type) values (t2.classdate,t2.type)";
+//
+// ArrayList