Commit 34a6609a6e3e3db702b1bb5b112d7b3b71c9c25d
1 parent
8cf81d85
新增生成二维码工具类
打印页面条形码改为二维码
Showing
22 changed files
with
816 additions
and
382 deletions
pom.xml
... | ... | @@ -5,16 +5,16 @@ |
5 | 5 | |
6 | 6 | <groupId>com.huaheng</groupId> |
7 | 7 | <artifactId>huaheng</artifactId> |
8 | - <version>2.3.0</version> | |
8 | + <version>4.0.0</version> | |
9 | 9 | <packaging>jar</packaging> |
10 | 10 | |
11 | 11 | <name>huaheng</name> |
12 | - <description>华恒管理系统</description> | |
12 | + <description>华恒WMS管理系统_v2</description> | |
13 | 13 | |
14 | 14 | <parent> |
15 | 15 | <groupId>org.springframework.boot</groupId> |
16 | 16 | <artifactId>spring-boot-starter-parent</artifactId> |
17 | - <version>2.0.3.RELEASE</version> | |
17 | + <version>2.1.3.RELEASE</version> | |
18 | 18 | <relativePath /> |
19 | 19 | </parent> |
20 | 20 | |
... | ... | @@ -22,20 +22,20 @@ |
22 | 22 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
23 | 23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
24 | 24 | <java.version>1.8</java.version> |
25 | - <shiro.version>1.4.0</shiro.version> | |
25 | + <shiro.version>1.4.1</shiro.version> | |
26 | 26 | <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> |
27 | 27 | <!--<mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version>--> |
28 | 28 | <pagehelper.spring.boot.starter.version>1.2.12</pagehelper.spring.boot.starter.version> |
29 | - <fastjson.version>1.2.47</fastjson.version> | |
30 | - <druid.version>1.1.10</druid.version> | |
31 | - <commons.io.version>2.2</commons.io.version> | |
29 | + <fastjson.version>1.2.59</fastjson.version> | |
30 | + <druid.version>1.1.21</druid.version> | |
31 | + <commons.io.version>2.5</commons.io.version> | |
32 | 32 | <commons.fileupload.version>1.4</commons.fileupload.version> |
33 | - <bitwalker.version>1.19</bitwalker.version> | |
33 | + <bitwalker.version>1.21</bitwalker.version> | |
34 | 34 | <lombok.version>1.18.8</lombok.version> |
35 | 35 | <velocity.version>1.7</velocity.version> |
36 | 36 | <kaptcha.version>2.3.2</kaptcha.version> |
37 | - <swagger.version>2.7.0</swagger.version> | |
38 | - <jsoup.version>1.11.3</jsoup.version> | |
37 | + <swagger.version>2.9.2</swagger.version> | |
38 | + <jsoup.version>1.12.1</jsoup.version> | |
39 | 39 | <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> |
40 | 40 | </properties> |
41 | 41 | |
... | ... | @@ -94,19 +94,19 @@ |
94 | 94 | </dependency> |
95 | 95 | |
96 | 96 | <!-- Mysql驱动包 --> |
97 | - <!--<dependency> | |
98 | - <groupId>mysql</groupId> | |
99 | - <artifactId>mysql-connector-java</artifactId> | |
100 | - </dependency>--> | |
101 | - | |
102 | - <!-- Mysql8驱动包 --> | |
103 | - <dependency> | |
97 | + <!--<dependency> | |
104 | 98 | <groupId>mysql</groupId> |
105 | 99 | <artifactId>mysql-connector-java</artifactId> |
106 | - <version>8.0.16</version> | |
107 | - </dependency> | |
100 | + </dependency>--> | |
108 | 101 | |
109 | - <!--pagehelper 分页插件--> | |
102 | + <!-- Mysql8驱动包 --> | |
103 | + <dependency> | |
104 | + <groupId>mysql</groupId> | |
105 | + <artifactId>mysql-connector-java</artifactId> | |
106 | + <version>8.0.16</version> | |
107 | + </dependency> | |
108 | + | |
109 | + <!--pagehelper 分页插件--> | |
110 | 110 | <dependency> |
111 | 111 | <groupId>com.github.pagehelper</groupId> |
112 | 112 | <artifactId>pagehelper-spring-boot-starter</artifactId> |
... | ... | @@ -114,17 +114,11 @@ |
114 | 114 | </dependency> |
115 | 115 | |
116 | 116 | <!--阿里数据库连接池 --> |
117 | -<!-- <dependency> | |
118 | - <groupId>com.alibaba</groupId> | |
119 | - <artifactId>druid-spring-boot-starter</artifactId> | |
120 | - <version>${druid.version}</version> | |
121 | - </dependency>--> | |
122 | - | |
123 | - <dependency> | |
124 | - <groupId>com.alibaba</groupId> | |
125 | - <artifactId>druid-spring-boot-starter</artifactId> | |
126 | - <version>1.1.17</version> | |
127 | - </dependency> | |
117 | + <dependency> | |
118 | + <groupId>com.alibaba</groupId> | |
119 | + <artifactId>druid-spring-boot-starter</artifactId> | |
120 | + <version>${druid.version}</version> | |
121 | + </dependency> | |
128 | 122 | |
129 | 123 | <!--常用工具类 --> |
130 | 124 | <dependency> |
... | ... | @@ -198,13 +192,13 @@ |
198 | 192 | <dependency> |
199 | 193 | <groupId>org.quartz-scheduler</groupId> |
200 | 194 | <artifactId>quartz</artifactId> |
201 | - <version>2.3.1</version> | |
202 | - <exclusions> | |
195 | + <version>2.3.1</version> | |
196 | + <!--<exclusions> | |
203 | 197 | <exclusion> |
204 | 198 | <groupId>com.mchange</groupId> |
205 | 199 | <artifactId>c3p0</artifactId> |
206 | 200 | </exclusion> |
207 | - </exclusions> | |
201 | + </exclusions>--> | |
208 | 202 | </dependency> |
209 | 203 | |
210 | 204 | <!--velocity代码生成使用模板 --> |
... | ... | @@ -252,61 +246,60 @@ |
252 | 246 | <dependency> |
253 | 247 | <groupId>org.apache.poi</groupId> |
254 | 248 | <artifactId>poi-ooxml</artifactId> |
255 | - <version>3.9</version> | |
249 | + <version>3.17</version> | |
256 | 250 | </dependency> |
257 | 251 | |
258 | - <!--activiti工作流--> | |
259 | - <!--<dependency>--> | |
260 | - <!--<groupId>org.activiti</groupId>--> | |
261 | - <!--<artifactId>activiti-spring-boot-starter-basic</artifactId>--> | |
262 | - <!--<version>6.0.0</version>--> | |
263 | - <!--</dependency>--> | |
264 | - | |
265 | - <!--共享Session-spring-session-data-redis分布式系统中--> | |
252 | + <!--jasperreports--> | |
266 | 253 | <dependency> |
267 | - <groupId>org.springframework.session</groupId> | |
268 | - <artifactId>spring-session-data-redis</artifactId> | |
254 | + <groupId>net.sf.jasperreports</groupId> | |
255 | + <artifactId>jasperreports</artifactId> | |
256 | + <version>6.10.0</version> | |
269 | 257 | </dependency> |
270 | - <!-- Spring Boot Redis依赖 --> | |
271 | 258 | <dependency> |
272 | - <groupId>org.springframework.boot</groupId> | |
273 | - <artifactId>spring-boot-starter-data-redis</artifactId> | |
274 | - <!-- 1.5的版本默认采用的连接池技术是jedis 2.0以上版本默认连接池是lettuce, 在这里采用jedis,所以需要排除lettuce的jar --> | |
275 | - <exclusions> | |
276 | - <exclusion> | |
277 | - <groupId>redis.clients</groupId> | |
278 | - <artifactId>jedis</artifactId> | |
279 | - </exclusion> | |
280 | - <exclusion> | |
281 | - <groupId>io.lettuce</groupId> | |
282 | - <artifactId>lettuce-core</artifactId> | |
283 | - </exclusion> | |
284 | - </exclusions> | |
259 | + <groupId>net.sf.jasperreports</groupId> | |
260 | + <artifactId>jasperreports-fonts</artifactId> | |
261 | + <version>6.10.0</version> | |
285 | 262 | </dependency> |
286 | - | |
287 | - <!-- 添加jedis客户端 --> | |
288 | 263 | <dependency> |
289 | - <groupId>redis.clients</groupId> | |
290 | - <artifactId>jedis</artifactId> | |
264 | + <groupId>com.itextpdf</groupId> | |
265 | + <artifactId>itextpdf</artifactId> | |
266 | + <version>5.5.7</version> | |
291 | 267 | </dependency> |
292 | - | |
293 | - <!--spring2.0集成redis所需common-pool2--> | |
294 | - <!-- 必须加上,jedis依赖此 --> | |
295 | 268 | <dependency> |
296 | - <groupId>org.apache.commons</groupId> | |
297 | - <artifactId>commons-pool2</artifactId> | |
298 | - <version>2.5.0</version> | |
269 | + <groupId>com.itextpdf</groupId> | |
270 | + <artifactId>itext-pdfa</artifactId> | |
271 | + <version>5.5.7</version> | |
299 | 272 | </dependency> |
273 | + <dependency> | |
274 | + <groupId>com.itextpdf</groupId> | |
275 | + <artifactId>itext-asian</artifactId> | |
276 | + <version>5.2.0</version> | |
277 | + </dependency> | |
278 | + <dependency> | |
279 | + <groupId>cn.lesper</groupId> | |
280 | + <artifactId>iTextAsian</artifactId> | |
281 | + <version>3.0</version> | |
282 | + </dependency> | |
283 | + <dependency> | |
284 | + <groupId>org.codehaus.groovy</groupId> | |
285 | + <artifactId>groovy-all</artifactId> | |
286 | + <version>2.4.11</version> | |
287 | + </dependency> | |
288 | + | |
289 | + <!--activiti工作流--> | |
290 | + <!--<dependency>--> | |
291 | + <!--<groupId>org.activiti</groupId>--> | |
292 | + <!--<artifactId>activiti-spring-boot-starter-basic</artifactId>--> | |
293 | + <!--<version>6.0.0</version>--> | |
294 | + <!--</dependency>--> | |
300 | 295 | |
301 | - <!-- 将作为Redis对象序列化器 --> | |
296 | + <!--json库--> | |
302 | 297 | <dependency> |
303 | 298 | <groupId>com.alibaba</groupId> |
304 | 299 | <artifactId>fastjson</artifactId> |
305 | - <version>1.2.47</version> | |
300 | + <version>${fastjson.version}</version> | |
306 | 301 | </dependency> |
307 | 302 | |
308 | - | |
309 | - | |
310 | 303 | <dependency> |
311 | 304 | <groupId>org.apache.httpcomponents</groupId> |
312 | 305 | <artifactId>httpclient</artifactId> |
... | ... | @@ -317,29 +310,33 @@ |
317 | 310 | <artifactId>httpcore</artifactId> |
318 | 311 | </dependency> |
319 | 312 | |
320 | - | |
321 | 313 | <dependency> |
322 | 314 | <groupId>org.springframework.boot</groupId> |
323 | 315 | <artifactId>spring-boot-starter-mail</artifactId> |
324 | 316 | </dependency> |
325 | 317 | |
326 | - | |
327 | - | |
328 | 318 | <dependency> |
329 | 319 | <groupId>com.google.code.gson</groupId> |
330 | 320 | <artifactId>gson</artifactId> |
331 | 321 | <version>2.8.2</version> |
332 | 322 | </dependency> |
333 | 323 | |
324 | + <!-- <dependency> | |
325 | + <groupId>com.huaheng.soft</groupId> | |
326 | + <artifactId>echarts</artifactId> | |
327 | + <version>1.1</version> | |
328 | + </dependency>--> | |
329 | + | |
330 | + <dependency> | |
331 | + <groupId>com.github.abel533</groupId> | |
332 | + <artifactId>ECharts</artifactId> | |
333 | + <version>3.0.0.5</version> | |
334 | + </dependency> | |
335 | + | |
334 | 336 | <dependency> |
335 | - <groupId>com.huaheng.soft</groupId> | |
336 | - <artifactId>echarts</artifactId> | |
337 | - <version>1.1</version> | |
337 | + <groupId>org.junit.jupiter</groupId> | |
338 | + <artifactId>junit-jupiter-api</artifactId> | |
338 | 339 | </dependency> |
339 | - <dependency> | |
340 | - <groupId>org.junit.jupiter</groupId> | |
341 | - <artifactId>junit-jupiter-api</artifactId> | |
342 | - </dependency> | |
343 | 340 | <dependency> |
344 | 341 | <groupId>org.testng</groupId> |
345 | 342 | <artifactId>testng</artifactId> |
... | ... | @@ -353,13 +350,13 @@ |
353 | 350 | </dependency> |
354 | 351 | |
355 | 352 | <!-- echarts 图标插件 --> |
356 | - <!--<dependency>--> | |
357 | - <!--<groupId>com.github.abel533</groupId>--> | |
358 | - <!--<artifactId>echarts</artifactId>--> | |
359 | - <!--<version>49.0</version>--> | |
360 | - <!--<scope>system</scope>--> | |
361 | - <!--<systemPath>${project.basedir}/src/main/resources/echart.jar</systemPath>--> | |
362 | - <!--</dependency>--> | |
353 | + <!--<dependency>--> | |
354 | + <!--<groupId>com.github.abel533</groupId>--> | |
355 | + <!--<artifactId>echarts</artifactId>--> | |
356 | + <!--<version>49.0</version>--> | |
357 | + <!--<scope>system</scope>--> | |
358 | + <!--<systemPath>${project.basedir}/src/main/resources/echart.jar</systemPath>--> | |
359 | + <!--</dependency>--> | |
363 | 360 | <!--Mybatis-Plus--> |
364 | 361 | <dependency> |
365 | 362 | <groupId>com.baomidou</groupId> |
... | ... | @@ -377,6 +374,24 @@ |
377 | 374 | <artifactId>mybatis-plus-annotation</artifactId> |
378 | 375 | <version>3.1.2</version> |
379 | 376 | </dependency> |
377 | + | |
378 | + <!-- yml解析器 --> | |
379 | + <dependency> | |
380 | + <groupId>org.yaml</groupId> | |
381 | + <artifactId>snakeyaml</artifactId> | |
382 | + </dependency> | |
383 | + | |
384 | + <!-- 生成二维码--> | |
385 | + <dependency> | |
386 | + <groupId>com.google.zxing</groupId> | |
387 | + <artifactId>core</artifactId> | |
388 | + <version>3.3.0</version> | |
389 | + </dependency> | |
390 | + <dependency> | |
391 | + <groupId>com.google.zxing</groupId> | |
392 | + <artifactId>javase</artifactId> | |
393 | + <version>3.3.0</version> | |
394 | + </dependency> | |
380 | 395 | </dependencies> |
381 | 396 | |
382 | 397 | <build> |
... | ... | @@ -392,8 +407,40 @@ |
392 | 407 | </plugins> |
393 | 408 | </build> |
394 | 409 | |
410 | + <!--阿里maven地址--> | |
395 | 411 | <repositories> |
396 | 412 | <repository> |
413 | + <id>nexus-aliyun</id> | |
414 | + <name>Nexus aliyun</name> | |
415 | + <layout>default</layout> | |
416 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
417 | + <snapshots> | |
418 | + <enabled>false</enabled> | |
419 | + </snapshots> | |
420 | + <releases> | |
421 | + <enabled>true</enabled> | |
422 | + </releases> | |
423 | + </repository> | |
424 | + </repositories> | |
425 | + | |
426 | + <pluginRepositories> | |
427 | + <pluginRepository> | |
428 | + <id>nexus-aliyun</id> | |
429 | + <name>Nexus aliyun</name> | |
430 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | |
431 | + <snapshots> | |
432 | + <enabled>false</enabled> | |
433 | + </snapshots> | |
434 | + <releases> | |
435 | + <enabled>true</enabled> | |
436 | + </releases> | |
437 | + </pluginRepository> | |
438 | + </pluginRepositories> | |
439 | + | |
440 | + <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore --> | |
441 | + | |
442 | + <!--<repositories> | |
443 | + <repository> | |
397 | 444 | <id>nexus</id> |
398 | 445 | <name>huaheng nexus</name> |
399 | 446 | <url>http://172.16.29.88:8081/repository/maven-public/</url> |
... | ... | @@ -415,6 +462,6 @@ |
415 | 462 | <enabled>false</enabled> |
416 | 463 | </snapshots> |
417 | 464 | </pluginRepository> |
418 | - </pluginRepositories> | |
465 | + </pluginRepositories>--> | |
419 | 466 | |
420 | 467 | </project> |
421 | 468 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/common/jasper/JasperreportUtils.java
... | ... | @@ -9,11 +9,13 @@ import org.slf4j.Logger; |
9 | 9 | import org.slf4j.LoggerFactory; |
10 | 10 | |
11 | 11 | import javax.servlet.ServletException; |
12 | -import javax.servlet.ServletOutputStream; | |
13 | 12 | import javax.servlet.http.HttpServletRequest; |
14 | 13 | import javax.servlet.http.HttpServletResponse; |
15 | 14 | import javax.servlet.http.HttpSession; |
16 | -import java.io.*; | |
15 | +import java.io.File; | |
16 | +import java.io.IOException; | |
17 | +import java.io.OutputStream; | |
18 | +import java.io.PrintWriter; | |
17 | 19 | import java.lang.reflect.Field; |
18 | 20 | import java.math.BigDecimal; |
19 | 21 | import java.net.URLEncoder; |
... | ... |
src/main/java/com/huaheng/common/utils/QRCodeGenerator.java
0 → 100644
1 | +package com.huaheng.common.utils; | |
2 | + | |
3 | + | |
4 | +import com.google.zxing.BarcodeFormat; | |
5 | +import com.google.zxing.WriterException; | |
6 | +import com.google.zxing.client.j2se.MatrixToImageWriter; | |
7 | +import com.google.zxing.common.BitMatrix; | |
8 | +import com.google.zxing.qrcode.QRCodeWriter; | |
9 | + | |
10 | +import java.io.ByteArrayOutputStream; | |
11 | +import java.io.IOException; | |
12 | + | |
13 | +/** | |
14 | + * 生成二维码 | |
15 | + * @author Enzo Cotter | |
16 | + * @date 2020/2/21 | |
17 | + */ | |
18 | +public class QRCodeGenerator { | |
19 | + | |
20 | + public static byte[] getQRCodeImage(String text, int width, int height) throws WriterException, IOException { | |
21 | + QRCodeWriter qrCodeWriter = new QRCodeWriter(); | |
22 | + BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height); | |
23 | + | |
24 | + ByteArrayOutputStream pngOutputStream = new ByteArrayOutputStream(); | |
25 | + MatrixToImageWriter.writeToStream(bitMatrix, "PNG", pngOutputStream); | |
26 | + byte[] pngData = pngOutputStream.toByteArray(); | |
27 | + return pngData; | |
28 | + } | |
29 | + | |
30 | +} | |
... | ... |
src/main/java/com/huaheng/common/utils/poi/ExcelUtil.java
1 | 1 | package com.huaheng.common.utils.poi; |
2 | 2 | |
3 | -import java.io.File; | |
4 | -import java.io.FileOutputStream; | |
5 | -import java.io.IOException; | |
6 | -import java.io.InputStream; | |
7 | -import java.io.OutputStream; | |
8 | -import java.lang.reflect.Field; | |
9 | -import java.lang.reflect.Method; | |
10 | -import java.math.BigDecimal; | |
11 | -import java.text.DecimalFormat; | |
12 | -import java.util.ArrayList; | |
13 | -import java.util.Arrays; | |
14 | -import java.util.Date; | |
15 | -import java.util.HashMap; | |
16 | -import java.util.List; | |
17 | -import java.util.Map; | |
18 | -import java.util.UUID; | |
19 | - | |
20 | 3 | import com.huaheng.common.annotation.Excels; |
21 | 4 | import com.huaheng.common.config.Global; |
22 | 5 | import com.huaheng.common.exception.BusinessException; |
... | ... | @@ -28,29 +11,20 @@ import com.huaheng.framework.aspectj.lang.annotation.Excel; |
28 | 11 | import com.huaheng.framework.aspectj.lang.annotation.Excel.Type; |
29 | 12 | import com.huaheng.framework.web.domain.AjaxResult; |
30 | 13 | import org.apache.poi.hssf.usermodel.HSSFDateUtil; |
31 | -import org.apache.poi.ss.usermodel.BorderStyle; | |
32 | -import org.apache.poi.ss.usermodel.Cell; | |
33 | -import org.apache.poi.ss.usermodel.CellStyle; | |
34 | -import org.apache.poi.ss.usermodel.CellType; | |
35 | -import org.apache.poi.ss.usermodel.DataValidation; | |
36 | -import org.apache.poi.ss.usermodel.DataValidationConstraint; | |
37 | -import org.apache.poi.ss.usermodel.DataValidationHelper; | |
38 | -import org.apache.poi.ss.usermodel.DateUtil; | |
39 | -import org.apache.poi.ss.usermodel.FillPatternType; | |
40 | -import org.apache.poi.ss.usermodel.Font; | |
41 | -import org.apache.poi.ss.usermodel.HorizontalAlignment; | |
42 | -import org.apache.poi.ss.usermodel.IndexedColors; | |
43 | -import org.apache.poi.ss.usermodel.Row; | |
44 | -import org.apache.poi.ss.usermodel.Sheet; | |
45 | -import org.apache.poi.ss.usermodel.VerticalAlignment; | |
46 | -import org.apache.poi.ss.usermodel.Workbook; | |
47 | -import org.apache.poi.ss.usermodel.WorkbookFactory; | |
14 | +import org.apache.poi.ss.usermodel.*; | |
48 | 15 | import org.apache.poi.ss.util.CellRangeAddressList; |
49 | 16 | import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
50 | 17 | import org.apache.poi.xssf.usermodel.XSSFDataValidation; |
51 | 18 | import org.slf4j.Logger; |
52 | 19 | import org.slf4j.LoggerFactory; |
53 | 20 | |
21 | +import java.io.*; | |
22 | +import java.lang.reflect.Field; | |
23 | +import java.lang.reflect.Method; | |
24 | +import java.math.BigDecimal; | |
25 | +import java.text.DecimalFormat; | |
26 | +import java.util.*; | |
27 | + | |
54 | 28 | /** |
55 | 29 | * Excel相关处理 |
56 | 30 | * |
... | ... |
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
... | ... | @@ -3,15 +3,11 @@ package com.huaheng.mobile.receipt; |
3 | 3 | import com.alibaba.fastjson.JSONException; |
4 | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | -import com.huaheng.api.general.domain.Receipt; | |
7 | 6 | import com.huaheng.common.constant.QuantityConstant; |
8 | -import com.huaheng.common.exception.service.ServiceException; | |
9 | -import com.huaheng.common.utils.StringUtils; | |
10 | 7 | import com.huaheng.common.utils.security.ShiroUtils; |
11 | 8 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
12 | 9 | import com.huaheng.framework.aspectj.lang.constant.BusinessType; |
13 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
14 | -import com.huaheng.pc.config.company.domain.Company; | |
15 | 11 | import com.huaheng.pc.config.company.service.CompanyService; |
16 | 12 | import com.huaheng.pc.config.container.domain.Container; |
17 | 13 | import com.huaheng.pc.config.container.service.ContainerService; |
... | ... | @@ -30,7 +26,6 @@ import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
30 | 26 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
31 | 27 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
32 | 28 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
33 | -import groovy.json.JsonException; | |
34 | 29 | import io.swagger.annotations.Api; |
35 | 30 | import io.swagger.annotations.ApiOperation; |
36 | 31 | import io.swagger.annotations.ApiParam; |
... | ... | @@ -39,7 +34,6 @@ import org.springframework.web.bind.annotation.*; |
39 | 34 | |
40 | 35 | import javax.annotation.Resource; |
41 | 36 | import java.math.BigDecimal; |
42 | -import java.util.Date; | |
43 | 37 | import java.util.List; |
44 | 38 | import java.util.Map; |
45 | 39 | |
... | ... |
src/main/java/com/huaheng/pc/common/CommonController.java
1 | 1 | package com.huaheng.pc.common; |
2 | 2 | |
3 | +import java.io.IOException; | |
3 | 4 | import java.io.UnsupportedEncodingException; |
4 | 5 | import java.net.URLEncoder; |
5 | 6 | import javax.servlet.http.HttpServletRequest; |
6 | 7 | import javax.servlet.http.HttpServletResponse; |
7 | 8 | |
9 | +import com.google.zxing.WriterException; | |
8 | 10 | import com.huaheng.common.config.Global; |
11 | +import com.huaheng.common.utils.QRCodeGenerator; | |
9 | 12 | import org.slf4j.Logger; |
10 | 13 | import org.slf4j.LoggerFactory; |
14 | +import org.springframework.http.HttpHeaders; | |
15 | +import org.springframework.http.HttpStatus; | |
16 | +import org.springframework.http.MediaType; | |
17 | +import org.springframework.http.ResponseEntity; | |
11 | 18 | import org.springframework.stereotype.Controller; |
12 | 19 | import org.springframework.util.ResourceUtils; |
20 | +import org.springframework.web.bind.annotation.GetMapping; | |
21 | +import org.springframework.web.bind.annotation.PathVariable; | |
13 | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
14 | 23 | import com.huaheng.common.utils.file.FileUtils; |
15 | 24 | |
... | ... | @@ -73,4 +82,20 @@ public class CommonController |
73 | 82 | return filename; |
74 | 83 | |
75 | 84 | } |
85 | + | |
86 | + @GetMapping(value = "/image/{text}") | |
87 | + public ResponseEntity<byte[]> getImage(@PathVariable("text") String text) { | |
88 | + byte[] qrcode = null; | |
89 | + try { | |
90 | + qrcode = QRCodeGenerator.getQRCodeImage(text, 100, 100); | |
91 | + } catch (WriterException e) { | |
92 | + e.printStackTrace(); | |
93 | + } catch (IOException e) { | |
94 | + e.printStackTrace(); | |
95 | + } | |
96 | + // Set headers | |
97 | + final HttpHeaders headers = new HttpHeaders(); | |
98 | + headers.setContentType(MediaType.IMAGE_PNG); | |
99 | + return new ResponseEntity<byte[]>(qrcode, headers, HttpStatus.CREATED); | |
100 | + } | |
76 | 101 | } |
... | ... |
src/main/java/com/huaheng/pc/jasper/JasperController.java
... | ... | @@ -32,6 +32,7 @@ public class JasperController { |
32 | 32 | |
33 | 33 | |
34 | 34 | |
35 | + | |
35 | 36 | /** |
36 | 37 | * 转换为pdf在浏览器上展示 |
37 | 38 | * |
... | ... | @@ -43,7 +44,7 @@ public class JasperController { |
43 | 44 | * @throws JRException |
44 | 45 | * @throws IOException |
45 | 46 | */ |
46 | -// @GetMapping("/{reportName}") | |
47 | + @GetMapping("/{reportName}") | |
47 | 48 | public void getReportByParam( |
48 | 49 | @PathVariable("reportName") final String reportName, |
49 | 50 | @RequestParam(required = false) Map<String, Object> parameters, |
... | ... | @@ -77,7 +78,7 @@ public class JasperController { |
77 | 78 | * @throws JRException |
78 | 79 | * @throws IOException |
79 | 80 | */ |
80 | - @GetMapping("/{reportName}") | |
81 | + @PostMapping("/{reportName}") | |
81 | 82 | public void getReportByExcel( |
82 | 83 | @PathVariable("reportName") final String reportName, |
83 | 84 | @RequestParam(required = false) Map<String, Object> parameters, |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderService.java
... | ... | @@ -48,4 +48,11 @@ public interface ReceiptContainerHeaderService extends IService<ReceiptContainer |
48 | 48 | Boolean mobileCheckLocationCode(ReceiptContainerView record); |
49 | 49 | |
50 | 50 | int insertTodayReceiptContainerHeader(ReceiptBill receiptBill, String receiptCode); |
51 | + | |
52 | + /** | |
53 | + * 取消入库任务 | |
54 | + * @param id 入库组盘头id | |
55 | + * @return | |
56 | + */ | |
57 | + AjaxResult cancelReceipt(Integer id); | |
51 | 58 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -499,4 +499,52 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
499 | 499 | containerService.updateLocationCodeAndStatus(receiptContainerCode, locationCode, "some"); |
500 | 500 | return recorder.getId(); |
501 | 501 | } |
502 | + | |
503 | + /** | |
504 | + * 取消入库任务 | |
505 | + * @param id 入库组盘头id | |
506 | + * @return | |
507 | + */ | |
508 | + @Override | |
509 | + public AjaxResult cancelReceipt(Integer id) { | |
510 | + /** | |
511 | + * 回滚组盘主表状态 | |
512 | + */ | |
513 | + ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | |
514 | + receiptContainerHeader.setStatus((short) QuantityConstant.RECEIPT_CONTAINER_BUILD.intValue()); | |
515 | + receiptContainerHeader.setId(id); | |
516 | + if (!updateById(receiptContainerHeader)){ | |
517 | + throw new ServiceException("回滚入库组盘头表失败"); | |
518 | + } | |
519 | + | |
520 | + /** | |
521 | + * 回滚组盘明细状态 | |
522 | + */ | |
523 | + LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
524 | + lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, id); | |
525 | + List<ReceiptContainerDetail> containerDetailList = receiptContainerDetailService.list(lambdaQueryWrapper); | |
526 | + for (ReceiptContainerDetail containerDetail : containerDetailList) { | |
527 | + containerDetail.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD.intValue()); | |
528 | + } | |
529 | + if (!receiptContainerDetailService.updateBatchById(containerDetailList)) { | |
530 | + throw new ServiceException("回滚入库组盘明细失败"); | |
531 | + } | |
532 | + | |
533 | + /** | |
534 | + * 回滚入库单头表、入库单明细状态 | |
535 | + */ | |
536 | + for (ReceiptContainerDetail containerDetail : containerDetailList) { | |
537 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(containerDetail.getReceiptId()); | |
538 | + receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_WAIT); | |
539 | + ReceiptDetail receiptDetail = receiptDetailService.getById(containerDetail.getReceiptDetailId()); | |
540 | + receiptDetail.setProcessStamp(String.valueOf(QuantityConstant.RECEIPT_HEADER_WAIT)); | |
541 | + if (!receiptHeaderService.updateById(receiptHeader)) { | |
542 | + throw new ServiceException("回滚入库单头表失败"); | |
543 | + } | |
544 | + if (!receiptDetailService.updateById(receiptDetail)) { | |
545 | + throw new ServiceException("回滚入库单明细失败"); | |
546 | + } | |
547 | + } | |
548 | + return AjaxResult.success("成功"); | |
549 | + } | |
502 | 550 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -276,12 +276,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
276 | 276 | taskHeaderService.removeById(taskHeader.getId()); |
277 | 277 | // 更改库位状态(整盘入库任务除外) |
278 | 278 | if (taskHeader.getInternalTaskType().equals(QuantityConstant.TASK_INTENERTYPE_SHELF)) { |
279 | - ReceiptContainerHeader record = new ReceiptContainerHeader(); | |
280 | - record.setStatus((short) QuantityConstant.RECEIPT_CONTAINER_BUILD.intValue()); | |
281 | - record.setId(taskHeader.getAllocationHeadId()); | |
282 | - if (!receiptContainerHeaderService.updateById(record)) { | |
283 | - throw new ServiceException("回滚组盘明细失败"); | |
284 | - } | |
279 | + receiptContainerHeaderService.cancelReceipt(taskHeader.getAllocationHeadId()); | |
285 | 280 | } |
286 | 281 | //根据任务类型来更新货箱状态 |
287 | 282 | //修改关联的货箱状态 |
... | ... |
src/main/resources/jaspers/inventory.jasper
0 → 100644
No preview for this file type
src/main/resources/jaspers/inventory.jrxml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!-- Created with Jaspersoft Studio version 6.10.0.final using JasperReports Library version 6.10.0-unknown --> | |
3 | +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="inventory" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f2b84649-4c05-45e1-97d0-9f31966f494f"> | |
4 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
5 | + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="myAdapter"/> | |
6 | + <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="647"/> | |
7 | + <property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value="353"/> | |
8 | + <parameter name="date" class="java.sql.Date"/> | |
9 | + <queryString language="SQL"> | |
10 | + <![CDATA[SELECT locationCode AS locationCode, | |
11 | + containerCode AS containerCode, | |
12 | + materialCode AS materialCode, | |
13 | + name AS name, | |
14 | + spec AS spec, | |
15 | + inventorySts AS inventorySts, | |
16 | + qty AS qty | |
17 | +FROM inventory_detail i | |
18 | + INNER JOIN material m ON | |
19 | + 'NULL' = 'NULL' | |
20 | +ORDER BY locationCode ASC]]> | |
21 | + </queryString> | |
22 | + <field name="locationCode" class="java.lang.String"> | |
23 | + <property name="com.jaspersoft.studio.field.label" value="locationCode"/> | |
24 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
25 | + </field> | |
26 | + <field name="containerCode" class="java.lang.String"> | |
27 | + <property name="com.jaspersoft.studio.field.label" value="containerCode"/> | |
28 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
29 | + </field> | |
30 | + <field name="materialCode" class="java.lang.String"> | |
31 | + <property name="com.jaspersoft.studio.field.label" value="materialCode"/> | |
32 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
33 | + </field> | |
34 | + <field name="name" class="java.lang.String"> | |
35 | + <property name="com.jaspersoft.studio.field.label" value="name"/> | |
36 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
37 | + </field> | |
38 | + <field name="spec" class="java.lang.String"> | |
39 | + <property name="com.jaspersoft.studio.field.label" value="spec"/> | |
40 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
41 | + </field> | |
42 | + <field name="inventorySts" class="java.lang.String"> | |
43 | + <property name="com.jaspersoft.studio.field.label" value="inventorySts"/> | |
44 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
45 | + </field> | |
46 | + <field name="qty" class="java.math.BigDecimal"> | |
47 | + <property name="com.jaspersoft.studio.field.label" value="qty"/> | |
48 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
49 | + </field> | |
50 | + <background> | |
51 | + <band splitType="Stretch"/> | |
52 | + </background> | |
53 | + <title> | |
54 | + <band height="57" splitType="Stretch"> | |
55 | + <staticText> | |
56 | + <reportElement x="190" y="20" width="140" height="30" uuid="a5dadfff-1941-4d79-94ab-d850eed5ae79"/> | |
57 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
58 | + <font size="16"/> | |
59 | + </textElement> | |
60 | + <text><![CDATA[长沙华恒库存报表]]></text> | |
61 | + </staticText> | |
62 | + </band> | |
63 | + </title> | |
64 | + <pageHeader> | |
65 | + <band height="35" splitType="Stretch"> | |
66 | + <staticText> | |
67 | + <reportElement x="-20" y="0" width="100" height="30" uuid="cb8872ee-e1ac-4b42-a863-e8ac49daa4c4"/> | |
68 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
69 | + <text><![CDATA[时间:]]></text> | |
70 | + </staticText> | |
71 | + <staticText> | |
72 | + <reportElement x="370" y="0" width="100" height="30" uuid="559c32ed-18e1-4bd0-8eb1-98eb70990295"/> | |
73 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
74 | + <text><![CDATA[部门:]]></text> | |
75 | + </staticText> | |
76 | + <staticText> | |
77 | + <reportElement x="470" y="0" width="100" height="30" uuid="49283584-65ca-4219-8c4d-3f8dbd641e56"/> | |
78 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
79 | + <text><![CDATA[仓库]]></text> | |
80 | + </staticText> | |
81 | + <textField pattern="MMMMM dd, yyyy"> | |
82 | + <reportElement x="80" y="0" width="100" height="30" uuid="b6c60f61-7328-4d66-89df-8136959bb837"/> | |
83 | + <textElement verticalAlignment="Middle"/> | |
84 | + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> | |
85 | + </textField> | |
86 | + </band> | |
87 | + </pageHeader> | |
88 | + <columnHeader> | |
89 | + <band height="32" splitType="Stretch"> | |
90 | + <staticText> | |
91 | + <reportElement x="-20" y="0" width="80" height="30" uuid="b202c2a1-46b8-4727-91ce-4e1280566016"/> | |
92 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
93 | + <text><![CDATA[库位]]></text> | |
94 | + </staticText> | |
95 | + <staticText> | |
96 | + <reportElement x="60" y="0" width="70" height="30" uuid="c03890b2-30ed-4b16-b884-acbfe95cd982"/> | |
97 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
98 | + <text><![CDATA[容器]]></text> | |
99 | + </staticText> | |
100 | + <staticText> | |
101 | + <reportElement x="130" y="0" width="80" height="30" uuid="ece5cb44-94b6-4203-82b7-094214770cad"/> | |
102 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
103 | + <text><![CDATA[物料编码]]></text> | |
104 | + </staticText> | |
105 | + <staticText> | |
106 | + <reportElement x="210" y="0" width="90" height="30" uuid="31baaf40-5e47-4b4a-a8ba-d3efb10137e7"/> | |
107 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
108 | + <text><![CDATA[物料名称]]></text> | |
109 | + </staticText> | |
110 | + <staticText> | |
111 | + <reportElement x="300" y="0" width="100" height="30" uuid="46dfbcb4-5464-4df0-afae-8f24f91e9082"/> | |
112 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
113 | + <text><![CDATA[物料规格]]></text> | |
114 | + </staticText> | |
115 | + <staticText> | |
116 | + <reportElement x="400" y="0" width="90" height="30" uuid="637a4fa3-87f2-48c7-8077-ab1a0182bbac"/> | |
117 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
118 | + <text><![CDATA[库存]]></text> | |
119 | + </staticText> | |
120 | + <staticText> | |
121 | + <reportElement x="490" y="0" width="85" height="30" uuid="6c92e083-a134-423e-814f-870b0e522e9c"/> | |
122 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
123 | + <text><![CDATA[库存状态]]></text> | |
124 | + </staticText> | |
125 | + </band> | |
126 | + </columnHeader> | |
127 | + <detail> | |
128 | + <band height="34" splitType="Stretch"> | |
129 | + <textField> | |
130 | + <reportElement x="-20" y="0" width="80" height="30" uuid="44ac5289-dc22-45f4-ac12-d59f564b3dea"/> | |
131 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
132 | + <textFieldExpression><![CDATA[$F{locationCode}]]></textFieldExpression> | |
133 | + </textField> | |
134 | + <textField> | |
135 | + <reportElement x="60" y="0" width="70" height="30" uuid="0c322385-42cc-4908-a1f5-f92c707cfe23"/> | |
136 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
137 | + <textFieldExpression><![CDATA[$F{containerCode}]]></textFieldExpression> | |
138 | + </textField> | |
139 | + <textField> | |
140 | + <reportElement x="130" y="0" width="80" height="30" uuid="f6576e46-cbaa-4f97-a303-9adb35d66dbd"/> | |
141 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
142 | + <textFieldExpression><![CDATA[$F{materialCode}]]></textFieldExpression> | |
143 | + </textField> | |
144 | + <textField> | |
145 | + <reportElement x="210" y="0" width="90" height="30" uuid="21d367fe-919a-4669-82e4-f13fdc9d4223"/> | |
146 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
147 | + <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> | |
148 | + </textField> | |
149 | + <textField> | |
150 | + <reportElement x="300" y="0" width="100" height="30" uuid="3927d013-40f7-4bb5-9de9-cc9587214dd5"/> | |
151 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
152 | + <textFieldExpression><![CDATA[$F{spec}]]></textFieldExpression> | |
153 | + </textField> | |
154 | + <textField> | |
155 | + <reportElement x="400" y="0" width="90" height="30" uuid="8ad633b4-63e6-46b9-b09f-8a2658f0248d"/> | |
156 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
157 | + <textFieldExpression><![CDATA[$F{qty}]]></textFieldExpression> | |
158 | + </textField> | |
159 | + <textField> | |
160 | + <reportElement x="490" y="0" width="85" height="30" uuid="e33bc011-8c17-4ee9-8eb0-f18da95f51c8"/> | |
161 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
162 | + <textFieldExpression><![CDATA[$F{inventorySts}]]></textFieldExpression> | |
163 | + </textField> | |
164 | + </band> | |
165 | + </detail> | |
166 | + <columnFooter> | |
167 | + <band splitType="Stretch"/> | |
168 | + </columnFooter> | |
169 | + <pageFooter> | |
170 | + <band height="36" splitType="Stretch"> | |
171 | + <textField> | |
172 | + <reportElement x="475" y="0" width="100" height="30" uuid="142d35d8-e054-4bdb-a690-4e044d037273"/> | |
173 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
174 | + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> | |
175 | + </textField> | |
176 | + </band> | |
177 | + </pageFooter> | |
178 | + <summary> | |
179 | + <band height="42" splitType="Stretch"/> | |
180 | + </summary> | |
181 | +</jasperReport> | |
... | ... |
src/main/resources/jaspers/mypage.jasper renamed to src/main/resources/jaspers/inventoryTransR.jasper
No preview for this file type
src/main/resources/jaspers/inventoryTransR.jrxml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!-- Created with Jaspersoft Studio version 6.10.0.final using JasperReports Library version 6.10.0-unknown --> | |
3 | +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="inventoryTrans" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="021febb9-ba92-4db2-a4e7-e9e7f112e792"> | |
4 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
5 | + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="myAdapter"/> | |
6 | + <queryString language="SQL"> | |
7 | + <![CDATA[SELECT i.materialCode,m.name,m.spec,SUM(i.taskQty) taskQty from inventory_transaction i INNER JOIN material m | |
8 | +on i.materialCode=m.code and (i.transactionType=10 or i.transactionType=20) and i.created >date_sub(curdate(), INTERVAL 30 DAY) GROUP BY i.materialCode,m.name,m.spec ORDER BY taskQty desc]]> | |
9 | + </queryString> | |
10 | + <field name="materialCode" class="java.lang.String"> | |
11 | + <property name="com.jaspersoft.studio.field.label" value="materialCode"/> | |
12 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_transaction"/> | |
13 | + </field> | |
14 | + <field name="name" class="java.lang.String"> | |
15 | + <property name="com.jaspersoft.studio.field.label" value="name"/> | |
16 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
17 | + </field> | |
18 | + <field name="spec" class="java.lang.String"> | |
19 | + <property name="com.jaspersoft.studio.field.label" value="spec"/> | |
20 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
21 | + </field> | |
22 | + <field name="taskQty" class="java.math.BigDecimal"> | |
23 | + <property name="com.jaspersoft.studio.field.label" value="taskQty"/> | |
24 | + </field> | |
25 | + <background> | |
26 | + <band splitType="Stretch"/> | |
27 | + </background> | |
28 | + <title> | |
29 | + <band height="79" splitType="Stretch"> | |
30 | + <staticText> | |
31 | + <reportElement x="220" y="30" width="100" height="30" uuid="5d01f7b9-e2ba-45ca-a815-1c88383d0ea2"/> | |
32 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
33 | + <font size="16"/> | |
34 | + </textElement> | |
35 | + <text><![CDATA[华恒库存入库交易]]></text> | |
36 | + </staticText> | |
37 | + </band> | |
38 | + </title> | |
39 | + <pageHeader> | |
40 | + <band height="48" splitType="Stretch"> | |
41 | + <staticText> | |
42 | + <reportElement x="160" y="10" width="100" height="30" uuid="2eb87fc1-1cba-45f2-ba32-d01503be359b"/> | |
43 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
44 | + <text><![CDATA[时间]]></text> | |
45 | + </staticText> | |
46 | + <textField pattern="MMMMM dd, yyyy"> | |
47 | + <reportElement x="260" y="10" width="100" height="30" uuid="e7d28891-6914-40c2-bdf7-17e375670c3b"/> | |
48 | + <textElement verticalAlignment="Middle"/> | |
49 | + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> | |
50 | + </textField> | |
51 | + </band> | |
52 | + </pageHeader> | |
53 | + <columnHeader> | |
54 | + <band height="33" splitType="Stretch"> | |
55 | + <staticText> | |
56 | + <reportElement x="250" y="0" width="100" height="30" uuid="b98a1182-05b6-47de-b42d-93ab5a24d5a6"/> | |
57 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
58 | + <text><![CDATA[物料规格]]></text> | |
59 | + </staticText> | |
60 | + <staticText> | |
61 | + <reportElement x="350" y="3" width="100" height="30" uuid="217e8701-9f23-4602-857b-b3cc117b5c1b"/> | |
62 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
63 | + <text><![CDATA[数量]]></text> | |
64 | + </staticText> | |
65 | + <staticText> | |
66 | + <reportElement x="150" y="0" width="100" height="30" uuid="e48a2bea-beb0-4919-b982-77ddc8ca6808"/> | |
67 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
68 | + <text><![CDATA[物料名称]]></text> | |
69 | + </staticText> | |
70 | + <staticText> | |
71 | + <reportElement x="50" y="0" width="100" height="30" uuid="aa71cbe5-b6e3-4cfe-92d6-b6c5c5e2c402"/> | |
72 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
73 | + <text><![CDATA[物料编码]]></text> | |
74 | + </staticText> | |
75 | + </band> | |
76 | + </columnHeader> | |
77 | + <detail> | |
78 | + <band height="33" splitType="Stretch"> | |
79 | + <textField> | |
80 | + <reportElement x="50" y="0" width="100" height="30" uuid="787886f9-1be7-4846-8f6f-a276f0f03851"/> | |
81 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
82 | + <textFieldExpression><![CDATA[$F{materialCode}]]></textFieldExpression> | |
83 | + </textField> | |
84 | + <textField> | |
85 | + <reportElement x="150" y="-3" width="100" height="30" uuid="40e1a9b7-0427-4a28-b83b-96c590733e6b"/> | |
86 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
87 | + <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> | |
88 | + </textField> | |
89 | + <textField> | |
90 | + <reportElement x="250" y="0" width="100" height="30" uuid="b79c0ba5-c219-426a-bc56-0f68db3ae8fc"/> | |
91 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
92 | + <textFieldExpression><![CDATA[$F{spec}]]></textFieldExpression> | |
93 | + </textField> | |
94 | + <textField> | |
95 | + <reportElement x="350" y="1" width="100" height="30" uuid="9d3f5b1f-9224-4cc7-8676-3cdb10463341"/> | |
96 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
97 | + <textFieldExpression><![CDATA[$F{taskQty}]]></textFieldExpression> | |
98 | + </textField> | |
99 | + </band> | |
100 | + </detail> | |
101 | + <columnFooter> | |
102 | + <band splitType="Stretch"/> | |
103 | + </columnFooter> | |
104 | + <pageFooter> | |
105 | + <band height="27" splitType="Stretch"> | |
106 | + <textField> | |
107 | + <reportElement x="475" y="-3" width="100" height="30" uuid="a7a31527-f442-4b48-8e9a-d824c755f6f5"/> | |
108 | + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> | |
109 | + </textField> | |
110 | + </band> | |
111 | + </pageFooter> | |
112 | + <summary> | |
113 | + <band height="42" splitType="Stretch"/> | |
114 | + </summary> | |
115 | +</jasperReport> | |
... | ... |
src/main/resources/jaspers/inventoryTransS.jasper
0 → 100644
No preview for this file type
src/main/resources/jaspers/inventoryTransS.jrxml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!-- Created with Jaspersoft Studio version 6.10.0.final using JasperReports Library version 6.10.0-unknown --> | |
3 | +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="inventoryTrans" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="021febb9-ba92-4db2-a4e7-e9e7f112e792"> | |
4 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
5 | + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="myAdapter"/> | |
6 | + <queryString language="SQL"> | |
7 | + <![CDATA[SELECT i.materialCode,m.name,m.spec,SUM(i.taskQty) taskQty from inventory_transaction i INNER JOIN material m | |
8 | +on i.materialCode=m.code and (i.transactionType=30 or i.transactionType=40) and i.created >date_sub(curdate(), INTERVAL 30 DAY) GROUP BY i.materialCode,m.name,m.spec ORDER BY taskQty desc]]> | |
9 | + </queryString> | |
10 | + <field name="materialCode" class="java.lang.String"> | |
11 | + <property name="com.jaspersoft.studio.field.label" value="materialCode"/> | |
12 | + <property name="com.jaspersoft.studio.field.tree.path" value="inventory_transaction"/> | |
13 | + </field> | |
14 | + <field name="name" class="java.lang.String"> | |
15 | + <property name="com.jaspersoft.studio.field.label" value="name"/> | |
16 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
17 | + </field> | |
18 | + <field name="spec" class="java.lang.String"> | |
19 | + <property name="com.jaspersoft.studio.field.label" value="spec"/> | |
20 | + <property name="com.jaspersoft.studio.field.tree.path" value="material"/> | |
21 | + </field> | |
22 | + <field name="taskQty" class="java.math.BigDecimal"> | |
23 | + <property name="com.jaspersoft.studio.field.label" value="taskQty"/> | |
24 | + </field> | |
25 | + <background> | |
26 | + <band splitType="Stretch"/> | |
27 | + </background> | |
28 | + <title> | |
29 | + <band height="79" splitType="Stretch"> | |
30 | + <staticText> | |
31 | + <reportElement x="220" y="30" width="100" height="30" uuid="5d01f7b9-e2ba-45ca-a815-1c88383d0ea2"/> | |
32 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
33 | + <font size="16"/> | |
34 | + </textElement> | |
35 | + <text><![CDATA[华恒库存出库交易]]></text> | |
36 | + </staticText> | |
37 | + </band> | |
38 | + </title> | |
39 | + <pageHeader> | |
40 | + <band height="48" splitType="Stretch"> | |
41 | + <staticText> | |
42 | + <reportElement x="160" y="10" width="100" height="30" uuid="2eb87fc1-1cba-45f2-ba32-d01503be359b"/> | |
43 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
44 | + <text><![CDATA[时间]]></text> | |
45 | + </staticText> | |
46 | + <textField pattern="MMMMM dd, yyyy"> | |
47 | + <reportElement x="260" y="10" width="100" height="30" uuid="e7d28891-6914-40c2-bdf7-17e375670c3b"/> | |
48 | + <textElement verticalAlignment="Middle"/> | |
49 | + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> | |
50 | + </textField> | |
51 | + </band> | |
52 | + </pageHeader> | |
53 | + <columnHeader> | |
54 | + <band height="33" splitType="Stretch"> | |
55 | + <staticText> | |
56 | + <reportElement x="250" y="0" width="100" height="30" uuid="b98a1182-05b6-47de-b42d-93ab5a24d5a6"/> | |
57 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
58 | + <text><![CDATA[物料规格]]></text> | |
59 | + </staticText> | |
60 | + <staticText> | |
61 | + <reportElement x="350" y="3" width="100" height="30" uuid="217e8701-9f23-4602-857b-b3cc117b5c1b"/> | |
62 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
63 | + <text><![CDATA[数量]]></text> | |
64 | + </staticText> | |
65 | + <staticText> | |
66 | + <reportElement x="150" y="0" width="100" height="30" uuid="e48a2bea-beb0-4919-b982-77ddc8ca6808"/> | |
67 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
68 | + <text><![CDATA[物料名称]]></text> | |
69 | + </staticText> | |
70 | + <staticText> | |
71 | + <reportElement x="50" y="0" width="100" height="30" uuid="aa71cbe5-b6e3-4cfe-92d6-b6c5c5e2c402"/> | |
72 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
73 | + <text><![CDATA[物料编码]]></text> | |
74 | + </staticText> | |
75 | + </band> | |
76 | + </columnHeader> | |
77 | + <detail> | |
78 | + <band height="33" splitType="Stretch"> | |
79 | + <textField> | |
80 | + <reportElement x="50" y="0" width="100" height="30" uuid="787886f9-1be7-4846-8f6f-a276f0f03851"/> | |
81 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
82 | + <textFieldExpression><![CDATA[$F{materialCode}]]></textFieldExpression> | |
83 | + </textField> | |
84 | + <textField> | |
85 | + <reportElement x="150" y="-3" width="100" height="30" uuid="40e1a9b7-0427-4a28-b83b-96c590733e6b"/> | |
86 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
87 | + <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> | |
88 | + </textField> | |
89 | + <textField> | |
90 | + <reportElement x="250" y="0" width="100" height="30" uuid="b79c0ba5-c219-426a-bc56-0f68db3ae8fc"/> | |
91 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
92 | + <textFieldExpression><![CDATA[$F{spec}]]></textFieldExpression> | |
93 | + </textField> | |
94 | + <textField> | |
95 | + <reportElement x="350" y="1" width="100" height="30" uuid="9d3f5b1f-9224-4cc7-8676-3cdb10463341"/> | |
96 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
97 | + <textFieldExpression><![CDATA[$F{taskQty}]]></textFieldExpression> | |
98 | + </textField> | |
99 | + </band> | |
100 | + </detail> | |
101 | + <columnFooter> | |
102 | + <band splitType="Stretch"/> | |
103 | + </columnFooter> | |
104 | + <pageFooter> | |
105 | + <band height="27" splitType="Stretch"> | |
106 | + <textField> | |
107 | + <reportElement x="475" y="-3" width="100" height="30" uuid="a7a31527-f442-4b48-8e9a-d824c755f6f5"/> | |
108 | + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> | |
109 | + </textField> | |
110 | + </band> | |
111 | + </pageFooter> | |
112 | + <summary> | |
113 | + <band height="42" splitType="Stretch"/> | |
114 | + </summary> | |
115 | +</jasperReport> | |
... | ... |
src/main/resources/jaspers/mypage.jrxml deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<!-- Created with Jaspersoft Studio version 6.10.0.final using JasperReports Library version 6.10.0-unknown --> | |
3 | -<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="mypage" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="269017e1-91e2-41c1-8c72-e94c48e4265a"> | |
4 | - <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
5 | - <property name="com.jaspersoft.studio.data.defaultdataadapter" value="myAdapter"/> | |
6 | - <queryString language="SQL"> | |
7 | - <![CDATA[select id, | |
8 | -materialCode, | |
9 | -locationCode, | |
10 | -qty, | |
11 | -inventorySts, | |
12 | -TIMESTAMPDIFF(DAY,created,NOW()) as time | |
13 | -from | |
14 | -inventory_detail]]> | |
15 | - </queryString> | |
16 | - <field name="id" class="java.lang.Integer"> | |
17 | - <property name="com.jaspersoft.studio.field.label" value="id"/> | |
18 | - <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
19 | - </field> | |
20 | - <field name="materialCode" class="java.lang.String"> | |
21 | - <property name="com.jaspersoft.studio.field.label" value="materialCode"/> | |
22 | - <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
23 | - </field> | |
24 | - <field name="locationCode" class="java.lang.String"> | |
25 | - <property name="com.jaspersoft.studio.field.label" value="locationCode"/> | |
26 | - <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
27 | - </field> | |
28 | - <field name="qty" class="java.math.BigDecimal"> | |
29 | - <property name="com.jaspersoft.studio.field.label" value="qty"/> | |
30 | - <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
31 | - </field> | |
32 | - <field name="inventorySts" class="java.lang.String"> | |
33 | - <property name="com.jaspersoft.studio.field.label" value="inventorySts"/> | |
34 | - <property name="com.jaspersoft.studio.field.tree.path" value="inventory_detail"/> | |
35 | - </field> | |
36 | - <field name="time" class="java.lang.Long"> | |
37 | - <property name="com.jaspersoft.studio.field.label" value="time"/> | |
38 | - </field> | |
39 | - <background> | |
40 | - <band splitType="Stretch"/> | |
41 | - </background> | |
42 | - <title> | |
43 | - <band height="79" splitType="Stretch"> | |
44 | - <staticText> | |
45 | - <reportElement x="220" y="30" width="100" height="30" isRemoveLineWhenBlank="true" uuid="8b09e723-8b9c-4cf0-8797-cadf3e5b6af5"/> | |
46 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
47 | - <font fontName="华文宋体" size="20"/> | |
48 | - </textElement> | |
49 | - <text><![CDATA[库存报表]]></text> | |
50 | - </staticText> | |
51 | - </band> | |
52 | - </title> | |
53 | - <pageHeader> | |
54 | - <band height="40" splitType="Stretch"> | |
55 | - <staticText> | |
56 | - <reportElement x="-10" y="6" width="100" height="30" isRemoveLineWhenBlank="true" uuid="3255876e-83de-41f7-ac80-c0e0002183d8"/> | |
57 | - <textElement textAlignment="Right" verticalAlignment="Middle"> | |
58 | - <font fontName="华文宋体" size="10"/> | |
59 | - </textElement> | |
60 | - <text><![CDATA[公司:]]></text> | |
61 | - </staticText> | |
62 | - <staticText> | |
63 | - <reportElement x="90" y="6" width="100" height="30" isRemoveLineWhenBlank="true" uuid="d7fe09d1-e13b-4c2c-8370-8ab5f4fe27e0"/> | |
64 | - <textElement textAlignment="Left" verticalAlignment="Middle"> | |
65 | - <font fontName="华文宋体" size="10"/> | |
66 | - </textElement> | |
67 | - <text><![CDATA[华恒机器人]]></text> | |
68 | - </staticText> | |
69 | - <staticText> | |
70 | - <reportElement x="340" y="5" width="100" height="30" isRemoveLineWhenBlank="true" uuid="129192ee-63ff-42ac-bad8-6ea886aa7df1"/> | |
71 | - <textElement textAlignment="Right" verticalAlignment="Middle"> | |
72 | - <font fontName="华文宋体" size="10"/> | |
73 | - </textElement> | |
74 | - <text><![CDATA[时间:]]></text> | |
75 | - </staticText> | |
76 | - <textField pattern="MMMMM dd, yyyy"> | |
77 | - <reportElement x="440" y="5" width="100" height="30" isRemoveLineWhenBlank="true" uuid="0e9b0a78-271c-46c3-a9a5-ada603e1d586"/> | |
78 | - <textElement textAlignment="Left" verticalAlignment="Middle"> | |
79 | - <font fontName="华文宋体" size="10"/> | |
80 | - </textElement> | |
81 | - <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> | |
82 | - </textField> | |
83 | - </band> | |
84 | - </pageHeader> | |
85 | - <columnHeader> | |
86 | - <band height="40" splitType="Stretch"> | |
87 | - <staticText> | |
88 | - <reportElement x="-20" y="10" width="90" height="30" isRemoveLineWhenBlank="true" uuid="a46711b9-185c-4f72-8ba4-3913cf7ffa36"/> | |
89 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
90 | - <font fontName="华文宋体" size="10"/> | |
91 | - </textElement> | |
92 | - <text><![CDATA[序号]]></text> | |
93 | - </staticText> | |
94 | - <staticText> | |
95 | - <reportElement x="70" y="10" width="100" height="30" isRemoveLineWhenBlank="true" uuid="316c901d-5d62-4cf9-96b0-9292282b83d4"/> | |
96 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
97 | - <font fontName="华文宋体" size="10"/> | |
98 | - </textElement> | |
99 | - <text><![CDATA[物料]]></text> | |
100 | - </staticText> | |
101 | - <staticText> | |
102 | - <reportElement x="170" y="10" width="100" height="30" isRemoveLineWhenBlank="true" uuid="d2889df8-acf6-42f3-baf8-cee479d95744"/> | |
103 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
104 | - <font fontName="华文宋体" size="10"/> | |
105 | - </textElement> | |
106 | - <text><![CDATA[库位]]></text> | |
107 | - </staticText> | |
108 | - <staticText> | |
109 | - <reportElement x="270" y="10" width="100" height="30" isRemoveLineWhenBlank="true" uuid="648755a4-c6e4-4d43-842f-cbbcccf3b602"/> | |
110 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
111 | - <font fontName="华文宋体" size="10"/> | |
112 | - </textElement> | |
113 | - <text><![CDATA[数量]]></text> | |
114 | - </staticText> | |
115 | - <staticText> | |
116 | - <reportElement x="370" y="10" width="100" height="30" isRemoveLineWhenBlank="true" uuid="7400f621-cdcc-4c01-affc-b5247c64c279"/> | |
117 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
118 | - <font fontName="华文宋体" size="10"/> | |
119 | - </textElement> | |
120 | - <text><![CDATA[状态]]></text> | |
121 | - </staticText> | |
122 | - <staticText> | |
123 | - <reportElement x="470" y="10" width="100" height="30" isRemoveLineWhenBlank="true" uuid="445b4f01-fe14-4433-a239-3a9ce548b9a2"/> | |
124 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
125 | - <font fontName="华文宋体" size="10"/> | |
126 | - </textElement> | |
127 | - <text><![CDATA[距今时间]]></text> | |
128 | - </staticText> | |
129 | - </band> | |
130 | - </columnHeader> | |
131 | - <detail> | |
132 | - <band height="31" splitType="Stretch"> | |
133 | - <textField> | |
134 | - <reportElement x="-20" y="0" width="90" height="30" isRemoveLineWhenBlank="true" uuid="8c955db5-fc66-441b-863c-92d5f92120b3"/> | |
135 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
136 | - <font fontName="华文宋体" size="10"/> | |
137 | - </textElement> | |
138 | - <textFieldExpression><![CDATA[$F{id}]]></textFieldExpression> | |
139 | - </textField> | |
140 | - <textField> | |
141 | - <reportElement x="70" y="0" width="100" height="30" isRemoveLineWhenBlank="true" uuid="a45ff2e7-b85b-42d3-a2e6-30e5e78e4979"/> | |
142 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
143 | - <font fontName="华文宋体" size="10"/> | |
144 | - </textElement> | |
145 | - <textFieldExpression><![CDATA[$F{materialCode}]]></textFieldExpression> | |
146 | - </textField> | |
147 | - <textField> | |
148 | - <reportElement x="170" y="0" width="100" height="30" isRemoveLineWhenBlank="true" uuid="5225baa7-39e2-4e37-8905-f0be6c22383e"/> | |
149 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
150 | - <font fontName="华文宋体" size="10"/> | |
151 | - </textElement> | |
152 | - <textFieldExpression><![CDATA[$F{locationCode}]]></textFieldExpression> | |
153 | - </textField> | |
154 | - <textField> | |
155 | - <reportElement x="270" y="0" width="100" height="30" isRemoveLineWhenBlank="true" uuid="9db2444d-b495-40aa-bee9-cd5b86b709b2"/> | |
156 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
157 | - <font fontName="华文宋体" size="10"/> | |
158 | - </textElement> | |
159 | - <textFieldExpression><![CDATA[$F{qty}]]></textFieldExpression> | |
160 | - </textField> | |
161 | - <textField> | |
162 | - <reportElement x="370" y="0" width="100" height="30" isRemoveLineWhenBlank="true" uuid="13b8f525-a4f3-4d10-9056-934b6ceb8baa"/> | |
163 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
164 | - <font fontName="华文宋体" size="10"/> | |
165 | - </textElement> | |
166 | - <textFieldExpression><![CDATA[$F{inventorySts}]]></textFieldExpression> | |
167 | - </textField> | |
168 | - <textField> | |
169 | - <reportElement x="470" y="0" width="100" height="30" isRemoveLineWhenBlank="true" uuid="17b64d38-bd90-49e7-9547-356eec6efb1f"/> | |
170 | - <textElement textAlignment="Center" verticalAlignment="Middle"> | |
171 | - <font fontName="华文宋体" size="10"/> | |
172 | - </textElement> | |
173 | - <textFieldExpression><![CDATA[$F{time}]]></textFieldExpression> | |
174 | - </textField> | |
175 | - </band> | |
176 | - </detail> | |
177 | - <columnFooter> | |
178 | - <band height="45" splitType="Stretch"/> | |
179 | - </columnFooter> | |
180 | - <pageFooter> | |
181 | - <band height="54" splitType="Stretch"/> | |
182 | - </pageFooter> | |
183 | - <summary> | |
184 | - <band height="42" splitType="Stretch"/> | |
185 | - </summary> | |
186 | -</jasperReport> |
src/main/resources/jaspers/task.jasper
0 → 100644
No preview for this file type
src/main/resources/jaspers/task.jrxml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!-- Created with Jaspersoft Studio version 6.10.0.final using JasperReports Library version 6.10.0-unknown --> | |
3 | +<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="task" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="baf55988-0610-49d8-946e-683c7bdbd023"> | |
4 | + <property name="com.jaspersoft.studio.data.sql.tables" value=""/> | |
5 | + <property name="com.jaspersoft.studio.data.defaultdataadapter" value="myAdapter"/> | |
6 | + <queryString language="SQL"> | |
7 | + <![CDATA[SELECT s.userName,COUNT(t.createdBy) count from task_header t INNER JOIN sys_user s on t.createdBy=s.loginName and created >date_sub(curdate(), INTERVAL 30 DAY) GROUP BY s.userName ORDER BY count desc]]> | |
8 | + </queryString> | |
9 | + <field name="userName" class="java.lang.String"> | |
10 | + <property name="com.jaspersoft.studio.field.label" value="userName"/> | |
11 | + <property name="com.jaspersoft.studio.field.tree.path" value="sys_user"/> | |
12 | + </field> | |
13 | + <field name="count" class="java.lang.Long"> | |
14 | + <property name="com.jaspersoft.studio.field.label" value="count"/> | |
15 | + </field> | |
16 | + <background> | |
17 | + <band splitType="Stretch"/> | |
18 | + </background> | |
19 | + <title> | |
20 | + <band height="79" splitType="Stretch"> | |
21 | + <staticText> | |
22 | + <reportElement x="207" y="30" width="140" height="30" uuid="a0a599c3-7454-46d2-83ac-9ebddabddbe6"/> | |
23 | + <textElement textAlignment="Center" verticalAlignment="Middle"> | |
24 | + <font size="20"/> | |
25 | + </textElement> | |
26 | + <text><![CDATA[任务执行次数]]></text> | |
27 | + </staticText> | |
28 | + </band> | |
29 | + </title> | |
30 | + <pageHeader> | |
31 | + <band height="30" splitType="Stretch"> | |
32 | + <staticText> | |
33 | + <reportElement x="160" y="0" width="100" height="30" uuid="3fc9dcd1-959b-4520-8333-9f2ce2047ef1"/> | |
34 | + <textElement textAlignment="Right" verticalAlignment="Middle"/> | |
35 | + <text><![CDATA[日期:]]></text> | |
36 | + </staticText> | |
37 | + <textField pattern="MMMMM dd, yyyy"> | |
38 | + <reportElement x="260" y="0" width="100" height="30" uuid="ad4b28fb-a670-49f3-be63-d7413f000efb"/> | |
39 | + <textElement textAlignment="Left" verticalAlignment="Middle"/> | |
40 | + <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> | |
41 | + </textField> | |
42 | + </band> | |
43 | + </pageHeader> | |
44 | + <columnHeader> | |
45 | + <band height="45" splitType="Stretch"> | |
46 | + <staticText> | |
47 | + <reportElement x="180" y="10" width="100" height="30" uuid="ce9fe089-7e3a-4c11-8f2b-68d6739baa75"/> | |
48 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
49 | + <text><![CDATA[操作人员]]></text> | |
50 | + </staticText> | |
51 | + <staticText> | |
52 | + <reportElement x="280" y="10" width="100" height="30" uuid="6771fd49-0265-4033-bdb4-e1df20730ad2"/> | |
53 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
54 | + <text><![CDATA[次数]]></text> | |
55 | + </staticText> | |
56 | + </band> | |
57 | + </columnHeader> | |
58 | + <detail> | |
59 | + <band height="30" splitType="Stretch"> | |
60 | + <textField> | |
61 | + <reportElement x="180" y="0" width="100" height="30" uuid="08384a0d-8f3f-466b-bfad-9853ba264241"/> | |
62 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
63 | + <textFieldExpression><![CDATA[$F{userName}]]></textFieldExpression> | |
64 | + </textField> | |
65 | + <textField> | |
66 | + <reportElement x="280" y="0" width="100" height="30" uuid="615d7de2-4187-44e4-b936-d8c6cf5e7dc0"/> | |
67 | + <textElement textAlignment="Center" verticalAlignment="Middle"/> | |
68 | + <textFieldExpression><![CDATA[$F{count}]]></textFieldExpression> | |
69 | + </textField> | |
70 | + </band> | |
71 | + </detail> | |
72 | + <columnFooter> | |
73 | + <band height="3" splitType="Stretch"/> | |
74 | + </columnFooter> | |
75 | + <pageFooter> | |
76 | + <band height="31" splitType="Stretch"> | |
77 | + <textField> | |
78 | + <reportElement x="470" y="-3" width="100" height="30" uuid="7f9bd68b-4857-4ebe-afca-a60a3a9ac1d8"/> | |
79 | + <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression> | |
80 | + </textField> | |
81 | + </band> | |
82 | + </pageFooter> | |
83 | + <summary> | |
84 | + <band height="42" splitType="Stretch"/> | |
85 | + </summary> | |
86 | +</jasperReport> | |
... | ... |
src/main/resources/templates/receipt/receiptHeader/report.html
... | ... | @@ -4,14 +4,14 @@ |
4 | 4 | <head th:include="include :: header"></head> |
5 | 5 | <body class="white-bg" style="padding:5px 0;" id="ddd"> |
6 | 6 | <div class="container" style="color: #333;"> |
7 | - <div class="row"> | |
7 | + <div class="row"> | |
8 | 8 | <table id="reportTable" width="100%" border="0" cellspacing="0" cellpadding="0" class="dy-report"> |
9 | 9 | <thead style="display:table-header-group;"> |
10 | 10 | <tr> |
11 | 11 | <td colspan="7"> |
12 | 12 | <span style="padding-top:40px;width: 40%; float:left;" th:text="${#dates.format(receiptHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span> |
13 | 13 | <h2 style="width:20%;text-align:center;float:left;padding-top:10px;">入库单</h2> |
14 | - <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="receiptCode" th:data="${receiptHeader['code']}"></img></span> | |
14 | + <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="receiptCode" th:src="@{'/image/'+${receiptHeader.code}}"></span> | |
15 | 15 | </td> |
16 | 16 | </tr> |
17 | 17 | <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> |
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | <td th:text="${row.lot}"></td> |
42 | 42 | <td th:text="${row.projectNo}"></td> |
43 | 43 | <td th:text="${row.totalQty}"></td> |
44 | - <td><img></img></td> | |
44 | + <td><img th:src="@{'/image/'+${row.materialCode}}"></td> | |
45 | 45 | </tr> |
46 | 46 | </tbody> |
47 | 47 | </table> |
... | ... | @@ -49,38 +49,38 @@ |
49 | 49 | </div> |
50 | 50 | <div th:include="include :: footer"></div> |
51 | 51 | <script type="text/javascript" src="../../../js/barcode/JsBarcode.all.js"></script> |
52 | +<script type="text/javascript" src="//static.runoob.com/assets/qrcode/qrcode.min.js"></script> | |
52 | 53 | <script th:inline="javascript"> |
53 | 54 | |
54 | 55 | var barcodeStyle = { |
55 | - format: "CODE128",//选择要使用的条形码类型 | |
56 | - width:1,//设置条之间的宽度 | |
57 | - height:40,//高度 | |
58 | - displayValue:true,//是否在条形码下方显示文字 | |
59 | - // text:"456",//覆盖显示的文本 | |
60 | - // fontOptions:"bold italic",//使文字加粗体或变斜体 | |
61 | - font:"monospace",//设置文本的字体fantasy | |
62 | - textAlign:"center",//设置文本的水平对齐方式 | |
63 | - textPosition:"bottom",//设置文本的垂直位置 | |
64 | - textMargin:1,//设置条形码和文本之间的间距 | |
65 | - fontSize:12,//设置文本的大小 | |
66 | - background:"#ffffff",//设置条形码的背景 | |
67 | - lineColor:"#000000",//设置条和文本的颜色。 | |
68 | - margin:1//设置条形码周围的空白边距 | |
56 | + format: "CODE128",//选择要使用的条形码类型 | |
57 | + width:1,//设置条之间的宽度 | |
58 | + height:40,//高度 | |
59 | + displayValue:true,//是否在条形码下方显示文字 | |
60 | + // text:"456",//覆盖显示的文本 | |
61 | + // fontOptions:"bold italic",//使文字加粗体或变斜体 | |
62 | + font:"monospace",//设置文本的字体fantasy | |
63 | + textAlign:"center",//设置文本的水平对齐方式 | |
64 | + textPosition:"bottom",//设置文本的垂直位置 | |
65 | + textMargin:1,//设置条形码和文本之间的间距 | |
66 | + fontSize:12,//设置文本的大小 | |
67 | + background:"#ffffff",//设置条形码的背景 | |
68 | + lineColor:"#000000",//设置条和文本的颜色。 | |
69 | + margin:1//设置条形码周围的空白边距 | |
69 | 70 | }; |
70 | 71 | |
71 | - $("#receiptCode").JsBarcode($("#receiptCode").attr("data"), barcodeStyle); | |
72 | + // $("#receiptCode").JsBarcode($("#receiptCode").attr("data"), barcodeStyle); | |
72 | 73 | |
73 | 74 | // for (var i=0; i<$('#reportTable tbody tr').length; i++){ |
74 | 75 | // var barcodeText = $("#reportTable tbody tr:eq("+ i +") td:eq(0)").innerText; |
75 | 76 | // $("#reportTable tbody tr:eq("+ i +") td:eq(6) canvas").JsBarcode("6666", barcodeStyle); |
76 | 77 | // } |
77 | 78 | |
78 | - $('#reportTable tbody tr').each(function(i) { | |
79 | - var barcodeText = $(this).children()[0].innerText; | |
80 | - JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle); | |
81 | - }); | |
82 | - | |
83 | - | |
79 | + // $('#reportTable tbody tr').each(function(i) { | |
80 | + // var barcodeText = $(this).children()[0].innerText; | |
81 | + // JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle); | |
82 | + // }); | |
83 | + // | |
84 | 84 | </script> |
85 | 85 | <style type="text/css"> |
86 | 86 | @media print { |
... | ... |
src/main/resources/templates/report/excelReport/excelReport.html
... | ... | @@ -24,8 +24,8 @@ |
24 | 24 | var exportFlag = [[${@permission.hasPermi('report:excelReport:export')}]]; |
25 | 25 | var editFlag = [[${@permission.hasPermi('report:excelReport:edit')}]]; |
26 | 26 | var removeFlag = [[${@permission.hasPermi('report:excelReport:remove')}]]; |
27 | - var prefix = ctx + "report/excelReport" | |
28 | - // var datas = [[${@dict.getType('sys_normal_disable')}]]; | |
27 | + var prefix = ctx + "report/excelReport"; | |
28 | + | |
29 | 29 | $(function() { |
30 | 30 | var options = { |
31 | 31 | url: prefix + "/list", |
... | ... |
src/main/resources/templates/shipment/shipmentHeader/report.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <td colspan="7"> |
12 | 12 | <span style="padding-top:40px;width: 40%; float:left;" th:text="${#dates.format(shipmentHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span> |
13 | 13 | <h2 style="width:20%;text-align:center;float:left;padding-top:10px;">出库单</h2> |
14 | - <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="shipmentCode" th:data="${shipmentHeader['code']}"></img></span> | |
14 | + <span style="padding-top:20px;width:38%;float:right; text-align: right"><img id="shipmentCode" th:src="@{'/image/'+${shipmentHeader.code}}"></span> | |
15 | 15 | </td> |
16 | 16 | </tr> |
17 | 17 | <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> |
... | ... | @@ -27,11 +27,11 @@ |
27 | 27 | <tr> |
28 | 28 | <th width="18%">存货编码</th> |
29 | 29 | <th width="22%">物料名称</th> |
30 | - <th width="15%">物料规格</th> | |
31 | - <th width="5%">批次</th> | |
32 | - <th width="5%">批号</th> | |
33 | - <th width="5%">项目号</th> | |
34 | - <th width="9%">数量</th> | |
30 | + <!-- <th width="10%">物料规格</th>--> | |
31 | + <th width="9%">批次</th> | |
32 | + <th width="11%">批号</th> | |
33 | + <th width="9%">项目号</th> | |
34 | + <th width="8%">数量</th> | |
35 | 35 | <th width="21%">条码</th> |
36 | 36 | </tr> |
37 | 37 | </thead> |
... | ... | @@ -39,12 +39,12 @@ |
39 | 39 | <tr th:each="row,rowStat : ${details}"> |
40 | 40 | <td th:text="${row.materialCode}"></td> |
41 | 41 | <td th:text="${row.materialName}"></td> |
42 | - <td th:text="${row.materialSpec}"></td> | |
42 | + <!-- <td th:text="${row.materialSpec}"></td>--> | |
43 | 43 | <td th:text="${row.batch}"></td> |
44 | 44 | <td th:text="${row.lot}"></td> |
45 | 45 | <td th:text="${row.projectNo}"></td> |
46 | 46 | <td th:text="${row.shipQty}"></td> |
47 | - <td><img></img></td> | |
47 | + <td><img th:src="@{'/image/'+${row.materialCode}}"></td> | |
48 | 48 | </tr> |
49 | 49 | </tbody> |
50 | 50 | </table> |
... | ... | @@ -54,34 +54,34 @@ |
54 | 54 | <script type="text/javascript" src="../../../js/barcode/JsBarcode.all.js"></script> |
55 | 55 | <script th:inline="javascript"> |
56 | 56 | |
57 | - var barcodeStyle = { | |
58 | - format: "CODE128",//选择要使用的条形码类型 | |
59 | - width:1,//设置条之间的宽度 | |
60 | - height:40,//高度 | |
61 | - displayValue:true,//是否在条形码下方显示文字 | |
62 | - // text:"456",//覆盖显示的文本 | |
63 | - // fontOptions:"bold italic",//使文字加粗体或变斜体 | |
64 | - font:"monospace",//设置文本的字体fantasy | |
65 | - textAlign:"center",//设置文本的水平对齐方式 | |
66 | - textPosition:"bottom",//设置文本的垂直位置 | |
67 | - textMargin:1,//设置条形码和文本之间的间距 | |
68 | - fontSize:12,//设置文本的大小 | |
69 | - background:"#ffffff",//设置条形码的背景 | |
70 | - lineColor:"#000000",//设置条和文本的颜色。 | |
71 | - margin:1//设置条形码周围的空白边距 | |
72 | - }; | |
57 | + // var barcodeStyle = { | |
58 | + // format: "CODE128",//选择要使用的条形码类型 | |
59 | + // width:1,//设置条之间的宽度 | |
60 | + // height:40,//高度 | |
61 | + // displayValue:true,//是否在条形码下方显示文字 | |
62 | + // // text:"456",//覆盖显示的文本 | |
63 | + // // fontOptions:"bold italic",//使文字加粗体或变斜体 | |
64 | + // font:"monospace",//设置文本的字体fantasy | |
65 | + // textAlign:"center",//设置文本的水平对齐方式 | |
66 | + // textPosition:"bottom",//设置文本的垂直位置 | |
67 | + // textMargin:1,//设置条形码和文本之间的间距 | |
68 | + // fontSize:12,//设置文本的大小 | |
69 | + // background:"#ffffff",//设置条形码的背景 | |
70 | + // lineColor:"#000000",//设置条和文本的颜色。 | |
71 | + // margin:1//设置条形码周围的空白边距 | |
72 | + // }; | |
73 | 73 | |
74 | - $("#shipmentCode").JsBarcode($("#shipmentCode").attr("data"), barcodeStyle); | |
74 | + // $("#shipmentCode").JsBarcode($("#shipmentCode").attr("data"), barcodeStyle); | |
75 | 75 | |
76 | 76 | // for (var i=0; i<$('#reportTable tbody tr').length; i++){ |
77 | 77 | // var barcodeText = $("#reportTable tbody tr:eq("+ i +") td:eq(0)").innerText; |
78 | 78 | // $("#reportTable tbody tr:eq("+ i +") td:eq(6) canvas").JsBarcode("6666", barcodeStyle); |
79 | 79 | // } |
80 | 80 | |
81 | - $('#reportTable tbody tr').each(function(i) { | |
82 | - var barcodeText = $(this).children()[0].innerText; | |
83 | - JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle); | |
84 | - }); | |
81 | + // $('#reportTable tbody tr').each(function(i) { | |
82 | + // var barcodeText = $(this).children()[0].innerText; | |
83 | + // JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle); | |
84 | + // }); | |
85 | 85 | |
86 | 86 | |
87 | 87 | </script> |
... | ... |