From f77272ff29eb0a484e926318884b6df7c55d18c9 Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 12 Mar 2025 18:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=86=E5=A4=87=E7=BC=96=E5=86=99=E6=B8=85?= =?UTF-8?q?=E7=90=86=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/cpicxim-XMNHSA-repeater/pom.xml | 42 +++++++------- .../xim/huixiabao/nhs/CpicximToXMNHS.java | 56 ++++++++++++++++++- 2 files changed, 75 insertions(+), 23 deletions(-) diff --git a/code/cpicxim-XMNHSA-repeater/pom.xml b/code/cpicxim-XMNHSA-repeater/pom.xml index 7a2b939..c95dacc 100644 --- a/code/cpicxim-XMNHSA-repeater/pom.xml +++ b/code/cpicxim-XMNHSA-repeater/pom.xml @@ -136,20 +136,18 @@ - - + compile maven-surefire-plugin - 3.3.0 + 3.5.2 true maven-compiler-plugin - 3.13.0 + 3.14.0 ${project.basedir}/lib @@ -159,7 +157,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.7.1 jar-with-dependencies @@ -181,22 +179,22 @@ - org.springframework.boot - spring-boot-maven-plugin - 3.4.3 - - com.cpic.xim.huixiabao.AppMain - true - - - - repackage - - repackage - - - - + org.springframework.boot + spring-boot-maven-plugin + 3.4.3 + + com.cpic.xim.huixiabao.AppMain + true + + + + repackage + + repackage + + + + \ No newline at end of file diff --git a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java index 9d9ddf4..4ed7cbf 100644 --- a/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java +++ b/code/cpicxim-XMNHSA-repeater/src/main/java/com/cpic/xim/huixiabao/nhs/CpicximToXMNHS.java @@ -112,7 +112,61 @@ public class CpicximToXMNHS public static void removePostedHmbXyxInfo( Vector postedItems ) { - + Vector items = new Vector(); + HmbXyxInfo item = null; + + Connection connection = null; + Statement statement = null; + ResultSet result = null; + + try + { + Class.forName( "com.mysql.cj.jdbc.Driver" ); + + String url = CpicximToXMNHS.url; + String userName = CpicximToXMNHS.userName; + String password = CpicximToXMNHS.password; + String sql = """ + delete from HmbXyxInfo_Update where xyxNo = ?"""; + + connection = DriverManager.getConnection( url, userName, password ); + statement = connection.prepareStatement(sql.trim()); + + for ( HmbXyxInfo info : postedItems) + { + + } + } + catch ( SQLException error ) + { + try + { + connection.rollback(); + } + catch ( SQLException e ) + { + + } + + error.printStackTrace(); + } + catch ( ClassNotFoundException error ) + { + + } + finally + { + try + { + + statement.close(); + connection.close(); + } + catch ( SQLException error ) + { + + } + } } public static void postHmbList( Vector items )