Commit 4804081d2cdfd8e11a5bd8e451a2c6f935f082e6

Authored by lichao
1 parent a10905d5

调整04-27

1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<project xmlns="http://maven.apache.org/POM/4.0.0"
3   - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4   - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5   - <modelVersion>4.0.0</modelVersion>
6   -
7   - <groupId>com.trash</groupId>
8   - <artifactId>trash</artifactId>
9   - <version>3.2.0</version>
10   -
11   - <name>trash</name>
12   - <url>http://www.trash.vip</url>
13   - <description>trash</description>
14   -
15   - <properties>
16   - <trash.version>3.2.0</trash.version>
17   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18   - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
19   - <java.version>1.8</java.version>
20   - <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
21   - <druid.version>1.2.1</druid.version>
22   - <bitwalker.version>1.19</bitwalker.version>
23   - <swagger.version>2.9.2</swagger.version>
24   - <kaptcha.version>2.3.2</kaptcha.version>
25   - <pagehelper.boot.version>1.3.0</pagehelper.boot.version>
26   - <fastjson.version>1.2.74</fastjson.version>
27   - <oshi.version>5.2.5</oshi.version>
28   - <jna.version>5.5.0</jna.version>
29   - <commons.io.version>2.5</commons.io.version>
30   - <commons.fileupload.version>1.3.3</commons.fileupload.version>
31   - <poi.version>3.17</poi.version>
32   - <velocity.version>1.7</velocity.version>
33   - <jwt.version>0.9.1</jwt.version>
34   - </properties>
35   -
36   - <!-- 依赖声明 -->
37   - <dependencyManagement>
38   - <dependencies>
39   -
40   - <!-- SpringBoot的依赖配置-->
41   - <dependency>
42   - <groupId>org.springframework.boot</groupId>
43   - <artifactId>spring-boot-dependencies</artifactId>
44   - <version>2.2.6.RELEASE</version>
45   - <type>pom</type>
46   - <scope>import</scope>
47   - </dependency>
48   -
49   - <!--阿里数据库连接池 -->
50   - <dependency>
51   - <groupId>com.alibaba</groupId>
52   - <artifactId>druid-spring-boot-starter</artifactId>
53   - <version>${druid.version}</version>
54   - </dependency>
55   -
56   - <!-- 解析客户端操作系统、浏览器等 -->
57   - <dependency>
58   - <groupId>eu.bitwalker</groupId>
59   - <artifactId>UserAgentUtils</artifactId>
60   - <version>${bitwalker.version}</version>
61   - </dependency>
62   -
63   - <!-- pagehelper 分页插件 -->
64   - <dependency>
65   - <groupId>com.github.pagehelper</groupId>
66   - <artifactId>pagehelper-spring-boot-starter</artifactId>
67   - <version>${pagehelper.boot.version}</version>
68   - </dependency>
69   -
70   - <!-- 获取系统信息 -->
71   - <dependency>
72   - <groupId>com.github.oshi</groupId>
73   - <artifactId>oshi-core</artifactId>
74   - <version>${oshi.version}</version>
75   - </dependency>
76   -
77   - <dependency>
78   - <groupId>net.java.dev.jna</groupId>
79   - <artifactId>jna</artifactId>
80   - <version>${jna.version}</version>
81   - </dependency>
82   -
83   - <dependency>
84   - <groupId>net.java.dev.jna</groupId>
85   - <artifactId>jna-platform</artifactId>
86   - <version>${jna.version}</version>
87   - </dependency>
88   -
89   - <!-- swagger2-->
90   - <dependency>
91   - <groupId>io.springfox</groupId>
92   - <artifactId>springfox-swagger2</artifactId>
93   - <version>${swagger.version}</version>
94   - <exclusions>
95   - <exclusion>
96   - <groupId>io.swagger</groupId>
97   - <artifactId>swagger-annotations</artifactId>
98   - </exclusion>
99   - <exclusion>
100   - <groupId>io.swagger</groupId>
101   - <artifactId>swagger-models</artifactId>
102   - </exclusion>
103   - </exclusions>
104   - </dependency>
105   -
106   - <!-- swagger2-UI-->
107   - <dependency>
108   - <groupId>io.springfox</groupId>
109   - <artifactId>springfox-swagger-ui</artifactId>
110   - <version>${swagger.version}</version>
111   - </dependency>
112   -
113   - <!--io常用工具类 -->
114   - <dependency>
115   - <groupId>commons-io</groupId>
116   - <artifactId>commons-io</artifactId>
117   - <version>${commons.io.version}</version>
118   - </dependency>
119   -
120   - <!--文件上传工具类 -->
121   - <dependency>
122   - <groupId>commons-fileupload</groupId>
123   - <artifactId>commons-fileupload</artifactId>
124   - <version>${commons.fileupload.version}</version>
125   - </dependency>
126   -
127   - <!-- excel工具 -->
128   - <dependency>
129   - <groupId>org.apache.poi</groupId>
130   - <artifactId>poi-ooxml</artifactId>
131   - <version>${poi.version}</version>
132   - </dependency>
133   -
134   - <!--velocity代码生成使用模板 -->
135   - <dependency>
136   - <groupId>org.apache.velocity</groupId>
137   - <artifactId>velocity</artifactId>
138   - <version>${velocity.version}</version>
139   - </dependency>
140   -
141   - <!-- 阿里JSON解析器 -->
142   - <dependency>
143   - <groupId>com.alibaba</groupId>
144   - <artifactId>fastjson</artifactId>
145   - <version>${fastjson.version}</version>
146   - </dependency>
147   -
148   - <!--Token生成与解析-->
149   - <dependency>
150   - <groupId>io.jsonwebtoken</groupId>
151   - <artifactId>jjwt</artifactId>
152   - <version>${jwt.version}</version>
153   - </dependency>
154   -
155   - <!--验证码 -->
156   - <dependency>
157   - <groupId>com.github.penggle</groupId>
158   - <artifactId>kaptcha</artifactId>
159   - <version>${kaptcha.version}</version>
160   - </dependency>
161   -
162   - <!-- 定时任务-->
163   - <dependency>
164   - <groupId>com.trash</groupId>
165   - <artifactId>trash-quartz</artifactId>
166   - <version>${trash.version}</version>
167   - </dependency>
168   -
169   - <!-- 代码生成-->
170   - <dependency>
171   - <groupId>com.trash</groupId>
172   - <artifactId>trash-generator</artifactId>
173   - <version>${trash.version}</version>
174   - </dependency>
175   -
176   - <!-- 核心模块-->
177   - <dependency>
178   - <groupId>com.trash</groupId>
179   - <artifactId>trash-framework</artifactId>
180   - <version>${trash.version}</version>
181   - </dependency>
182   -
183   - <!-- 系统模块-->
184   - <dependency>
185   - <groupId>com.trash</groupId>
186   - <artifactId>trash-system</artifactId>
187   - <version>${trash.version}</version>
188   - </dependency>
189   -
190   - <!-- 通用工具-->
191   - <dependency>
192   - <groupId>com.trash</groupId>
193   - <artifactId>trash-common</artifactId>
194   - <version>${trash.version}</version>
195   - </dependency>
196   - <!-- actviti-->
197   - <dependency>
198   - <groupId>com.trash</groupId>
199   - <artifactId>trash-activiti</artifactId>
200   - <version>${trash.version}</version>
201   - </dependency>
202   - <dependency>
203   - <groupId>com.trash</groupId>
204   - <artifactId>trash-workflow</artifactId>
205   - <version>${trash.version}</version>
206   - </dependency>
207   - <dependency>
208   - <groupId>com.trash</groupId>
209   - <artifactId>trash-daily</artifactId>
210   - <version>${trash.version}</version>
211   - </dependency>
212   - <dependency>
213   - <groupId>com.trash</groupId>
214   - <artifactId>trash-unit</artifactId>
215   - <version>${trash.version}</version>
216   - </dependency>
217   - <dependency>
218   - <groupId>com.trash</groupId>
219   - <artifactId>trash-garbage</artifactId>
220   - <version>${trash.version}</version>
221   - </dependency>
222   - </dependencies>
223   - </dependencyManagement>
224   -
225   - <modules>
226   - <module>trash-admin</module>
227   - <module>trash-framework</module>
228   - <module>trash-system</module>
229   - <module>trash-quartz</module>
230   - <module>trash-generator</module>
231   - <module>trash-common</module>
232   - <module>trash-activiti</module>
233   - <module>trash-workflow</module>
234   - <module>trash-daily</module>
235   - <module>trash-unit</module>
236   - <module>trash-garbage</module>
237   - </modules>
238   - <packaging>pom</packaging>
239   -
240   -
241   - <dependencies>
242   -
243   - </dependencies>
244   -
245   - <build>
246   - <plugins>
247   - <plugin>
248   - <groupId>org.apache.maven.plugins</groupId>
249   - <artifactId>maven-compiler-plugin</artifactId>
250   - <version>3.1</version>
251   - <configuration>
252   - <source>${java.version}</source>
253   - <target>${java.version}</target>
254   - <encoding>${project.build.sourceEncoding}</encoding>
255   - </configuration>
256   - </plugin>
257   - </plugins>
258   - </build>
259   -
260   - <repositories>
261   - <repository>
262   - <id>public</id>
263   - <name>aliyun nexus</name>
264   - <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
265   - <releases>
266   - <enabled>true</enabled>
267   - </releases>
268   - </repository>
269   - </repositories>
270   -
271   - <pluginRepositories>
272   - <pluginRepository>
273   - <id>public</id>
274   - <name>aliyun nexus</name>
275   - <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
276   - <releases>
277   - <enabled>true</enabled>
278   - </releases>
279   - <snapshots>
280   - <enabled>false</enabled>
281   - </snapshots>
282   - </pluginRepository>
283   - </pluginRepositories>
284   -
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<project xmlns="http://maven.apache.org/POM/4.0.0"
  3 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5 + <modelVersion>4.0.0</modelVersion>
  6 +
  7 + <groupId>com.trash</groupId>
  8 + <artifactId>trash</artifactId>
  9 + <version>3.2.0</version>
  10 +
  11 + <name>trash</name>
  12 + <url>http://www.trash.vip</url>
  13 + <description>trash</description>
  14 +
  15 + <properties>
  16 + <trash.version>3.2.0</trash.version>
  17 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  18 + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  19 + <java.version>1.8</java.version>
  20 + <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
  21 + <druid.version>1.2.1</druid.version>
  22 + <bitwalker.version>1.19</bitwalker.version>
  23 + <swagger.version>2.9.2</swagger.version>
  24 + <kaptcha.version>2.3.2</kaptcha.version>
  25 + <pagehelper.boot.version>1.3.0</pagehelper.boot.version>
  26 + <fastjson.version>1.2.74</fastjson.version>
  27 + <oshi.version>5.2.5</oshi.version>
  28 + <jna.version>5.5.0</jna.version>
  29 + <commons.io.version>2.5</commons.io.version>
  30 + <commons.fileupload.version>1.3.3</commons.fileupload.version>
  31 + <poi.version>3.17</poi.version>
  32 + <velocity.version>1.7</velocity.version>
  33 + <jwt.version>0.9.1</jwt.version>
  34 + </properties>
  35 +
  36 + <!-- 依赖声明 -->
  37 + <dependencyManagement>
  38 + <dependencies>
  39 +
  40 + <!-- SpringBoot的依赖配置-->
  41 + <dependency>
  42 + <groupId>org.springframework.boot</groupId>
  43 + <artifactId>spring-boot-dependencies</artifactId>
  44 + <version>2.2.6.RELEASE</version>
  45 + <type>pom</type>
  46 + <scope>import</scope>
  47 + </dependency>
  48 +
  49 + <!--阿里数据库连接池 -->
  50 + <dependency>
  51 + <groupId>com.alibaba</groupId>
  52 + <artifactId>druid-spring-boot-starter</artifactId>
  53 + <version>${druid.version}</version>
  54 + </dependency>
  55 +
  56 + <!-- 解析客户端操作系统、浏览器等 -->
  57 + <dependency>
  58 + <groupId>eu.bitwalker</groupId>
  59 + <artifactId>UserAgentUtils</artifactId>
  60 + <version>${bitwalker.version}</version>
  61 + </dependency>
  62 +
  63 + <!-- pagehelper 分页插件 -->
  64 + <dependency>
  65 + <groupId>com.github.pagehelper</groupId>
  66 + <artifactId>pagehelper-spring-boot-starter</artifactId>
  67 + <version>${pagehelper.boot.version}</version>
  68 + </dependency>
  69 +
  70 + <!-- 获取系统信息 -->
  71 + <dependency>
  72 + <groupId>com.github.oshi</groupId>
  73 + <artifactId>oshi-core</artifactId>
  74 + <version>${oshi.version}</version>
  75 + </dependency>
  76 +
  77 + <dependency>
  78 + <groupId>net.java.dev.jna</groupId>
  79 + <artifactId>jna</artifactId>
  80 + <version>${jna.version}</version>
  81 + </dependency>
  82 +
  83 + <dependency>
  84 + <groupId>net.java.dev.jna</groupId>
  85 + <artifactId>jna-platform</artifactId>
  86 + <version>${jna.version}</version>
  87 + </dependency>
  88 +
  89 + <!-- swagger2-->
  90 + <dependency>
  91 + <groupId>io.springfox</groupId>
  92 + <artifactId>springfox-swagger2</artifactId>
  93 + <version>${swagger.version}</version>
  94 + <exclusions>
  95 + <exclusion>
  96 + <groupId>io.swagger</groupId>
  97 + <artifactId>swagger-annotations</artifactId>
  98 + </exclusion>
  99 + <exclusion>
  100 + <groupId>io.swagger</groupId>
  101 + <artifactId>swagger-models</artifactId>
  102 + </exclusion>
  103 + </exclusions>
  104 + </dependency>
  105 +
  106 + <!-- swagger2-UI-->
  107 + <dependency>
  108 + <groupId>io.springfox</groupId>
  109 + <artifactId>springfox-swagger-ui</artifactId>
  110 + <version>${swagger.version}</version>
  111 + </dependency>
  112 +
  113 + <!--io常用工具类 -->
  114 + <dependency>
  115 + <groupId>commons-io</groupId>
  116 + <artifactId>commons-io</artifactId>
  117 + <version>${commons.io.version}</version>
  118 + </dependency>
  119 +
  120 + <!--文件上传工具类 -->
  121 + <dependency>
  122 + <groupId>commons-fileupload</groupId>
  123 + <artifactId>commons-fileupload</artifactId>
  124 + <version>${commons.fileupload.version}</version>
  125 + </dependency>
  126 +
  127 + <!-- excel工具 -->
  128 + <dependency>
  129 + <groupId>org.apache.poi</groupId>
  130 + <artifactId>poi-ooxml</artifactId>
  131 + <version>${poi.version}</version>
  132 + </dependency>
  133 +
  134 + <!--velocity代码生成使用模板 -->
  135 + <dependency>
  136 + <groupId>org.apache.velocity</groupId>
  137 + <artifactId>velocity</artifactId>
  138 + <version>${velocity.version}</version>
  139 + </dependency>
  140 +
  141 + <!-- 阿里JSON解析器 -->
  142 + <dependency>
  143 + <groupId>com.alibaba</groupId>
  144 + <artifactId>fastjson</artifactId>
  145 + <version>${fastjson.version}</version>
  146 + </dependency>
  147 +
  148 + <!--Token生成与解析-->
  149 + <dependency>
  150 + <groupId>io.jsonwebtoken</groupId>
  151 + <artifactId>jjwt</artifactId>
  152 + <version>${jwt.version}</version>
  153 + </dependency>
  154 +
  155 + <!--验证码 -->
  156 + <dependency>
  157 + <groupId>com.github.penggle</groupId>
  158 + <artifactId>kaptcha</artifactId>
  159 + <version>${kaptcha.version}</version>
  160 + </dependency>
  161 +
  162 + <!-- 定时任务-->
  163 + <dependency>
  164 + <groupId>com.trash</groupId>
  165 + <artifactId>trash-quartz</artifactId>
  166 + <version>${trash.version}</version>
  167 + </dependency>
  168 +
  169 + <!-- 代码生成-->
  170 + <dependency>
  171 + <groupId>com.trash</groupId>
  172 + <artifactId>trash-generator</artifactId>
  173 + <version>${trash.version}</version>
  174 + </dependency>
  175 +
  176 + <!-- 核心模块-->
  177 + <dependency>
  178 + <groupId>com.trash</groupId>
  179 + <artifactId>trash-framework</artifactId>
  180 + <version>${trash.version}</version>
  181 + </dependency>
  182 +
  183 + <!-- 系统模块-->
  184 + <dependency>
  185 + <groupId>com.trash</groupId>
  186 + <artifactId>trash-system</artifactId>
  187 + <version>${trash.version}</version>
  188 + </dependency>
  189 +
  190 + <!-- 通用工具-->
  191 + <dependency>
  192 + <groupId>com.trash</groupId>
  193 + <artifactId>trash-common</artifactId>
  194 + <version>${trash.version}</version>
  195 + </dependency>
  196 + <!-- actviti-->
  197 + <dependency>
  198 + <groupId>com.trash</groupId>
  199 + <artifactId>trash-activiti</artifactId>
  200 + <version>${trash.version}</version>
  201 + </dependency>
  202 + <dependency>
  203 + <groupId>com.trash</groupId>
  204 + <artifactId>trash-workflow</artifactId>
  205 + <version>${trash.version}</version>
  206 + </dependency>
  207 + <dependency>
  208 + <groupId>com.trash</groupId>
  209 + <artifactId>trash-daily</artifactId>
  210 + <version>${trash.version}</version>
  211 + </dependency>
  212 + <dependency>
  213 + <groupId>com.trash</groupId>
  214 + <artifactId>trash-unit</artifactId>
  215 + <version>${trash.version}</version>
  216 + </dependency>
  217 + <dependency>
  218 + <groupId>com.trash</groupId>
  219 + <artifactId>trash-garbage</artifactId>
  220 + <version>${trash.version}</version>
  221 + </dependency>
  222 + </dependencies>
  223 + </dependencyManagement>
  224 +
  225 + <modules>
  226 + <module>trash-admin</module>
  227 + <module>trash-framework</module>
  228 + <module>trash-system</module>
  229 + <module>trash-quartz</module>
  230 + <module>trash-generator</module>
  231 + <module>trash-common</module>
  232 + <module>trash-activiti</module>
  233 + <module>trash-workflow</module>
  234 + <module>trash-daily</module>
  235 + <module>trash-unit</module>
  236 + <module>trash-garbage</module>
  237 + </modules>
  238 + <packaging>pom</packaging>
  239 +
  240 +
  241 + <dependencies>
  242 +
  243 + </dependencies>
  244 +
  245 + <build>
  246 + <plugins>
  247 + <plugin>
  248 + <groupId>org.apache.maven.plugins</groupId>
  249 + <artifactId>maven-compiler-plugin</artifactId>
  250 + <version>3.1</version>
  251 + <configuration>
  252 + <source>${java.version}</source>
  253 + <target>${java.version}</target>
  254 + <encoding>${project.build.sourceEncoding}</encoding>
  255 + </configuration>
  256 + </plugin>
  257 + </plugins>
  258 + </build>
  259 +
  260 + <repositories>
  261 + <repository>
  262 + <id>public</id>
  263 + <name>aliyun nexus</name>
  264 + <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
  265 + <releases>
  266 + <enabled>true</enabled>
  267 + </releases>
  268 + </repository>
  269 + </repositories>
  270 +
  271 + <pluginRepositories>
  272 + <pluginRepository>
  273 + <id>public</id>
  274 + <name>aliyun nexus</name>
  275 + <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
  276 + <releases>
  277 + <enabled>true</enabled>
  278 + </releases>
  279 + <snapshots>
  280 + <enabled>false</enabled>
  281 + </snapshots>
  282 + </pluginRepository>
  283 + </pluginRepositories>
  284 +
285 285 </project>
286 286 \ No newline at end of file
... ...
trash-garbage/src/main/java/com/trash/garbage/controller/GarCarController.java
... ... @@ -138,12 +138,32 @@ public class GarCarController {
138 138  
139 139 try {
140 140 JSONArray jsonArray = JSONArray.parseArray(json);
141   - if (jsonArray.size() >= 2) {
142   - JSONObject secondObject = jsonArray.getJSONObject(1);
  141 + if (jsonArray != null && !jsonArray.isEmpty()) {
  142 + String expectedDay = new SimpleDateFormat("yyyy-MM-dd").format(currentDate);
  143 + JSONObject targetObject = null;
  144 + for (int i = 0; i < jsonArray.size(); i++) {
  145 + JSONObject currentObj = jsonArray.getJSONObject(i);
  146 + if (StringUtils.equals(expectedDay, currentObj.getString("day"))) {
  147 + targetObject = currentObj;
  148 + break;
  149 + }
  150 + }
  151 + if (targetObject == null) {
  152 + for (int i = 0; i < jsonArray.size(); i++) {
  153 + JSONObject currentObj = jsonArray.getJSONObject(i);
  154 + if (StringUtils.isNotBlank(currentObj.getString("day"))) {
  155 + targetObject = currentObj;
  156 + break;
  157 + }
  158 + }
  159 + }
  160 + if (targetObject == null) {
  161 + targetObject = jsonArray.getJSONObject(0);
  162 + }
143 163  
144   - String mileage = secondObject.getString("mileage");
  164 + String mileage = targetObject.getString("mileage");
145 165  
146   - JSONArray locationSectionList = secondObject.getJSONArray("locationSectionList");
  166 + JSONArray locationSectionList = targetObject.getJSONArray("locationSectionList");
147 167 if (locationSectionList != null && !locationSectionList.isEmpty()) {
148 168 JSONObject firstLocationSection = locationSectionList.getJSONObject(0);
149 169  
... ... @@ -174,7 +194,7 @@ public class GarCarController {
174 194 return defaultStartTime;
175 195 }
176 196 GarOrderMatchAsk latestAsk = garOrderMatchAskService.lambdaQuery()
177   - .eq(GarOrderMatchAsk::getGarHandlerCarCode, carNo)
  197 + .eq(GarOrderMatchAsk::getGarCarCode, carNo)
178 198 .orderByDesc(GarOrderMatchAsk::getGarCreateTime)
179 199 .last("limit 1")
180 200 .one();
... ...
trash-ui/src/views/gar/order/index.vue
... ... @@ -69,11 +69,12 @@
69 69 @pagination="getList" />
70 70  
71 71 <!-- 添加或修改清运派单对话框 -->
72   - <el-dialog label-position="left" :visible.sync="open" width="800px" append-to-body>
  72 + <el-dialog label-position="left" :visible.sync="open" width="900px" append-to-body>
73 73 <div class="handle-box-title" style="display: flex; align-items: center;margin: 10px 0;">
74 74 <div class="handle-box-title-ui" style="height: 30px; width: 10px; background-color: #409EFF;margin-right: 15px;">
75 75 </div>
76 76 <div class="handle-box-title-text" style="color: #409EFF; font-size: 25px;">派单基本信息</div>
  77 + </div>
77 78  
78 79 <el-form ref="form" :model="form" label-width="120px">
79 80 <el-row :gutter="20">
... ... @@ -137,7 +138,7 @@
137 138 </el-row>
138 139  
139 140 <el-row :gutter="20">
140   - <el-col :span="12">
  141 + <el-col :span="24">
141 142 <el-form-item label="订单创建时间" prop="garCreateTime">
142 143 <el-date-picker :disabled="true" clearable size="small" style="width: 100%" v-model="form.garCreateTime"
143 144 type="date" value-format="yyyy-MM-dd" placeholder="选择订单创建时间">
... ...