pom.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fzzy/gateway/entity/GateWayTestParam.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fzzy/gateway/hx2023/data/GateWayTestParam.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
pom.xml
@@ -13,7 +13,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <spring.boot.version>2.1.2.RELEASE</spring.boot.version> <spring.version>5.1.1.RELEASE</spring.version> <dorado.version>7.6.0-SNAPSHOT</dorado.version> <dorado.version>7.5.16</dorado.version> <druid.version>1.2.8</druid.version> <mysql.version>5.1.45</mysql.version> <fastjson.version>2.0.10</fastjson.version> @@ -232,20 +232,24 @@ <systemPath>${project.basedir}/src/main/resources/lib/examples.jar</systemPath> </dependency> <!-- <dependency>--> <!-- <groupId>net.java.dev.jna</groupId>--> <!-- <artifactId>jna</artifactId>--> <!-- <version>4.2.1</version>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>com.sun.jna</groupId>--> <!-- <artifactId>jna</artifactId>--> <!-- <version>3.0.9</version>--> <!-- <scope>system</scope>--> <!-- <systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath>--> <!-- </dependency>--> <dependency> <groupId>com.sun.jna</groupId> <artifactId>jna</artifactId> <version>3.0.9</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/jna.jar</systemPath> </dependency> <!-- <dependency>--> <!-- <groupId>com.sun.jna</groupId>--> <!-- <artifactId>jna</artifactId>--> <!-- <version>3.0.9</version>--> <!-- </dependency>--> @@ -340,7 +344,6 @@ <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -352,6 +355,17 @@ <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <!-- <plugin>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-maven-plugin</artifactId>--> src/main/java/com/fzzy/gateway/entity/GateWayTestParam.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,22 @@ package com.fzzy.gateway.entity; import com.bstek.dorado.annotation.PropertyDef; import lombok.Data; import java.io.Serializable; import java.util.Date; @Data public class GateWayTestParam implements Serializable { private static final long serialVersionUID = 1L; @PropertyDef(label = "å¼å§æ¶é´") private Date start; @PropertyDef(label = "æªæ¢æ¶é´") private Date end; @PropertyDef(label = "æ§è¡æ¶é´") private Date dayTime; @PropertyDef(label = "éé") private Double weight; @PropertyDef(label = "车çå·") private String carNumber; } src/main/java/com/fzzy/gateway/hx2023/data/GateWayTestParam.java
ÎļþÒÑɾ³ý src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @@ -22,7 +23,7 @@ */ @Slf4j @Data @Component @Service public class HxGatewaySyncGrainImpl implements GatewaySyncGranService { src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java
@@ -13,7 +13,7 @@ import com.fzzy.gateway.GatewayUtils; import com.fzzy.gateway.api.DeviceReportService; import com.fzzy.gateway.api.GatewayRemoteManager; import com.fzzy.gateway.data.BaseResp; import com.fzzy.gateway.entity.GateWayTestParam; import com.fzzy.gateway.entity.GatewayDevice; import com.fzzy.gateway.hx2023.ScConstant; import com.fzzy.gateway.hx2023.data.*; @@ -24,10 +24,8 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang.time.DateFormatUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Component; @@ -61,7 +59,20 @@ Sort sort = new Sort(Sort.Direction.ASC, "deviceId"); return gatewayDeviceRep.findAll(sort); } /** * gatewayDeviceService#getQuery * @return */ @DataProvider public GateWayTestParam getQuery() { GateWayTestParam param = new GateWayTestParam(); param.setDayTime(new Date()); param.setCarNumber("å·A12345"); param.setEnd(new Date()); param.setStart(new Date()); param.setWeight(25000.00); return param; } /** * gatewayDeviceService#updateSave * @@ -124,9 +135,9 @@ * @return */ @Expose public String ajaxTestWeight() { //double weigh = (double) parameter.getWeight(); double weigh = Math.random() * (35000 - 16000 + 1) + 16000; public String ajaxTestWeight(Map<String ,Object> parameter) { double weigh = (double) parameter.get("weight"); //sdouble weigh = Math.random() * (35000 - 16000 + 1) + 16000; List<GatewayDevice> devices = listAll(); if (devices == null || devices.size() <= 0) { return "没æè®¾å¤"; @@ -176,9 +187,9 @@ * @return */ @Expose public String ajaxTestLpr() { //String carNumber = parameter.getCarNumber(); String carNumber = "å·A12345"; public String ajaxTestLpr(Map<String ,Object> parameter) { String carNumber = (String) parameter.get("carNumber"); //String carNumber = "å·A12345"; List<GatewayDevice> devices = listAll(); if (devices == null || devices.size() <= 0) { return "没æè®¾å¤"; @@ -227,7 +238,7 @@ * @return */ @Expose public String ajaxTestGrain(GateWayTestParam parameter) { public String ajaxTestGrain(Map<String ,Object> parameter) { //è·å设å¤é ç½®ï¼åªé对粮æ 设å¤è¿è¡æ§è¡ @@ -237,7 +248,7 @@ return "ERRORï¼ä¸ºè·åå°ç³»ç»ä¸è®¾å¤é ç½®ï¼åæ¶æ§è¡"; } Date dayTime = (Date) parameter.getDayTime(); Date dayTime = (Date) parameter.get("dayTime"); if (null == dayTime) dayTime = new Date(); Date start = DateUtil.getCurZero(dayTime); src/main/java/com/fzzy/gateway/view/GatewayConf.view.xml
@@ -82,8 +82,8 @@ <Property name="label">ç²®åºç³»ç»ä¸åºåºç¼ç </Property> </PropertyDef> </DataType> <DataType name="dtParam" parent="Map"> <Property name="creationType">com.fzzy.gateway.hx2023.data.GateWayTestParam</Property> <DataType name="dtParam"> <Property name="creationType">com.fzzy.gateway.entity.GateWayTestParam</Property> <PropertyDef name="start"> <Property name="dataType">DateTime</Property> </PropertyDef> @@ -111,8 +111,8 @@ <Property name="dataProvider">gatewayConfService#listAll</Property> </DataSet> <DataSet id="dsQuery"> <ClientEvent name="onReady">self.insert({});</ClientEvent> <Property name="dataType">dtParam</Property> <Property name="dataProvider">gatewayDeviceService#getQuery</Property> </DataSet> <ToolBar> <ToolBarLabel> @@ -170,12 +170,12 @@ <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">toolbar-button-push</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">view.get("#dialogLpr").show();</ClientEvent> <Property name="caption">车çè¯å«æ¨éæµè¯</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">toolbar-button-push</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">view.get("#dialogLpr").show();</ClientEvent> <Property name="caption">车çè¯å«æ¨éæµè¯</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">toolbar-button-push</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">ç½å ³åå§å</Property> <Property name="iconClass">fa fa-search</Property> @@ -404,7 +404,7 @@ <Buttons> <Button> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 view.get("#ajaxTestWeight").set("parameter",data.get("weight")).execute(function(result){
 view.get("#ajaxTestWeight").set("parameter",data.toJSON()).execute(function(result){
 self.get("parent").hide();
 $alert(result);
 });</ClientEvent> @@ -439,11 +439,13 @@ <Buttons> <Button> <ClientEvent name="onClick">var data = view.get("#dsQuery.data");
 view.get("#ajaxTestLpr").set("parameter",data).execute(function(result){
 console.log(data.toJSON());
 view.get("#ajaxTestLpr").set("parameter",data.toJSON()).execute(function(result){
 self.get("parent").hide();
 $alert(result);
 });</ClientEvent> <Property name="caption">ç¡®å®æ§è¡</Property> <Property name="action">updateAction1</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dialogLpr").hide();</ClientEvent> @@ -464,8 +466,8 @@ <Tools/> </Dialog> <AjaxAction id="ajaxTestLpr"> <Property name="service">gatewayDeviceService#ajaxTestLpr</Property> <Property name="executingMessage">å¨åªåæ§è¡ä¸â¦â¦</Property> <Property name="service">gatewayDeviceService#ajaxTestLpr</Property> </AjaxAction> </View> </ViewConfig>