From bcfc66611f18cc524f910681b287ed465984a9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 28 Nov 2024 09:40:21 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=BC=80=E6=94=BE=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ktg/mes/md/controller/WmsOutTaskController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutTaskController.java index 47f7c74..d2933dc 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/WmsOutTaskController.java @@ -40,6 +40,10 @@ public class WmsOutTaskController extends BaseController { return getDataTable(list); } + @PutMapping("/open/run/{wmsOutTaskIds}") + public AjaxResult openRun(@PathVariable Long[] wmsOutTaskIds) { + return toAjax(wmsOutTaskService.runWmsOutTask(wmsOutTaskIds)); + } /** * 开放 查询出库任务列表 From 39908d6b79039184e713f8a49e19a89ffb453de5 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Thu, 28 Nov 2024 10:23:50 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20sqlserver=20=E9=80=82=E9=85=8D?= =?UTF-8?q?=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/pom.xml | 7 +- .../src/main/resources/application-druid.yml | 61 ++++--- .../com/ktg/framework/config/DruidConfig.java | 7 +- .../config/properties/DmDruidProperties.java | 77 +++++++++ .../config/properties/DruidProperties.java | 154 +++++++++--------- .../properties/SqlserverDruidProperties.java | 77 +++++++++ 6 files changed, 281 insertions(+), 102 deletions(-) create mode 100644 ktg-framework/src/main/java/com/ktg/framework/config/properties/DmDruidProperties.java create mode 100644 ktg-framework/src/main/java/com/ktg/framework/config/properties/SqlserverDruidProperties.java diff --git a/ktg-admin/pom.xml b/ktg-admin/pom.xml index 8d2da14..246b229 100644 --- a/ktg-admin/pom.xml +++ b/ktg-admin/pom.xml @@ -117,7 +117,12 @@ com.microsoft.sqlserver mssql-jdbc - 12.4.2.jre8 + 7.4.1.jre8 + + + net.sourceforge.jtds + jtds + 1.3.1 diff --git a/ktg-admin/src/main/resources/application-druid.yml b/ktg-admin/src/main/resources/application-druid.yml index b09205e..de103ae 100644 --- a/ktg-admin/src/main/resources/application-druid.yml +++ b/ktg-admin/src/main/resources/application-druid.yml @@ -11,33 +11,52 @@ spring: url: jdbc:dm://192.168.8.60:5236/WMS_DJ?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: SYSDBA password: SYSDBA + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false # 从库数据源 sqlserver: # 从数据源开关/默认关闭 enabled: true - driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver - url: jdbc:sqlserver://192.168.8.68:1433;DatabaseName=DPG_RH_YQ_20240711;encrypt=false;trustServerCertificate=true; + driverClassName: net.sourceforge.jtds.jdbc.Driver + url: jdbc:jtds:sqlserver://192.168.8.68:1433/DPG_RH_YQ_20240711 username: sa password: rh123456 - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 + testWhileIdle: true + testOnBorrow: false + testOnReturn: false webStatFilter: enabled: true statViewServlet: diff --git a/ktg-framework/src/main/java/com/ktg/framework/config/DruidConfig.java b/ktg-framework/src/main/java/com/ktg/framework/config/DruidConfig.java index fc5705c..5205a59 100644 --- a/ktg-framework/src/main/java/com/ktg/framework/config/DruidConfig.java +++ b/ktg-framework/src/main/java/com/ktg/framework/config/DruidConfig.java @@ -10,6 +10,8 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.sql.DataSource; +import com.ktg.framework.config.properties.DmDruidProperties; +import com.ktg.framework.config.properties.SqlserverDruidProperties; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -23,7 +25,6 @@ import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatPropertie import com.alibaba.druid.util.Utils; import com.ktg.common.enums.DataSourceType; import com.ktg.common.utils.spring.SpringUtils; -import com.ktg.framework.config.properties.DruidProperties; import com.ktg.framework.datasource.DynamicDataSource; /** @@ -36,7 +37,7 @@ public class DruidConfig { @Bean @ConfigurationProperties("spring.datasource.druid.dm") - public DataSource dmDataSource(DruidProperties druidProperties) + public DataSource dmDataSource(DmDruidProperties druidProperties) { DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); return druidProperties.dataSource(dataSource); @@ -45,7 +46,7 @@ public class DruidConfig @Bean @ConfigurationProperties("spring.datasource.druid.sqlserver") @ConditionalOnProperty(prefix = "spring.datasource.druid.sqlserver", name = "enabled", havingValue = "true") - public DataSource sqlServerDataSource(DruidProperties druidProperties) + public DataSource sqlServerDataSource(SqlserverDruidProperties druidProperties) { DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); return druidProperties.dataSource(dataSource); diff --git a/ktg-framework/src/main/java/com/ktg/framework/config/properties/DmDruidProperties.java b/ktg-framework/src/main/java/com/ktg/framework/config/properties/DmDruidProperties.java new file mode 100644 index 0000000..d7ce166 --- /dev/null +++ b/ktg-framework/src/main/java/com/ktg/framework/config/properties/DmDruidProperties.java @@ -0,0 +1,77 @@ +package com.ktg.framework.config.properties; + +import com.alibaba.druid.pool.DruidDataSource; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +/** + * druid 配置属性 + * + * @author ruoyi + */ +@Configuration +public class DmDruidProperties +{ + @Value("${spring.datasource.druid.dm.initialSize}") + private int initialSize; + + @Value("${spring.datasource.druid.dm.minIdle}") + private int minIdle; + + @Value("${spring.datasource.druid.dm.maxActive}") + private int maxActive; + + @Value("${spring.datasource.druid.dm.maxWait}") + private int maxWait; + + @Value("${spring.datasource.druid.dm.timeBetweenEvictionRunsMillis}") + private int timeBetweenEvictionRunsMillis; + + @Value("${spring.datasource.druid.dm.minEvictableIdleTimeMillis}") + private int minEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.dm.maxEvictableIdleTimeMillis}") + private int maxEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.dm.validationQuery}") + private String validationQuery; + + @Value("${spring.datasource.druid.dm.testWhileIdle}") + private boolean testWhileIdle; + + @Value("${spring.datasource.druid.dm.testOnBorrow}") + private boolean testOnBorrow; + + @Value("${spring.datasource.druid.dm.testOnReturn}") + private boolean testOnReturn; + + public DruidDataSource dataSource(DruidDataSource datasource) + { + /** 配置初始化大小、最小、最大 */ + datasource.setInitialSize(initialSize); + datasource.setMaxActive(maxActive); + datasource.setMinIdle(minIdle); + + /** 配置获取连接等待超时的时间 */ + datasource.setMaxWait(maxWait); + + /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ + datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); + + /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ + datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); + datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); + + /** + * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 + */ + datasource.setValidationQuery(validationQuery); + /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ + datasource.setTestWhileIdle(testWhileIdle); + /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnBorrow(testOnBorrow); + /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnReturn(testOnReturn); + return datasource; + } +} diff --git a/ktg-framework/src/main/java/com/ktg/framework/config/properties/DruidProperties.java b/ktg-framework/src/main/java/com/ktg/framework/config/properties/DruidProperties.java index 298a7e7..aa2ffb6 100644 --- a/ktg-framework/src/main/java/com/ktg/framework/config/properties/DruidProperties.java +++ b/ktg-framework/src/main/java/com/ktg/framework/config/properties/DruidProperties.java @@ -1,77 +1,77 @@ -package com.ktg.framework.config.properties; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; -import com.alibaba.druid.pool.DruidDataSource; - -/** - * druid 配置属性 - * - * @author ruoyi - */ -@Configuration -public class DruidProperties -{ - @Value("${spring.datasource.druid.initialSize}") - private int initialSize; - - @Value("${spring.datasource.druid.minIdle}") - private int minIdle; - - @Value("${spring.datasource.druid.maxActive}") - private int maxActive; - - @Value("${spring.datasource.druid.maxWait}") - private int maxWait; - - @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") - private int timeBetweenEvictionRunsMillis; - - @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") - private int minEvictableIdleTimeMillis; - - @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") - private int maxEvictableIdleTimeMillis; - - @Value("${spring.datasource.druid.validationQuery}") - private String validationQuery; - - @Value("${spring.datasource.druid.testWhileIdle}") - private boolean testWhileIdle; - - @Value("${spring.datasource.druid.testOnBorrow}") - private boolean testOnBorrow; - - @Value("${spring.datasource.druid.testOnReturn}") - private boolean testOnReturn; - - public DruidDataSource dataSource(DruidDataSource datasource) - { - /** 配置初始化大小、最小、最大 */ - datasource.setInitialSize(initialSize); - datasource.setMaxActive(maxActive); - datasource.setMinIdle(minIdle); - - /** 配置获取连接等待超时的时间 */ - datasource.setMaxWait(maxWait); - - /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ - datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); - - /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ - datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); - datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); - - /** - * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 - */ - datasource.setValidationQuery(validationQuery); - /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ - datasource.setTestWhileIdle(testWhileIdle); - /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ - datasource.setTestOnBorrow(testOnBorrow); - /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ - datasource.setTestOnReturn(testOnReturn); - return datasource; - } -} +//package com.ktg.framework.config.properties; +// +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Configuration; +//import com.alibaba.druid.pool.DruidDataSource; +// +///** +// * druid 配置属性 +// * +// * @author ruoyi +// */ +//@Configuration +//public class DruidProperties +//{ +// @Value("${spring.datasource.druid.initialSize}") +// private int initialSize; +// +// @Value("${spring.datasource.druid.minIdle}") +// private int minIdle; +// +// @Value("${spring.datasource.druid.maxActive}") +// private int maxActive; +// +// @Value("${spring.datasource.druid.maxWait}") +// private int maxWait; +// +// @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") +// private int timeBetweenEvictionRunsMillis; +// +// @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") +// private int minEvictableIdleTimeMillis; +// +// @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") +// private int maxEvictableIdleTimeMillis; +// +// @Value("${spring.datasource.druid.validationQuery}") +// private String validationQuery; +// +// @Value("${spring.datasource.druid.testWhileIdle}") +// private boolean testWhileIdle; +// +// @Value("${spring.datasource.druid.testOnBorrow}") +// private boolean testOnBorrow; +// +// @Value("${spring.datasource.druid.testOnReturn}") +// private boolean testOnReturn; +// +// public DruidDataSource dataSource(DruidDataSource datasource) +// { +// /** 配置初始化大小、最小、最大 */ +// datasource.setInitialSize(initialSize); +// datasource.setMaxActive(maxActive); +// datasource.setMinIdle(minIdle); +// +// /** 配置获取连接等待超时的时间 */ +// datasource.setMaxWait(maxWait); +// +// /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ +// datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); +// +// /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ +// datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); +// datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); +// +// /** +// * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 +// */ +// datasource.setValidationQuery(validationQuery); +// /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ +// datasource.setTestWhileIdle(testWhileIdle); +// /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ +// datasource.setTestOnBorrow(testOnBorrow); +// /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ +// datasource.setTestOnReturn(testOnReturn); +// return datasource; +// } +//} diff --git a/ktg-framework/src/main/java/com/ktg/framework/config/properties/SqlserverDruidProperties.java b/ktg-framework/src/main/java/com/ktg/framework/config/properties/SqlserverDruidProperties.java new file mode 100644 index 0000000..b848de3 --- /dev/null +++ b/ktg-framework/src/main/java/com/ktg/framework/config/properties/SqlserverDruidProperties.java @@ -0,0 +1,77 @@ +package com.ktg.framework.config.properties; + +import com.alibaba.druid.pool.DruidDataSource; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +/** + * druid 配置属性 + * + * @author ruoyi + */ +@Configuration +public class SqlserverDruidProperties +{ + @Value("${spring.datasource.druid.sqlserver.initialSize}") + private int initialSize; + + @Value("${spring.datasource.druid.sqlserver.minIdle}") + private int minIdle; + + @Value("${spring.datasource.druid.sqlserver.maxActive}") + private int maxActive; + + @Value("${spring.datasource.druid.sqlserver.maxWait}") + private int maxWait; + + @Value("${spring.datasource.druid.sqlserver.timeBetweenEvictionRunsMillis}") + private int timeBetweenEvictionRunsMillis; + + @Value("${spring.datasource.druid.sqlserver.minEvictableIdleTimeMillis}") + private int minEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.sqlserver.maxEvictableIdleTimeMillis}") + private int maxEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.sqlserver.validationQuery}") + private String validationQuery; + + @Value("${spring.datasource.druid.sqlserver.testWhileIdle}") + private boolean testWhileIdle; + + @Value("${spring.datasource.druid.sqlserver.testOnBorrow}") + private boolean testOnBorrow; + + @Value("${spring.datasource.druid.sqlserver.testOnReturn}") + private boolean testOnReturn; + + public DruidDataSource dataSource(DruidDataSource datasource) + { + /** 配置初始化大小、最小、最大 */ + datasource.setInitialSize(initialSize); + datasource.setMaxActive(maxActive); + datasource.setMinIdle(minIdle); + + /** 配置获取连接等待超时的时间 */ + datasource.setMaxWait(maxWait); + + /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ + datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); + + /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ + datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); + datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); + + /** + * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 + */ + datasource.setValidationQuery(validationQuery); + /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ + datasource.setTestWhileIdle(testWhileIdle); + /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnBorrow(testOnBorrow); + /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnReturn(testOnReturn); + return datasource; + } +} From d1d2c72fbe31cbd41002082f36b3a01a693af02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 28 Nov 2024 10:36:21 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=8A=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java | 2 ++ ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java index cf6964c..dc8d078 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java @@ -6,4 +6,6 @@ import java.util.List; public interface AP0AEMapper { List selectAll(); + + int update(AP0AE ap0ae); } diff --git a/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml b/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml index 97f0a5d..e6c1be2 100644 --- a/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml @@ -107,4 +107,13 @@ + + + update AP0AE + set UDF07 = #{UDF07} + where AE001 = #{AE001} + AND AE002 = #{AE002} + AND AE003 = #{AE003} + AND AE012 = #{AE012} + \ No newline at end of file From fede5e6540ca2d88d544e687a739a8fdf6933c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 28 Nov 2024 10:40:23 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java | 4 ++-- .../java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java | 2 +- ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java index dc8d078..8420a33 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java @@ -5,7 +5,7 @@ import com.ktg.mes.md.domain.AP0AE; import java.util.List; public interface AP0AEMapper { - List selectAll(); + List selectOutNewData(); - int update(AP0AE ap0ae); + int updateOutDataToOld(AP0AE ap0ae); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java index 519a4d3..a58bf37 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java @@ -18,6 +18,6 @@ public class AP0AEServiceImpl implements IAP0AEService { @DataSource(DataSourceType.SQLSERVER) @Override public List selectAllAP0AE() { - return this.aP0AEMapper.selectAll(); + return this.aP0AEMapper.selectOutNewData(); } } diff --git a/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml b/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml index e6c1be2..482defd 100644 --- a/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml +++ b/ktg-mes/src/main/resources/mapper/md/AP0AEMapper.xml @@ -104,13 +104,14 @@ from AP0AE - + where UDF07 != 'ED' - + update AP0AE - set UDF07 = #{UDF07} + set UDF07 = 'ED' where AE001 = #{AE001} AND AE002 = #{AE002} AND AE003 = #{AE003} From f06d14b301cbdd6cd6d153e4516dc941193a4605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 28 Nov 2024 10:53:17 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=B1=82=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-mes/src/main/java/com/ktg/mes/md/service/IAP0AEService.java | 2 +- .../main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/IAP0AEService.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/IAP0AEService.java index 7e3e2a2..b0c1446 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/IAP0AEService.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/IAP0AEService.java @@ -5,5 +5,5 @@ import com.ktg.mes.md.domain.AP0AE; import java.util.List; public interface IAP0AEService { - public List selectAllAP0AE(); + public List selectOutNewData(); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java index a58bf37..d4bc8eb 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java @@ -17,7 +17,7 @@ public class AP0AEServiceImpl implements IAP0AEService { @DataSource(DataSourceType.SQLSERVER) @Override - public List selectAllAP0AE() { + public List selectOutNewData() { return this.aP0AEMapper.selectOutNewData(); } } From 2739b0c6951a3aa2978501e389f056a6e15fa162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=90=8D=E5=96=9C?= Date: Thu, 28 Nov 2024 10:59:40 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=B0=86=E5=88=87=E6=8D=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BB=A3=E7=A0=81=E7=A7=BB=E5=8A=A8=E5=88=B0MAPPER?= =?UTF-8?q?=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java | 4 ++++ .../java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java index 8420a33..c0ae759 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/AP0AEMapper.java @@ -1,11 +1,15 @@ package com.ktg.mes.md.mapper; +import com.ktg.common.annotation.DataSource; +import com.ktg.common.enums.DataSourceType; import com.ktg.mes.md.domain.AP0AE; import java.util.List; public interface AP0AEMapper { + @DataSource(DataSourceType.SQLSERVER) List selectOutNewData(); + @DataSource(DataSourceType.SQLSERVER) int updateOutDataToOld(AP0AE ap0ae); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java index d4bc8eb..f875b27 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/service/impl/AP0AEServiceImpl.java @@ -15,7 +15,6 @@ public class AP0AEServiceImpl implements IAP0AEService { @Autowired private AP0AEMapper aP0AEMapper; - @DataSource(DataSourceType.SQLSERVER) @Override public List selectOutNewData() { return this.aP0AEMapper.selectOutNewData();