igds-core/src/main/java/com/ld/igds/common/impl/CommonDataServiceImpl.java
@@ -84,7 +84,7 @@ //éæ°æåº Collator sortChina = Collator.getInstance(Locale.CHINA); Collections.sort(list, (a, b) -> sortChina.compare(a.getId(), b.getId())); Collections.sort(list, (a, b) -> sortChina.compare(a.getName(), b.getName())); return list; } igds-core/src/main/java/com/ld/igds/constant/Constant.java
@@ -196,6 +196,13 @@ public static final String GRAIN_START_POINT_TOP = "top"; //é¡¶é¨ public static final String GRAIN_START_POINT_BELOW = "below"; //åºé¨ /** * è¡å±è½¬æ¢(é»è®¤ä¸è½¬æ¢) */ public static final String GRAIN_CONVERT_DEFAULT = "default"; //é»è®¤ public static final String GRAIN_CONVERT_CLOCKWISE = "clockwise"; //顺æ¶é public static final String GRAIN_CONVERT_ANTICLOCKWISE = "anticlockwise"; //éæ¶é //çä»é¥å½¢-æ éªè¯ public static final String CABLE_CONE_0 = "0"; igds-core/src/main/java/com/ld/igds/grain/GrainUtil.java
@@ -293,4 +293,57 @@ return list; } /** * å±è¡è½¬æ¢--顺æ¶é * * @param temps * @param cable * @return */ public List<Double> convertRight(List<Double> temps, String cable) { String[] attCable = cable.split("-"); int cableZ = Integer.valueOf(attCable[0]); int cableY = Integer.valueOf(attCable[1]); int cableX = Integer.valueOf(attCable[2]); List<Double> list = new ArrayList<>(); int index; for (int x = 1; x <= cableX; x++) { for(int z = cableZ; z >= 1; z--){ for (int y = 1; y <= cableY; y++) { index = z*y*x -1; list.add(temps.get(index)); } } } return list; } /** * å±è¡è½¬æ¢--éæ¶é * * @param temps * @param cable * @return */ public List<Double> convertLeft(List<Double> temps, String cable) { String[] attCable = cable.split("-"); int cableZ = Integer.valueOf(attCable[0]); int cableY = Integer.valueOf(attCable[1]); int cableX = Integer.valueOf(attCable[2]); List<Double> list = new ArrayList<>(); int index; for (int x = 1; x <= cableX; x++) { for (int z = 1; z <= cableZ; z++) { for (int y = cableY; y >= cableY; y--) { index = z*y*x -1; list.add(temps.get(index)); } } } return list; } } igds-core/src/main/java/com/ld/igds/models/DepotConf.java
@@ -84,17 +84,21 @@ private int cableEnd; @Column(name = "START_ORIENTATION_", length = 20) @PropertyDef(label = "çµç¼å¼å§æ¹ä½", description = "é»è®¤å³è¾¹(å³è¾¹ãå³ä¸ã左边ãå·¦ä¸)") @PropertyDef(label = "çµç¼èµ·å§æ¹ä½", description = "é»è®¤å³è¾¹(å³è¾¹ãå³ä¸ã左边ãå·¦ä¸)") private String startOrientation = Constant.GRAIN_START_ORIENTATION_RIGHT; @Column(name = "START_DIRECTION_", length = 20) @PropertyDef(label = "çµç¼å¼å§æ¹å", description = "é»è®¤çºµå(纵åãæ¨ªå)") @PropertyDef(label = "çµç¼èµ·å§æ¹å", description = "é»è®¤çºµå(纵åãæ¨ªå)") private String startDirection = Constant.GRAIN_START_DIRECTION_PORTRAIT; @Column(name = "START_POINT_", length = 20) @PropertyDef(label = "çµç¼å¼å§ç¹ä½", description = "é»è®¤é¡¶é¨(é¡¶é¨ãåºé¨)") @PropertyDef(label = "çµç¼èµ·å§ç¹ä½", description = "é»è®¤é¡¶é¨(é¡¶é¨ãåºé¨)") private String startPoint = Constant.GRAIN_START_POINT_TOP; @Column(name = "START_CONVERT_", length = 20) @PropertyDef(label = "å±è¡è½¬æ¢", description = "é»è®¤ä¸è½¬æ¢(é»è®¤ã顺æ¶éãéæ¶é)") private String startConvert = Constant.GRAIN_CONVERT_DEFAULT; @Column(name = "TEMP_MAX_") @PropertyDef(label = "温度ä¸é") private Double tempMax; igds-core/src/main/java/com/ld/igds/models/MQuality.java
@@ -120,11 +120,11 @@ @PropertyDef(label = "æ ·åæ°é", required = true) @Column(name = "ypsl", precision = 20, scale = 6) private double ypsl; private Double ypsl; @PropertyDef(label = "代表æ°é") @Column(name = "dbsl", precision = 20, scale = 6) private double dbsl; private Double dbsl; @PropertyDef(label = "æ ·åç级") @Column(name = "ypdj", length = 2) igds-core/src/main/java/com/ld/igds/view/DepotConf.view.xml
@@ -212,24 +212,27 @@ <Property name="property">startOrientation</Property> <Property name="name">startOrientation</Property> <Property name="editable">false</Property> <Property name="trigger">autoMappingDropDown1</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startDirection</Property> <Property name="name">startDirection</Property> <Property name="editable">false</Property> <Property name="trigger">autoMappingDropDown1</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startPoint</Property> <Property name="name">startPoint</Property> <Property name="editable">false</Property> <Property name="trigger">autoMappingDropDown1</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startConvert</Property> <Property name="name">startConvert</Property> <Property name="editable">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">cableCone</Property> <Property name="name">cableCone</Property> <Property name="editable">false</Property> igds-core/src/main/java/com/ld/igds/view/DepotPR.java
@@ -187,6 +187,22 @@ } /** * å±è¡è½¬æ¢ * ${dorado.getDataProvider("depotPR#triggerStartConvert").getResult()} * * @return */ @DataProvider public List<DicTrigger> triggerStartConvert() { List<DicTrigger> list = new ArrayList<DicTrigger>(); list.add(new DicTrigger(Constant.GRAIN_CONVERT_DEFAULT, "é»è®¤")); list.add(new DicTrigger(Constant.GRAIN_CONVERT_CLOCKWISE, "顺æ¶é")); list.add(new DicTrigger(Constant.GRAIN_CONVERT_ANTICLOCKWISE, "éæ¶é")); return list; } /** * çä»é¥å½¢ * ${dorado.getDataProvider("depotPR#triggerCableCone").getResult()} * igds-core/src/main/java/models/igds.model.xml
@@ -922,6 +922,14 @@ <Property name="mapValues">${dorado.getDataProvider("depotPR#triggerStartPoint").getResult()}</Property> </Property> </PropertyDef> <PropertyDef name="startConvert"> <Property name="label">å±è¡è½¬æ¢</Property> <Property name="mapping"> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> <Property name="mapValues">${dorado.getDataProvider("depotPR#triggerStartConvert").getResult()}</Property> </Property> </PropertyDef> <PropertyDef name="depotName"> <Property></Property> </PropertyDef> igds-protocol-zldz/src/main/java/com/ld/igds/protocol/zldz/ServerRunner.java
@@ -37,9 +37,9 @@ //飿£è´è¿é»è®¤é¨ç½²æå¡å½ååºç¨ä½¿ç¨9000ç«¯å£ if (configData.getActive().indexOf("pro") >= 0) { //FZZYå¹³å° ZldzServerEngine.start(9201); // ZldzServerEngine.start(9201); //å ¶ä»å¹³å° // ZldzServerEngine.start(ZldzServerEngine.PORT); ZldzServerEngine.start(9000); return; } igds-protocol-zldz/src/main/java/com/ld/igds/protocol/zldz/analysis/AnalysisGrain.java
@@ -508,6 +508,17 @@ temps = grainUtil.reversalUpAndDown(temps, depotConf.getCableRule()); } //è¥é ç½®å±è¡è½¬æ¢ï¼åå°ç²®æ æ°æ®è¿è¡å±è¡è½¬æ¢ if (StringUtils.isNotEmpty(depotConf.getStartConvert())) { temps = convertGrainPoint(temps, depotConf); String[] cableRule = depotConf.getCableRule().split("-"); //转æ¢å±è¡åé ç½® if(Constant.GRAIN_CONVERT_CLOCKWISE.equals(depotConf.getStartConvert()) || Constant.GRAIN_CONVERT_ANTICLOCKWISE.equals(depotConf.getStartConvert())){ depotConf.setCableRule(Integer.valueOf(cableRule[1]) + "-" + Integer.valueOf(cableRule[0]) + "-" + Integer.valueOf(cableRule[2])); } } String[] attCable = depotConf.getCableRule().split("-"); int cableZ = Integer.valueOf(attCable[0]); int cableY = Integer.valueOf(attCable[1]); @@ -671,6 +682,24 @@ sysConf, notifyWeb, exeRequest); } private List<Double> convertGrainPoint(List<Double> temps, DepotConf conf) { if (Constant.GRAIN_CONVERT_DEFAULT.equals(conf.getStartConvert())) { //è¥å±è¡è½¬æ¢ä¸ºé»è®¤ï¼åç´æ¥è¿å return temps; } //顺æ¶éè½¬æ¢ if(Constant.GRAIN_CONVERT_CLOCKWISE.equals(conf.getStartConvert())){ return grainUtil.convertRight(temps, conf.getCableRule()); } //éæ¶éè½¬æ¢ if(Constant.GRAIN_CONVERT_ANTICLOCKWISE.equals(conf.getStartConvert())){ return grainUtil.convertLeft(temps, conf.getCableRule()); } return temps; } private List<Double> reversalGrainPoint(List<Double> temps, DepotConf conf) { if (StringUtils.isEmpty(conf.getStartOrientation())) { //è¥èµ·å§æ¹ä½ä¸ºç©ºï¼åé»è®¤èµ·å§æ¹ä½åæ¹åï¼ç´æ¥è¿å @@ -730,90 +759,5 @@ } return temps; } /** * å转å ç°å®ä¸ä»å·¦è¾¹å¼å§ï¼å¼ºè¡å°å³è¾¹è§£æä¸ºç¬¬ä¸å * * @return */ private List<Double> reversalCable(List<Double> temps, String cable) { String[] attCable = cable.split("-"); int cableZ = Integer.valueOf(attCable[0]); int cableY = Integer.valueOf(attCable[1]); int cableX = Integer.valueOf(attCable[2]); List<Double> t = new ArrayList<>(); for (int i = 1; i <= temps.size(); i++) { t.add(temps.get((cableX - 1) * cableY * cableZ + ((i - 1) % (cableY * cableZ)))); if (i % (cableY * cableZ) == 0) { cableX = cableX - 1; } } return t; } /** * çµç¼ä»ä¸é¢å¼å§æ¶ï¼å°ç²®æ çµç¼ä¸ä¸ç¿»è½¬ * * @param pointsData ç²®æ æ°æ® * @param cable å±è¡åé ç½®ï¼å¦ï¼4-7-11 * @return */ private String reversalUpAndDown(String pointsData, String cable) { String str = ""; if (StringUtils.isEmpty(cable)) { str = pointsData; } String[] attCable = cable.split("-"); int cableZ = Integer.valueOf(attCable[0]); //å± String[] points = pointsData.split(","); for (int i = 0; i <= points.length - cableZ; i += cableZ) { for (int j = cableZ - 1; j >= 0; j--) { str += points[i + j]; str += ","; } } return str; } /** * å转åå·éªè¯ * 2022å¹´5æ30æ¥ 12:11:18 * vince * * @param args */ public static void main(String[] args) { List<Double> temps = new ArrayList<>(); int cableZ = 3; int cableY = 4; int cableX = 6; for (int i = 1; i < (cableX * cableY * cableZ + 1); i++) { temps.add(i + 0.0); } List<Double> t = new ArrayList<>(); for (int i = 1; i <= temps.size(); i++) { t.add(temps.get((cableX - 1) * cableY * cableZ + ((i - 1) % (cableY * cableZ)))); if (i % (cableY * cableZ) == 0) { cableX = cableX - 1; } } for (Double x : t) { System.out.print(x); System.out.print(","); } System.out.println("--------------------------"); int i = 15; int layMax = 10; System.out.println(i % layMax); System.out.println(i / layMax); } } igds-web/pom.xml
@@ -202,10 +202,9 @@ <groupId>log4j</groupId> </exclusion> </exclusions> </dependency> --> </dependency>--> <!-- ç§æåè®®-è´åç²®æ --> <!-- ç§æåè®®-è´åç²®æ <dependency> <groupId>com.ld.igds</groupId> <artifactId>igds-protocol-beibo</artifactId> @@ -220,9 +219,9 @@ <groupId>log4j</groupId> </exclusion> </exclusions> </dependency> </dependency>--> <!-- ç§æåè®®-馿µ·æºè½--> <!-- ç§æåè®®-馿µ·æºè½ <dependency> <groupId>com.ld.igds</groupId> <artifactId>igds-protocol-bhzn</artifactId> @@ -237,7 +236,9 @@ <groupId>log4j</groupId> </exclusion> </exclusions> </dependency> </dependency>--> <!-- ç§æåè®®-æ£æ¥çµå --> <dependency> <groupId>com.ld.igds</groupId> <artifactId>igds-protocol-zldz</artifactId> @@ -253,6 +254,7 @@ </exclusion> </exclusions> </dependency> <!-- 海康车çè¯å«-SDK --> <dependency> <groupId>com.ld.igds</groupId> @@ -320,54 +322,54 @@ </plugin> <!-- YUI Compressor Mavenå缩æä»¶ å¼åå ä¸å®ç¨--> <!-- <plugin>--> <!-- <groupId>net.alchim31.maven</groupId>--> <!-- <artifactId>yuicompressor-maven-plugin</artifactId>--> <!-- <version>1.5.1</version>--> <!-- <executions>--> <!-- <execution>--> <!-- <goals>--> <!-- <goal>compress</goal>--> <!-- </goals>--> <!-- </execution>--> <!-- </executions>--> <!-- <configuration>--> <!-- <encoding>UTF-8</encoding>--> <!-- <!–䏿¾ç¤ºjså¯è½çé误 –>--> <!-- <jswarn>false</jswarn>--> <!-- <!–æ¯å¦æ··æ· –>--> <!-- <nomunge>true</nomunge>--> <!-- <!–è¥åå¨å·²å缩çæä»¶ï¼ä¼å å¯¹æ¯æºæä»¶æ¯å¦ææ¹å¨ ææ¹å¨ä¾¿åç¼©ï¼æ æ¹å¨å°±ä¸å缩 –>--> <!-- <force>false</force>--> <!-- <!–卿å®çåå·åæå ¥æ°è¡ –>--> <!-- <linebreakpos>-1</linebreakpos>--> <!-- <!–å缩ä¹åå æ§è¡èåæä»¶æä½ –>--> <!-- <preProcessAggregates>true</preProcessAggregates>--> <!-- <!–å缩åä¿åæä»¶åç¼ æ åç¼ –>--> <!-- <nosuffix>true</nosuffix>--> <!-- <!–æºç®å½ï¼å³éåç¼©çæ ¹ç®å½ –>--> <!-- <sourceDirectory>src/main/resources</sourceDirectory>--> <!-- <!–è¾åºç®å½ï¼å³å缩åçç®å½ –>--> <!-- <outputDirectory>target/classes</outputDirectory>--> <!-- <force>true</force>--> <!-- <!–å缩jsåcssæä»¶ –>--> <!-- <includes>--> <!-- <include>**/*.js</include>--> <!-- <include>**/*.css</include>--> <!-- </includes>--> <!-- <!– 以ä¸ç®å½åæä»¶ä¸ä¼è¢«å缩 –>--> <!-- <excludes>--> <!-- <exclude>**/*.min.js</exclude>--> <!-- <exclude>**/*.min.css</exclude>--> <!-- <exclude>**/d7/**</exclude>--> <!-- <exclude>**/dorado-home/**</exclude>--> <!-- <exclude>**/bdf2/**</exclude>--> <!-- <exclude>**/css/**</exclude>--> <!-- <exclude>**/js/**</exclude>--> <!-- <exclude>**/plugins/**</exclude>--> <!-- </excludes>--> <!-- </configuration>--> <!-- </plugin>--> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>yuicompressor-maven-plugin</artifactId> <version>1.5.1</version> <executions> <execution> <goals> <goal>compress</goal> </goals> </execution> </executions> <configuration> <encoding>UTF-8</encoding> <!--䏿¾ç¤ºjså¯è½çé误 --> <jswarn>false</jswarn> <!--æ¯å¦æ··æ· --> <nomunge>true</nomunge> <!--è¥åå¨å·²å缩çæä»¶ï¼ä¼å å¯¹æ¯æºæä»¶æ¯å¦ææ¹å¨ ææ¹å¨ä¾¿åç¼©ï¼æ æ¹å¨å°±ä¸å缩 --> <force>false</force> <!--卿å®çåå·åæå ¥æ°è¡ --> <linebreakpos>-1</linebreakpos> <!--å缩ä¹åå æ§è¡èåæä»¶æä½ --> <preProcessAggregates>true</preProcessAggregates> <!--å缩åä¿åæä»¶åç¼ æ åç¼ --> <nosuffix>true</nosuffix> <!--æºç®å½ï¼å³éåç¼©çæ ¹ç®å½ --> <sourceDirectory>src/main/resources</sourceDirectory> <!--è¾åºç®å½ï¼å³å缩åçç®å½ --> <outputDirectory>target/classes</outputDirectory> <force>true</force> <!--å缩jsåcssæä»¶ --> <includes> <include>**/*.js</include> <include>**/*.css</include> </includes> <!-- 以ä¸ç®å½åæä»¶ä¸ä¼è¢«å缩 --> <excludes> <exclude>**/*.min.js</exclude> <exclude>**/*.min.css</exclude> <exclude>**/d7/**</exclude> <exclude>**/dorado-home/**</exclude> <exclude>**/bdf2/**</exclude> <exclude>**/css/**</exclude> <exclude>**/js/**</exclude> <exclude>**/plugins/**</exclude> </excludes> </configuration> </plugin> </plugins> igds-web/src/main/resources/application-pro5303.yml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,81 @@ ########################## 䏿µ·åå® ########################## server: port: 8088 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 # url: jdbc:mysql://192.168.200.3:3306/igds_master?useUnicode=true&characterEncoding=utf-8 driver-class-name: com.mysql.jdbc.Driver username: igds 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: 5303 sys-name: æºæ §ç²®åºç®¡çç³»ç» logo: logo-default.png logo-title: logo-title-default.png support: æºæ §ç²®æ ç²®æ äºç®¡çå¹³å° grian-add-point: N file-path: D:/IGDS/FILE/ igds-web/src/main/resources/application.yml
@@ -1,7 +1,7 @@ ########################## Server ########################## 丹棱åå ³çç²®é£å¨å¤åº spring: profiles: active: dev active: pro application: name: igds main: igds-web/src/main/resources/static/img/aerial-5317_001.pngigds-web/src/main/resources/static/img/aerial-5317_001_1.png