From ad16e7c6dac7d23b3bb903f1d3750978f1d7066d Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期四, 19 十月 2023 17:39:44 +0800
Subject: [PATCH] 提交贵州毕节大方配置信息
---
igds-core/src/main/java/com/ld/igds/models/InteGrain5332.java | 98 ++++++++++++++++++++++++
igds-protocol-fzzy3/src/main/java/com/ld/igds/protocol/fzzy/analysis/AnalysisGrain.java | 4
igds-web/src/main/resources/application-pro5332.yml | 80 ++++++++++++++++++++
igds-basic/src/main/java/com/ld/igds/timer/zcl/service/impl/InteGrain5332ServiceImpl.java | 55 +++++++++++++
igds-basic/src/main/java/com/ld/igds/timer/zcl/InteGrainScheduled.java | 2
5 files changed, 236 insertions(+), 3 deletions(-)
diff --git a/igds-basic/src/main/java/com/ld/igds/timer/zcl/InteGrainScheduled.java b/igds-basic/src/main/java/com/ld/igds/timer/zcl/InteGrainScheduled.java
index 1755853..e13c119 100644
--- a/igds-basic/src/main/java/com/ld/igds/timer/zcl/InteGrainScheduled.java
+++ b/igds-basic/src/main/java/com/ld/igds/timer/zcl/InteGrainScheduled.java
@@ -25,7 +25,7 @@
@Component
public class InteGrainScheduled {
- public static String COMPANY_IDS = "4003,5307,5311,5315";
+ public static String COMPANY_IDS = "4003,5307,5311,5315,5332";
@Autowired
private CoreGrainService grainService;
diff --git a/igds-basic/src/main/java/com/ld/igds/timer/zcl/service/impl/InteGrain5332ServiceImpl.java b/igds-basic/src/main/java/com/ld/igds/timer/zcl/service/impl/InteGrain5332ServiceImpl.java
new file mode 100644
index 0000000..e39f8b2
--- /dev/null
+++ b/igds-basic/src/main/java/com/ld/igds/timer/zcl/service/impl/InteGrain5332ServiceImpl.java
@@ -0,0 +1,55 @@
+package com.ld.igds.timer.zcl.service.impl;
+
+import com.bstek.bdf2.core.orm.hibernate.HibernateDao;
+import com.ld.igds.models.InteGrain5332;
+import com.ld.igds.timer.zcl.dto.InteGrainDto;
+import com.ld.igds.timer.zcl.service.InteGrainService;
+import org.hibernate.Session;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Desc: 5332 鎺ュ彛
+ * @author: czt
+ * @update-time: 2023/10/19
+ */
+@Component
+public class InteGrain5332ServiceImpl extends HibernateDao implements InteGrainService {
+
+ @Override
+ public String getCompanyId() {
+ return "5332";
+ }
+
+ @Override
+ public void toSaveGrain(InteGrainDto dto) {
+ Session session = this.getSessionFactory().openSession();
+ try {
+
+ InteGrain5332 data = new InteGrain5332();
+
+ data.setUuid(dto.getUuid());
+ data.setBatchId(dto.getBatchId());
+ data.setCompanyId(dto.getCompanyId());
+ data.setDepotId(dto.getDepotId());
+ data.setDepotName(dto.getDepotName());
+ data.setHumidityIn(dto.getHumidityIn());
+ data.setHumidityOut(dto.getHumidityOut());
+ data.setTempIn(dto.getTempIn());
+ data.setTempOut(dto.getTempOut());
+ data.setReceiveDate(dto.getReceiveDate());
+ data.setTempList(dto.getTempList());
+
+ data.setCheckUser(dto.getCheckUser());
+ data.setCable(dto.getCable());
+ data.setCableCir(dto.getCableCir());
+ data.setRemark(dto.getRemark());
+ data.setWeather(dto.getWeather());
+
+
+ session.saveOrUpdate(data);
+ } finally {
+ session.flush();
+ session.close();
+ }
+ }
+}
diff --git a/igds-core/src/main/java/com/ld/igds/models/InteGrain5332.java b/igds-core/src/main/java/com/ld/igds/models/InteGrain5332.java
new file mode 100644
index 0000000..a4895c1
--- /dev/null
+++ b/igds-core/src/main/java/com/ld/igds/models/InteGrain5332.java
@@ -0,0 +1,98 @@
+
+package com.ld.igds.models;
+
+import com.bstek.dorado.annotation.PropertyDef;
+import lombok.Data;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @Desc: 姣曡妭澶ф柟瀵瑰鎺ュ彛
+ * @author: czt
+ * @update-time: 2023/10/19
+ */
+@Data
+@Entity
+@Table(name = "INTE_GRAIN_5332")
+public class InteGrain5332 implements Serializable {
+
+
+ private static final long serialVersionUID = 1L;
+ @Id
+ @Column(name = "UUID_", length = 40)
+ @PropertyDef(label = "UUID")
+ private String uuid;
+
+ @Column(name = "BATCH_ID_", length = 40)
+ @PropertyDef(label = "鎵规")
+ private String batchId;
+
+ @Column(name = "COMPANY_ID_", length = 10)
+ @PropertyDef(label = "缁勭粐缂栫爜", description = "")
+ private String companyId;
+
+ @Column(name = "DEPOT_ID_", length = 50)
+ @PropertyDef(label = "鎵�灞炰粨搴�", description = "浠撳簱缂栧彿")
+ private String depotId;
+
+ @Column(name = "DEPOT_NAME_", length = 40)
+ @PropertyDef(label = "鎵�灞炰粨搴撳悕绉�", description = "浠撳簱缂栧彿鍚嶇О")
+ private String depotName;
+
+ @Column(name = "RECEIVE_DATE_")
+ @PropertyDef(label = "鎺ユ敹鏃堕棿", description = "")
+ private Date receiveDate;
+
+ @Column(name = "HUMIDITY_IN_")
+ @PropertyDef(label = "浠撳唴婀垮害", description = "")
+ private Double humidityIn;
+
+ @Column(name = "TEMP_IN_")
+ @PropertyDef(label = "浠撳唴娓╁害", description = "")
+ private Double tempIn;
+
+ @Column(name = "HUMIDITY_OUT_")
+ @PropertyDef(label = "浠撳婀垮害", description = "")
+ private Double humidityOut;
+
+ @Column(name = "TEMP_OUT_")
+ @PropertyDef(label = "浠撳娓╁害", description = "")
+ private Double tempOut;
+
+ @Column(name = "TEMP_LIST_", length = 5000)
+ @PropertyDef(label = "娓╁害鍒楄〃 鐢�,闅斿紑姣忎釜鐐�", description = "")
+ private String tempList;
+
+ @Column(name = "CABLE_", length = 20)
+ @PropertyDef(label = "甯冪嚎瑙勫垯")
+ private String cable;
+
+ @Column(name = "CABLE_CIR_", length = 20)
+ @PropertyDef(label = "甯冪嚎瑙勫垯")
+ private String cableCir;
+
+ @Column(name = "CHECK_USER_", length = 30)
+ @PropertyDef(label = "妫�娴嬩汉")
+ private String checkUser;
+
+ @Column(name = "REMARK_", length = 100)
+ @PropertyDef(label = "妫�娴嬭鏄�")
+ private String remark;
+
+ @Column(name = "WEATHER_", length = 10)
+ @PropertyDef(label = "澶╂皵")
+ private String weather;
+
+
+ public InteGrain5332() {
+ }
+
+
+}
+
diff --git a/igds-protocol-fzzy3/src/main/java/com/ld/igds/protocol/fzzy/analysis/AnalysisGrain.java b/igds-protocol-fzzy3/src/main/java/com/ld/igds/protocol/fzzy/analysis/AnalysisGrain.java
index 0929b3c..7e08a4d 100644
--- a/igds-protocol-fzzy3/src/main/java/com/ld/igds/protocol/fzzy/analysis/AnalysisGrain.java
+++ b/igds-protocol-fzzy3/src/main/java/com/ld/igds/protocol/fzzy/analysis/AnalysisGrain.java
@@ -106,10 +106,10 @@
grain.setDepotId(response.getHouseId());
grain.setCompanyId(depotConf.getCompanyId());
//鎯犳柊鏆傛椂浣跨敤-鏆傛椂澶勭悊娓╂箍搴︽娴嬩负璐熷��
- if(response.getHIn() < 0){
+ if(null != response.getHIn() && response.getHIn() < 0){
response.setHIn(NumberUtil.keepPrecision(Math.random() * 10 + 64, 1));
}
- if(response.getTIn() < 0){
+ if(null != response.getTIn() && response.getTIn() < 0){
response.setTIn(response.getTAvg());
}
grain.setHumidityIn(response.getHIn());
diff --git a/igds-web/src/main/resources/application-pro5332.yml b/igds-web/src/main/resources/application-pro5332.yml
new file mode 100644
index 0000000..da6c9f9
--- /dev/null
+++ b/igds-web/src/main/resources/application-pro5332.yml
@@ -0,0 +1,80 @@
+########################## 璐靛窞姣曡妭澶ф柟绮簱椤圭洰 ##########################
+server:
+ port: 8888
+ context-path: /
+ connection-timeout: 5000
+ tomcat:
+ uri-encoding: UTF-8
+
+########################## datasourcec ##########################
+spring:
+ datasource:
+ db-base:
+ name: db-base
+ type: com.alibaba.druid.pool.DruidDataSource
+ url: jdbc:mysql://127.0.0.1:3306/igds_master?useUnicode=true&characterEncoding=utf-8
+ driver-class-name: com.mysql.jdbc.Driver
+ username: root
+ password: ukJp12Qf+elyBvGHkJ5MQMa95pfVm0oFBHefdEgDFKoFSjbgYa9PYfv5vlem5nvoXjQsP9tIIo53DvSbsl160Q==
+ public-key:
+ config-decrypt: true
+ initial-size: 5
+ min-idle: 5
+ max-active: 50
+ max-wait: 60000
+ time-between-eviction-runs-millis: 60000
+ min-evictable-idle-time-millis: 300000
+ validation-query: select 1 from dual
+ test-whileIdle: true
+ test-on-borrow: false
+ test-on-return: false
+ pool-prepared-statements: true
+ max-pool-prepared-statement-per-connection-size: 20
+ filters: stat
+ connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+ use-global-data-source-stat: true
+ removeAbandoned: true
+ removeAbandonedTimeout: 90
+ logAbandoned: true
+ poolPreparedStatements: true
+ maxPoolPreparedStatementPerConnectionSize: 20
+ db-sqlite:
+ name: db-sqlite
+ url: jdbc:sqlite:D:/app/igds/db/iot_cfg.db
+ driver-class-name: org.sqlite.JDBC
+ type: com.alibaba.druid.pool.DruidDataSource
+ username:
+ password:
+
+ # Redis鐩稿叧閰嶇疆
+ redis:
+ database: 0
+ host: 127.0.0.1
+ port: 6379
+ password: Abc123..
+ # 杩炴帴姹犳渶澶ц繛鎺ユ暟锛堜娇鐢ㄨ礋鍊艰〃绀烘病鏈夐檺鍒讹級
+ pool:
+ max-active: 200
+ max-wait: -1
+ max-idle: 10
+ min-idle: 0
+ timeout: 6000
+
+license:
+ subject: ld_license
+ publicAlias: publicCert
+ storePass: PUBLICFZZYXXJSGFYXGS888888
+ licensePath: D:/IGDS/license/license.lic
+ publicKeysStorePath: D:/IGDS/license/publicCerts.keystore
+
+########################## IGDS ##########################
+## 绯荤粺鎺ュ彛璺敱閰嶇疆 娉ㄦ剰鏁板瓧濡傛灉浠�0寮�澶寸殑璇濓紝鍚庡彴浼氬嚭鐜拌浆涔夛紝璇锋坊鍔�""
+igds:
+ default:
+ companyId: 5332
+ sys-name: 鏅烘収绮簱绠$悊绯荤粺
+ logo: logo-default.png
+ logo-title: logo-title-default.png
+ support: 椋庢鑷磋繙淇℃伅鎶�鏈偂浠芥湁闄愬叕鍙�
+ grian-add-point: N
+ file-path: D:/IGDS/FILE/
\ No newline at end of file
--
Gitblit v1.9.3