Browse Source

[task-1530] 【后端】中大七院冰箱温控数据对接

Li Yuan 2 năm trước cách đây
mục cha
commit
487bf855bd

+ 8 - 0
exchange/application.properties

@@ -0,0 +1,8 @@
+spring.datasource.jdbc-url = jdbc:oracle:thin:@10.1.5.3:1521/his1db
+spring.datasource.username = SUPPLIER_JYXT
+spring.datasource.password = Jyxt#20240320
+spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
+spring.second-datasource.jdbc-url = jdbc:mysql://10.1.6.245:3306/klims-ibps3?characterEncoding=utf8&useSSL=false
+spring.second-datasource.username = root
+spring.second-datasource.password = Zdqy123456
+spring.second-datasource.driver-class-name = com.mysql.cj.jdbc.Driver

+ 5 - 0
exchange/pom.xml

@@ -30,6 +30,11 @@
             <artifactId>ojdbc8</artifactId>
             <scope>runtime</scope>
         </dependency>
+        <dependency>
+            <groupId>com.oracle.ojdbc</groupId>
+            <artifactId>orai18n</artifactId>
+            <version>19.3.0.0</version>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>

+ 1 - 1
exchange/src/main/java/com/jyxt/thridparty/exchange/bx/repository/VendorBinxiangRepository.java

@@ -17,7 +17,7 @@ public class VendorBinxiangRepository {
 
     public List<VendorBinxiang> query() {
         return jdbcTemplate.query(
-                "select * from v_get_ref_temperature ",new RowMapper<VendorBinxiang>(){
+                "select * from jyk1.v_get_ref_temperature  where TO_CHAR(采集时间,'YYYY-MM-DD')=TO_CHAR(SYSDATE,'YYYY-MM-DD')",new RowMapper<VendorBinxiang>(){
 
                     @Override
                     public VendorBinxiang mapRow(ResultSet rs, int rowNum) throws SQLException {