Browse Source

20210322v1.3

recovery
zy_Java 4 years ago
parent
commit
c2a9f468b3
  1. 4
      beneficiation/src/main/resources/application.yml
  2. 2
      cloudutil/src/main/resources/application-util-prod.yml
  3. 1
      cloudutil/src/main/resources/application-util-test.yml
  4. 2
      game/src/main/resources/application-prod.yml
  5. 2
      game/src/main/resources/application-prodsd.yml
  6. 2
      game/src/main/resources/application.yml
  7. 2
      ht/src/main/resources/application-prod.yml
  8. 2
      mt/src/main/resources/application-dev.yml
  9. 4
      mt/src/main/resources/application.yml
  10. 35
      ocr/pom.xml
  11. 24
      ocr/src/main/java/com/ccsens/orc/OcrApplication.java
  12. 28
      ocr/src/main/resources/application-common.yml
  13. 41
      ocr/src/main/resources/application-dev.yml
  14. 39
      ocr/src/main/resources/application-greenvalley.yml
  15. 48
      ocr/src/main/resources/application-prod.yml
  16. 44
      ocr/src/main/resources/application-prodapi.yml
  17. 44
      ocr/src/main/resources/application-prodsd.yml
  18. 51
      ocr/src/main/resources/application-test.yml
  19. 5
      ocr/src/main/resources/application.yml
  20. 21
      ocr/src/main/resources/banner.txt
  21. 196
      ocr/src/main/resources/logback-spring.xml
  22. 61
      ocr/src/test/java/com/ccsens/orc/test/OrcTest.java
  23. 7
      pom.xml
  24. 23
      tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java
  25. 39
      tall/src/main/java/com/ccsens/tall/bean/dto/LwbsDto.java
  26. 2
      tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java
  27. 117
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputDoc.java
  28. 761
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputDocExample.java
  29. 106
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecord.java
  30. 681
      tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecordExample.java
  31. 52
      tall/src/main/java/com/ccsens/tall/bean/vo/LwbsVo.java
  32. 2
      tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java
  33. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskInputDocMapper.java
  34. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskInputRecordMapper.java
  35. 101
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  36. 12
      tall/src/main/java/com/ccsens/tall/service/IInputDocService.java
  37. 3
      tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java
  38. 60
      tall/src/main/java/com/ccsens/tall/service/InputDocService.java
  39. 16
      tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java
  40. 42
      tall/src/main/java/com/ccsens/tall/web/InputDocController.java
  41. 6
      tall/src/main/java/com/ccsens/tall/web/LogController.java
  42. 48
      tall/src/main/java/com/ccsens/tall/web/LwbsController.java
  43. 1
      tall/src/main/resources/application-dev.yml
  44. 2
      tall/src/main/resources/application-prodsd.yml
  45. 2
      tall/src/main/resources/application-test.yml
  46. 276
      tall/src/main/resources/mapper_raw/ProTaskInputDocMapper.xml
  47. 258
      tall/src/main/resources/mapper_raw/ProTaskInputRecordMapper.xml
  48. 1
      util/src/main/java/com/ccsens/util/PoiUtil.java
  49. 5
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/RecordDto.java
  50. 5
      wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/RecordVo.java
  51. 11
      wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/WisdomCarRecordDao.java
  52. 64
      wisdomcar/src/main/java/com/ccsens/wisdomcar/service/RecordService.java
  53. 2
      wisdomcar/src/main/resources/application-test.yml
  54. 27
      wisdomcar/src/main/resources/mapper_dao/WisdomCarRecordDao.xml

4
beneficiation/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: test
include: common, util-test
active: prod
include: common, util-prod

2
cloudutil/src/main/resources/application-util-prod.yml

@ -22,7 +22,7 @@ eureka:
#defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/
# defaultZone: http://admin:admin@81.70.54.64:7010/eureka/
defaultZone: http://admin:admin@192.144.182.42:7010/eureka/
defaultZone: http://admin:admin@121.36.3.207:7010/eureka/
instance:
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server

1
cloudutil/src/main/resources/application-util-test.yml

@ -84,6 +84,7 @@ eureka:
#defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/
# defaultZone: http://admin:admin@49.232.6.143:7010/eureka/
# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/
defaultZone: http://admin:admin@192.168.31.13:7010/eureka/
# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/
instance:

2
game/src/main/resources/application-prod.yml

@ -32,7 +32,7 @@ swagger:
enable: true
eureka:
instance:
ip-address: 192.144.182.42
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/

2
game/src/main/resources/application-prodsd.yml

@ -31,7 +31,7 @@ swagger:
enable: true
eureka:
instance:
ip-address: 81.70.54.64
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/

2
game/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: prodapi
active: prod
include: common, util-prod

2
ht/src/main/resources/application-prod.yml

@ -39,5 +39,5 @@ ht:
name: 认知功能评测云平台系统
eureka:
instance:
ip-address: 81.70.54.64
ip-address: 121.36.3.207

2
mt/src/main/resources/application-dev.yml

@ -8,7 +8,7 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 81.70.54.64
host: 121.36.3.207
password: 111111
port: 5672
username: admin

4
mt/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: dev
include: common, util-dev
active: prod
include: common, util-prod

35
ocr/pom.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ccsenscloud</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ocr</artifactId>
<dependencies>
<!--cloud 工具类-->
<dependency>
<artifactId>cloudutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--util 工具类-->
<dependency>
<artifactId>util</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--ocr-->
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>opencv</artifactId>
<version>4.0.1-1.4.4</version>
</dependency>
</dependencies>
</project>

24
ocr/src/main/java/com/ccsens/orc/OcrApplication.java

@ -0,0 +1,24 @@
package com.ccsens.orc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
/**
* @description:
* @author: whj
* @time: 2021/3/17 15:41
*/
@MapperScan(basePackages = {"com.ccsens.ocr.persist.*"})
@ServletComponentScan
@EnableAsync
//开启断路器功能
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@SpringBootApplication(scanBasePackages = "com.ccsens")
public class OcrApplication {
}

28
ocr/src/main/resources/application-common.yml

@ -0,0 +1,28 @@
logging:
level:
com:
favorites: DEBUG
org:
hibernate: ERROR
springframework:
web: DEBUG
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mapper_*/*.xml
type-aliases-package: com.ccsens.ht.bean
server:
tomcat:
uri-encoding: UTF-8
spring:
http:
encoding:
charset: UTF-8
enabled: true
force: true
log-request-details: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB

41
ocr/src/main/resources/application-dev.yml

@ -0,0 +1,41 @@
server:
port: 7030
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 192.168.0.99
password: guest
port: 5672
username: guest
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
gatewayUrl: https://test.tall.wiki/gateway/
notGatewayUrl: /home/staticrec/logo.png
smsCode: 0
wx:
prefixUrl: https://test.tall.wiki/wxconfigurer-api/
file:
path: /home/cloud/tall/uploads/
domain: http://localhost:7030/v1.0/
imgDomain: http://localhost:7030/v1.0/uploads

39
ocr/src/main/resources/application-greenvalley.yml

@ -0,0 +1,39 @@
server:
port: 7030
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: admin
port: 5672
username: 111111
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 82.156.116.247
gatewayUrl: http://82.156.116.247 /gateway/
notGatewayUrl: http://82.156.116.247 /
file:
domain: http://82.156.116.247 /gateway/tall/v1.0/
imgDomain: http://82.156.116.247 /gateway/tall/v1.0/uploads

48
ocr/src/main/resources/application-prod.yml

@ -0,0 +1,48 @@
server:
port: 7030
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
# password: ''
password: 'areowqr!@43ef'
port: 6379
timeout: 1000ms
swagger:
enable: false
eureka:
instance:
# www.tall.wiki
# ip-address: 140.143.228.3
# ip-address: 81.70.54.64
ip-address: 192.144.182.42
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
smsCode: 1
wx:
prefixUrl: https://www.tall.wiki/wxconfigurer-api/
file:
path: /home/cloud/tall/uploads/
domain: https://www.tall.wiki/gateway/tall/v1.0/
imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads

44
ocr/src/main/resources/application-prodapi.yml

@ -0,0 +1,44 @@
server:
port: 7031
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 3
workerId: 3
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: www.tall.wiki
password: 111111
port: 5672
username: admin
redis:
database: 0
host: www.tall.wiki
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: 'areowqr!@43ef'
port: 6379
timeout: 1000ms
swagger:
enable: false
eureka:
instance:
ip-address: 129.28.149.79
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
smsCode: 1
wx:
prefixUrl: https://www.tall.wiki/wxconfigurer-api/
file:
path: /home/cloud/tall/uploads/
domain: https://www.tall.wiki/gateway/tall/v1.0/
imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads

44
ocr/src/main/resources/application-prodsd.yml

@ -0,0 +1,44 @@
server:
port: 7031
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 2
workerId: 2
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: www.tall.wiki
password: 111111
port: 5672
username: admin
redis:
database: 0
host: www.tall.wiki
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: 'areowqr!@43ef'
port: 6379
timeout: 1000ms
swagger:
enable: false
eureka:
instance:
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
smsCode: 1
wx:
prefixUrl: https://www.tall.wiki/wxconfigurer-api/
file:
path: /home/cloud/tall/uploads/
domain: https://www.tall.wiki/gateway/tall/v1.0/
imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads

51
ocr/src/main/resources/application-test.yml

@ -0,0 +1,51 @@
server:
port: 7030
servlet:
context-path: /v1.0
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: tall
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
# host: api.ccsens.com
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 192.168.0.99
# ip-address: 49.233.89.188
#gatewayUrl: http://192.168.0.99/gateway/
#notGatewayUrl: http://192.168.0.99/
gatewayUrl: https://test.tall.wiki/gateway/
notGatewayUrl: https://test.tall.wiki/
smsCode: 0
wx:
prefixUrl: https://www.tall.wiki/wxconfigurer-api/
file:
path: /home/cloud/tall/uploads/
domain: https://test.tall.wiki/gateway/tall/v1.0/
imgDomain: https://test.tall.wiki/gateway/tall/v1.0/uploads
#file:
# domain: http://192.168.0.99/gateway/tall/v1.0/
# imgDomain: http://192.168.0.99/gateway/tall/v1.0/uploads

5
ocr/src/main/resources/application.yml

@ -0,0 +1,5 @@
spring:
profiles:
active: dev
include: util-dev,common

21
ocr/src/main/resources/banner.txt

@ -0,0 +1,21 @@
// _ooOoo_
// o8888888o
// 88" . "88
// (| -_- |)
// O\ = /O
// ____/`---'\____
// . ' \\| |// `.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' | |
// \ .-\__ `-` ___/-. /
// ___`. .' /--.--\ `. . __
// ."" '< `.___\_<|>_/___.' >'"".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `-. \_ __\ /__ _/ .-` / /
// ======`-.____`-.___\_____/___.-`____.-'======
// `=---='
//
// .............................................
// 佛祖保佑 永无BUG

196
ocr/src/main/resources/logback-spring.xml

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration scan="true" scanPeriod="10 seconds">
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="/home/cloud/ocr/game/log/" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 WARN 日志 -->
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_warn.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender><logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
-->
<!--<logger name="org.springframework.web" level="info"/>-->
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<!--开发环境:打印控制台-->
<springProfile name="dev">
<logger name="com.ccsens.ptpro.persist.*" level="debug"/>
</springProfile>
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
<!--生产环境:输出到文件-->
<!--<springProfile name="pro">-->
<!--<root level="info">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--</root>-->
<!--</springProfile>-->
</configuration>

61
ocr/src/test/java/com/ccsens/orc/test/OrcTest.java

@ -0,0 +1,61 @@
package com.ccsens.orc.test;
import org.junit.Test;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.Size;
import org.opencv.imgcodecs.Imgcodecs;
import org.opencv.imgproc.Imgproc;
/**
* @description:
* @author: whj
* @time: 2021/3/17 17:45
*/
public class OrcTest {
@Test
public void test01(){
// 加载资源
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
//创建3px*3px的8UC1(8个位的无符号(8U)单通道(C1)整数)
// Mat hello = Mat.eye(3,3, CvType.CV_8UC1);
// System.out.println(hello.dump());
//加载图片
Mat mat = Imgcodecs.imread("D:\\img\\0df7f58ea9d3a61019596094eb35003.png");
// 加载图片并灰度图像
// Mat mat = Imgcodecs.imread("D:\\img\\0df7f58ea9d3a61019596094eb35003.png", Imgcodecs.IMREAD_GRAYSCALE);
// System.out.println(mat.width() + "*" + mat.height() + "," + mat.type());
// System.out.println(mat);
// 输出图片
// Imgcodecs.imwrite("D:\\img\\1.png", mat);
// 截取图像
// Mat submat = mat.submat(50, 300, 60, 250);
// Imgcodecs.imwrite("D:\\img\\1.png", submat);
// 模糊图片 模糊子图片后,父模块也跟着模糊了
// Imgproc.blur(submat, submat, new Size(25.0,25.0));
// System.out.println(submat);
// Imgcodecs.imwrite("D:\\img\\blur.png", mat);
// 黑白化
Imgproc.cvtColor(mat, mat, Imgproc.COLOR_RGB2GRAY);
/*
高亮显示轮廓
源矩阵
目标矩阵
低阈值使用150.0
高阈值通常是低阈值的2倍或3倍
光圈37之间的一个奇数我们使用3光圈值越大被检测到的轮廓越多
L2梯度暂时设置为true
*/
Imgproc.Canny(mat, mat, 150,300,5, true);
// 反色操作
Core.bitwise_not(mat, mat);
// 将反色结果作为掩膜
Mat bg = Imgcodecs.imread("D:\\img\\e2669de7219943b8ac37f79dd8fef2f8.png");
Imgproc.resize(bg, bg, mat.size());
bg.copyTo(mat,mat);
Imgcodecs.imwrite("D:\\img\\1.png", mat);
}
}

7
pom.xml

@ -9,9 +9,9 @@
<module>cloudutil</module>
<module>util</module>
<module>tall</module>
<!-- <module>ht</module>-->
<!-- <module>game</module>-->
<!-- <module>mt</module>-->
<module>ht</module>
<module>game</module>
<module>mt</module>
<module>wisdomcar</module>
<module>beneficiation</module>
<!-- <module>form</module>-->
@ -20,6 +20,7 @@
<!-- <module>health</module>-->
<!-- <module>ct</module>-->
<module>tcm</module>
<module>ocr</module>
</modules>

23
tall/src/main/java/com/ccsens/tall/bean/dto/InputDocDto.java

@ -0,0 +1,23 @@
package com.ccsens.tall.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class InputDocDto {
@Data
@ApiModel("详细输入文档")
public static class AddAddInputDoc{
@ApiModelProperty("文件id")
private Long fileId;
}
@Data
@ApiModel("输入文档集合")
public static class AddAddInputDocs{
@ApiModelProperty("输入文档集合")
private List<AddAddInputDoc> list;
}
}

39
tall/src/main/java/com/ccsens/tall/bean/dto/LwbsDto.java

@ -0,0 +1,39 @@
package com.ccsens.tall.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
public class LwbsDto {
@Data
@ApiModel("查询lwbs的任务")
public static class SelByUserIdToComProject{
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("开始时间")
private Date startTime;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("结束时间")
private Date endTime;
}
@Data
@ApiModel("查询lwbs的任务")
public static class SelByProjectIdToTaskDto {
@ApiModelProperty("项目id")
private Long id;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("开始时间")
private Date startTime;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("结束时间")
private Date endTime;
}
}

2
tall/src/main/java/com/ccsens/tall/bean/dto/TaskDto.java

@ -207,7 +207,7 @@ public class TaskDto {
private Long delayTime;
@ApiModelProperty("优先级 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急 默认0")
private Byte priority;
@ApiModelProperty("是否是里程碑 0否 1是")
@ApiModelProperty("是否是里程碑 0否 1是 2普通任务 3关键任务")
private Byte milestone;
@ApiModelProperty("交付物id和修改后的名字")
private List<UpdateTaskDeliverName> deliverList;

117
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputDoc.java

@ -0,0 +1,117 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ProTaskInputDoc implements Serializable {
private Long id;
private Long taskDetailId;
private String name;
private String description;
private Integer sequence;
private Integer isUpload;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTaskDetailId() {
return taskDetailId;
}
public void setTaskDetailId(Long taskDetailId) {
this.taskDetailId = taskDetailId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description == null ? null : description.trim();
}
public Integer getSequence() {
return sequence;
}
public void setSequence(Integer sequence) {
this.sequence = sequence;
}
public Integer getIsUpload() {
return isUpload;
}
public void setIsUpload(Integer isUpload) {
this.isUpload = isUpload;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", taskDetailId=").append(taskDetailId);
sb.append(", name=").append(name);
sb.append(", description=").append(description);
sb.append(", sequence=").append(sequence);
sb.append(", isUpload=").append(isUpload);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

761
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputDocExample.java

@ -0,0 +1,761 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ProTaskInputDocExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ProTaskInputDocExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTaskDetailIdIsNull() {
addCriterion("task_detail_id is null");
return (Criteria) this;
}
public Criteria andTaskDetailIdIsNotNull() {
addCriterion("task_detail_id is not null");
return (Criteria) this;
}
public Criteria andTaskDetailIdEqualTo(Long value) {
addCriterion("task_detail_id =", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdNotEqualTo(Long value) {
addCriterion("task_detail_id <>", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdGreaterThan(Long value) {
addCriterion("task_detail_id >", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdGreaterThanOrEqualTo(Long value) {
addCriterion("task_detail_id >=", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdLessThan(Long value) {
addCriterion("task_detail_id <", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdLessThanOrEqualTo(Long value) {
addCriterion("task_detail_id <=", value, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdIn(List<Long> values) {
addCriterion("task_detail_id in", values, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdNotIn(List<Long> values) {
addCriterion("task_detail_id not in", values, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdBetween(Long value1, Long value2) {
addCriterion("task_detail_id between", value1, value2, "taskDetailId");
return (Criteria) this;
}
public Criteria andTaskDetailIdNotBetween(Long value1, Long value2) {
addCriterion("task_detail_id not between", value1, value2, "taskDetailId");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andDescriptionIsNull() {
addCriterion("description is null");
return (Criteria) this;
}
public Criteria andDescriptionIsNotNull() {
addCriterion("description is not null");
return (Criteria) this;
}
public Criteria andDescriptionEqualTo(String value) {
addCriterion("description =", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotEqualTo(String value) {
addCriterion("description <>", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThan(String value) {
addCriterion("description >", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
addCriterion("description >=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThan(String value) {
addCriterion("description <", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLessThanOrEqualTo(String value) {
addCriterion("description <=", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionLike(String value) {
addCriterion("description like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotLike(String value) {
addCriterion("description not like", value, "description");
return (Criteria) this;
}
public Criteria andDescriptionIn(List<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> values) {
addCriterion("description not in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionBetween(String value1, String value2) {
addCriterion("description between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotBetween(String value1, String value2) {
addCriterion("description not between", value1, value2, "description");
return (Criteria) this;
}
public Criteria andSequenceIsNull() {
addCriterion("sequence is null");
return (Criteria) this;
}
public Criteria andSequenceIsNotNull() {
addCriterion("sequence is not null");
return (Criteria) this;
}
public Criteria andSequenceEqualTo(Integer value) {
addCriterion("sequence =", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceNotEqualTo(Integer value) {
addCriterion("sequence <>", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceGreaterThan(Integer value) {
addCriterion("sequence >", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceGreaterThanOrEqualTo(Integer value) {
addCriterion("sequence >=", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceLessThan(Integer value) {
addCriterion("sequence <", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceLessThanOrEqualTo(Integer value) {
addCriterion("sequence <=", value, "sequence");
return (Criteria) this;
}
public Criteria andSequenceIn(List<Integer> values) {
addCriterion("sequence in", values, "sequence");
return (Criteria) this;
}
public Criteria andSequenceNotIn(List<Integer> values) {
addCriterion("sequence not in", values, "sequence");
return (Criteria) this;
}
public Criteria andSequenceBetween(Integer value1, Integer value2) {
addCriterion("sequence between", value1, value2, "sequence");
return (Criteria) this;
}
public Criteria andSequenceNotBetween(Integer value1, Integer value2) {
addCriterion("sequence not between", value1, value2, "sequence");
return (Criteria) this;
}
public Criteria andIsUploadIsNull() {
addCriterion("is_upload is null");
return (Criteria) this;
}
public Criteria andIsUploadIsNotNull() {
addCriterion("is_upload is not null");
return (Criteria) this;
}
public Criteria andIsUploadEqualTo(Integer value) {
addCriterion("is_upload =", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadNotEqualTo(Integer value) {
addCriterion("is_upload <>", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadGreaterThan(Integer value) {
addCriterion("is_upload >", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadGreaterThanOrEqualTo(Integer value) {
addCriterion("is_upload >=", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadLessThan(Integer value) {
addCriterion("is_upload <", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadLessThanOrEqualTo(Integer value) {
addCriterion("is_upload <=", value, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadIn(List<Integer> values) {
addCriterion("is_upload in", values, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadNotIn(List<Integer> values) {
addCriterion("is_upload not in", values, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadBetween(Integer value1, Integer value2) {
addCriterion("is_upload between", value1, value2, "isUpload");
return (Criteria) this;
}
public Criteria andIsUploadNotBetween(Integer value1, Integer value2) {
addCriterion("is_upload not between", value1, value2, "isUpload");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

106
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecord.java

@ -0,0 +1,106 @@
package com.ccsens.tall.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ProTaskInputRecord implements Serializable {
private Long id;
private Long inputDocId;
private Long fileId;
private Long userId;
private Byte status;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getInputDocId() {
return inputDocId;
}
public void setInputDocId(Long inputDocId) {
this.inputDocId = inputDocId;
}
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", inputDocId=").append(inputDocId);
sb.append(", fileId=").append(fileId);
sb.append(", userId=").append(userId);
sb.append(", status=").append(status);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

681
tall/src/main/java/com/ccsens/tall/bean/po/ProTaskInputRecordExample.java

@ -0,0 +1,681 @@
package com.ccsens.tall.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ProTaskInputRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ProTaskInputRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andInputDocIdIsNull() {
addCriterion("input_doc_id is null");
return (Criteria) this;
}
public Criteria andInputDocIdIsNotNull() {
addCriterion("input_doc_id is not null");
return (Criteria) this;
}
public Criteria andInputDocIdEqualTo(Long value) {
addCriterion("input_doc_id =", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdNotEqualTo(Long value) {
addCriterion("input_doc_id <>", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdGreaterThan(Long value) {
addCriterion("input_doc_id >", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdGreaterThanOrEqualTo(Long value) {
addCriterion("input_doc_id >=", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdLessThan(Long value) {
addCriterion("input_doc_id <", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdLessThanOrEqualTo(Long value) {
addCriterion("input_doc_id <=", value, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdIn(List<Long> values) {
addCriterion("input_doc_id in", values, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdNotIn(List<Long> values) {
addCriterion("input_doc_id not in", values, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdBetween(Long value1, Long value2) {
addCriterion("input_doc_id between", value1, value2, "inputDocId");
return (Criteria) this;
}
public Criteria andInputDocIdNotBetween(Long value1, Long value2) {
addCriterion("input_doc_id not between", value1, value2, "inputDocId");
return (Criteria) this;
}
public Criteria andFileIdIsNull() {
addCriterion("file_id is null");
return (Criteria) this;
}
public Criteria andFileIdIsNotNull() {
addCriterion("file_id is not null");
return (Criteria) this;
}
public Criteria andFileIdEqualTo(Long value) {
addCriterion("file_id =", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotEqualTo(Long value) {
addCriterion("file_id <>", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThan(Long value) {
addCriterion("file_id >", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdGreaterThanOrEqualTo(Long value) {
addCriterion("file_id >=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThan(Long value) {
addCriterion("file_id <", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdLessThanOrEqualTo(Long value) {
addCriterion("file_id <=", value, "fileId");
return (Criteria) this;
}
public Criteria andFileIdIn(List<Long> values) {
addCriterion("file_id in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotIn(List<Long> values) {
addCriterion("file_id not in", values, "fileId");
return (Criteria) this;
}
public Criteria andFileIdBetween(Long value1, Long value2) {
addCriterion("file_id between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andFileIdNotBetween(Long value1, Long value2) {
addCriterion("file_id not between", value1, value2, "fileId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Byte value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Byte value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Byte value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Byte value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Byte value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Byte> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Byte> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Byte value1, Byte value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Byte value1, Byte value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

52
tall/src/main/java/com/ccsens/tall/bean/vo/LwbsVo.java

@ -0,0 +1,52 @@
package com.ccsens.tall.bean.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.scheduling.support.SimpleTriggerContext;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
import java.util.stream.Stream;
@Data
public class LwbsVo {
@Data
@ApiModel("查询某人下的所有的项目")
public static class SelByUserIdToComProjectVo{
@ApiModelProperty("项目名称")
private String name;
@ApiModelProperty("项目id")
private Long id;
}
@Data
@ApiModel("查询某人下的项目的任务")
public static class SelByProjectIdToTaskVo {
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("开始时间")
private Date startTime;
@NotNull
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModelProperty("结束时间")
private Date endTime;
@ApiModelProperty("详情")
private String description;
@ApiModelProperty("标签 0否 1是 2普通任务 3关键任务")
private Byte milestone;
}
@Data
@ApiModel("查询出某人下的所有项目")
public static class SelByProjectIdToTasksVo {
@ApiModelProperty("项目id")
private Long id;
@ApiModelProperty("项目名称")
private String name;
@ApiModelProperty("所有的任务")
private List<SelByProjectIdToTaskVo> list;
}
}

2
tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java

@ -150,7 +150,7 @@ public class TaskVo {
private String importParam;
@ApiModelProperty("优先级 默认0 3,紧急重要 2,紧急不重要 1,重要不紧急 0,不重要不紧急")
private Byte priority;
@ApiModelProperty("是否是里程碑 0否 1是")
@ApiModelProperty("是否是里程碑 0否 1是 2普通任务 3关键任务")
private Byte milestone;
@ApiModelProperty("提醒的信息")
private List<RemindInfo> remindInfoList;

30
tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskInputDocMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.ProTaskInputDoc;
import com.ccsens.tall.bean.po.ProTaskInputDocExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProTaskInputDocMapper {
long countByExample(ProTaskInputDocExample example);
int deleteByExample(ProTaskInputDocExample example);
int deleteByPrimaryKey(Long id);
int insert(ProTaskInputDoc record);
int insertSelective(ProTaskInputDoc record);
List<ProTaskInputDoc> selectByExample(ProTaskInputDocExample example);
ProTaskInputDoc selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProTaskInputDoc record, @Param("example") ProTaskInputDocExample example);
int updateByExample(@Param("record") ProTaskInputDoc record, @Param("example") ProTaskInputDocExample example);
int updateByPrimaryKeySelective(ProTaskInputDoc record);
int updateByPrimaryKey(ProTaskInputDoc record);
}

30
tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskInputRecordMapper.java

@ -0,0 +1,30 @@
package com.ccsens.tall.persist.mapper;
import com.ccsens.tall.bean.po.ProTaskInputRecord;
import com.ccsens.tall.bean.po.ProTaskInputRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProTaskInputRecordMapper {
long countByExample(ProTaskInputRecordExample example);
int deleteByExample(ProTaskInputRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(ProTaskInputRecord record);
int insertSelective(ProTaskInputRecord record);
List<ProTaskInputRecord> selectByExample(ProTaskInputRecordExample example);
ProTaskInputRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProTaskInputRecord record, @Param("example") ProTaskInputRecordExample example);
int updateByExample(@Param("record") ProTaskInputRecord record, @Param("example") ProTaskInputRecordExample example);
int updateByPrimaryKeySelective(ProTaskInputRecord record);
int updateByPrimaryKey(ProTaskInputRecord record);
}

101
tall/src/main/java/com/ccsens/tall/service/ExcelService.java

@ -13,6 +13,8 @@ import com.ccsens.util.cron.CronConstant;
import com.ccsens.util.cron.NatureToDate;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
@ -606,6 +608,20 @@ public class ExcelService implements IExcelService {
private void readTask(XSSFWorkbook xssfWorkbook, XSSFSheet wbsSheet, int taskStart, int taskEnd,
Long currentUserId, SysProject sysProject, List<ProTaskDetail> taskDetails,
List<ProRole> proRoles, List<ProMember> proMembers, Map<String, List<ProTaskDetail>> hasGroupMap) throws Exception {
/**
* 读取到任务的表头key为属性value为在第几列
*/
HashMap<String, Integer> map =new HashMap<String, Integer>();
XSSFRow rowq = wbsSheet.getRow(taskStart);
for (int q=0;q<100;q++){
String s= ExcelUtil.getCellValue(rowq.getCell(q));
if(StringUtils.isBlank(s)){
break;
}
s=s.trim().replace("\r","").replace("\n","");
map.put(s,q);
}
Long pmRoleId = null;
//获取项目经理的id(一级角色)
for (ProRole role : proRoles) {
@ -644,29 +660,47 @@ public class ExcelService implements IExcelService {
continue;
}
//一级任务名称
String task1 = ExcelUtil.getCellValue(row.getCell(1));
String task1 = ExcelUtil.getCellValue(row.getCell(map.get("任务(节点)")));
//二级任务名称
String task2 = ExcelUtil.getCellValue(row.getCell(2));
String task2 = ExcelUtil.getCellValue(row.getCell(map.get("二级任务(节点)")));
//详情
String description = ExcelUtil.getCellValue(row.getCell(3));
String description = ExcelUtil.getCellValue(row.getCell(map.get("任务描述/要求")));
//开始时间
String beginTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(4)));
String beginTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(map.get("开始时间"))));
//结束时间
String endTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(5)));
String endTime = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(map.get("结束时间"))));
//标签
String label=StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(map.get("标签"))));
//重复
String repeat = ExcelUtil.getCellValue(row.getCell(7));
//关联子任务表
String subTaskCell = ExcelUtil.getCellValue(row.getCell(8));
String repeat = ExcelUtil.getCellValue(row.getCell(map.get("重复")));
//关联子日程
String subTaskCell = ExcelUtil.getCellValue(row.getCell(map.get("关联子日程表")));
//关联子项目表
String subProject = ExcelUtil.getCellValue(row.getCell(9));
String deliver = ExcelUtil.getCellValue(row.getCell(10));
String executorRole = ExcelUtil.getCellValue(row.getCell(11));
String checkerRole = ExcelUtil.getCellValue(row.getCell(12));
String money = ExcelUtil.getCellValue(row.getCell(13));
String delay = ExcelUtil.getCellValue(row.getCell(14));
String delayTime = ExcelUtil.getCellValue(row.getCell(15));
String subProject = ExcelUtil.getCellValue(row.getCell(map.get("关联子项目表")));
//输入文档
String inputFiles=StringUtil.replaceStrSpace(ExcelUtil.getCellValue(row.getCell(map.get("输入文档"))));
//交付物
String deliver = ExcelUtil.getCellValue(row.getCell(map.get("交付物/MVP项")));
//负责人
String executorRole = ExcelUtil.getCellValue(row.getCell(map.get("负责人")));
//检查人
String checkerRole = ExcelUtil.getCellValue(row.getCell(map.get("检查人")));
//即时奖惩(元)
String money = ExcelUtil.getCellValue(row.getCell(map.get("即时奖惩(元)")));
//任务切换模式
String delay = ExcelUtil.getCellValue(row.getCell(map.get("任务切换模式")));
//延迟时间
//(自动延迟模式可用)
String delayTime = ExcelUtil.getCellValue(row.getCell(map.get("延迟时间(自动延迟模式可用)")));
//TODO 跳转任务和跳转次数暂不处理
//跳转任务
String loopTo = ExcelUtil.getCellValue(row.getCell(16));
//跳转次数
String loopTimes = ExcelUtil.getCellValue(row.getCell(17));
//这个不知道要不要先给你留着
//输入文件
String input = ExcelUtil.getCellValue(row.getCell(18));
//二级任务名不能为空
// if(StrUtil.isEmpty(task2)){
@ -729,6 +763,15 @@ public class ExcelService implements IExcelService {
taskDetail.setLevel((byte) WebConstant.TASK_LEVEL.SecondTask.value);
taskDetail.setHasGroup((byte) 0);
taskDetail.setAllMember((byte) 1);
if("关键任务".equals(label)){
taskDetail.setMilestone((byte) 3);
}else if("里程碑".equals(label)){
taskDetail.setMilestone((byte) 1);
}else {
//设置成默认的普通任务
taskDetail.setMilestone((byte) 2);
}
//子项目
if (StrUtil.isNotEmpty(subProject)) {
subProject = StringUtil.replaceComma(subProject);
@ -796,16 +839,26 @@ public class ExcelService implements IExcelService {
//TODO 跳转任务(应该在循环外处理)
//输入文档
if (StrUtil.isNotEmpty(input)) {
ProTaskDeliver taskDeliver = new ProTaskDeliver();
taskDeliver.setId(snowflake.nextId());
taskDeliver.setTaskDetailId(taskDetail.getId());
taskDeliver.setName(input);
taskDeliver.setIsInput(1);
taskDeliver.setIsFinal(0);
taskDeliverService.saveDeliver(taskDeliver);
//输入文档 旧的
// if (StrUtil.isNotEmpty(input)) {
// ProTaskDeliver taskDeliver = new ProTaskDeliver();
// taskDeliver.setId(snowflake.nextId());
// taskDeliver.setTaskDetailId(taskDetail.getId());
// taskDeliver.setName(input);
// taskDeliver.setIsInput(1);
// taskDeliver.setIsFinal(0);
// taskDeliverService.saveDeliver(taskDeliver);
// }
//输入文档 新的
if(StrUtil.isNotEmpty(inputFiles)){
String regex=",|,|;|:|;|:|、|。";
String[] fileNames= inputFiles.split(regex);
if(fileNames.length>0){
taskDeliverService.saveProTaskInputDoc(fileNames,taskDetail.getId());
}
}
//TODO 设备挂载暂不处理
//没有开始时间默认项目开始时间

12
tall/src/main/java/com/ccsens/tall/service/IInputDocService.java

@ -0,0 +1,12 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.dto.LwbsDto;
import com.ccsens.tall.bean.vo.LwbsVo;
import java.util.List;
public interface IInputDocService {
List<LwbsVo.SelByUserIdToComProjectVo> selBylwbs(LwbsDto.SelByUserIdToComProject param, Long userId);
List<LwbsVo.SelByProjectIdToTasksVo> selByProjectIdToTask(LwbsDto.SelByProjectIdToTaskDto param, Long userId);
}

3
tall/src/main/java/com/ccsens/tall/service/ITaskDeliverService.java

@ -2,6 +2,7 @@ package com.ccsens.tall.service;
import com.ccsens.tall.bean.dto.DeliverDto;
import com.ccsens.tall.bean.po.ProTaskDeliver;
import com.ccsens.tall.bean.po.ProTaskInputDoc;
import com.ccsens.tall.bean.vo.DeliverVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.bean.vo.TaskVo;
@ -12,6 +13,8 @@ public interface ITaskDeliverService {
void saveDeliver(ProTaskDeliver taskDeliver);
void saveProTaskInputDoc(String[] inputs,Long taskId);
List<TaskVo.TaskDeliverByMVP.DeliverInfoByMVP> selectDeliverOrInputByTask(Long id, int i);
DeliverVo.DFile uploadDeliver(String filePath, String name);

60
tall/src/main/java/com/ccsens/tall/service/InputDocService.java

@ -0,0 +1,60 @@
package com.ccsens.tall.service;
import com.ccsens.tall.bean.dto.LwbsDto;
import com.ccsens.tall.bean.po.ProMember;
import com.ccsens.tall.bean.po.ProMemberExample;
import com.ccsens.tall.bean.po.SysProject;
import com.ccsens.tall.bean.po.SysProjectExample;
import com.ccsens.tall.bean.vo.LwbsVo;
import com.ccsens.tall.persist.mapper.ProMemberMapper;
import com.ccsens.tall.persist.mapper.SysProjectMapper;
import com.rabbitmq.client.TopologyRecoveryException;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
@Service
public class InputDocService implements IInputDocService {
@Resource
public ProMemberMapper proMemberMapper;
@Resource
public SysProjectMapper sysProjectMapper;
@Override
public List<LwbsVo.SelByUserIdToComProjectVo> selBylwbs(LwbsDto.SelByUserIdToComProject param, Long userId) {
List<LwbsVo.SelByUserIdToComProjectVo> selByUserIdToComProjectVos =new ArrayList<LwbsVo.SelByUserIdToComProjectVo>();
//手动添加一个我的
LwbsVo.SelByUserIdToComProjectVo selByUserIdToComProjectVo_wode =new LwbsVo.SelByUserIdToComProjectVo();
selByUserIdToComProjectVo_wode.setName("我的");
selByUserIdToComProjectVos.add(selByUserIdToComProjectVo_wode);
//查询中间的项目
ProMemberExample proMemberExample=new ProMemberExample();
proMemberExample.createCriteria().andRecStatusEqualTo((byte) 0).andUserIdEqualTo(userId);
List<ProMember> proMembers = proMemberMapper.selectByExample(proMemberExample);
List<Long> longList=new ArrayList<Long>();
proMembers.forEach(proMember -> {
longList.add(proMember.getProjectId());
});
SysProjectExample sysProjectExample=new SysProjectExample();
sysProjectExample.createCriteria().andRecStatusEqualTo((byte)0).andIdIn(longList).andBeginTimeGreaterThanOrEqualTo(param.getStartTime().getTime()).andEndTimeLessThanOrEqualTo(param.getEndTime().getTime());
List<SysProject> sysProjects = sysProjectMapper.selectByExample(sysProjectExample);
sysProjects.forEach(sysProject -> {
LwbsVo.SelByUserIdToComProjectVo selByUserIdToComProjectVo_zhongjian =new LwbsVo.SelByUserIdToComProjectVo();
selByUserIdToComProjectVo_zhongjian.setName(sysProject.getName());
selByUserIdToComProjectVo_zhongjian.setId(sysProject.getId());
selByUserIdToComProjectVos.add(selByUserIdToComProjectVo_zhongjian);
});
//手动添加一个其他
LwbsVo.SelByUserIdToComProjectVo selByUserIdToComProjectVo_qita =new LwbsVo.SelByUserIdToComProjectVo();
selByUserIdToComProjectVo_wode.setName("其他");
selByUserIdToComProjectVos.add(selByUserIdToComProjectVo_qita);
return selByUserIdToComProjectVos;
}
@Override
public List<LwbsVo.SelByProjectIdToTasksVo> selByProjectIdToTask(LwbsDto.SelByProjectIdToTaskDto param, Long userId) {
return null;
}
}

16
tall/src/main/java/com/ccsens/tall/service/TaskDeliverService.java

@ -15,6 +15,7 @@ import com.ccsens.tall.bean.vo.DeliverVo;
import com.ccsens.tall.bean.vo.ProjectVo;
import com.ccsens.tall.bean.vo.TaskVo;
import com.ccsens.tall.persist.dao.*;
import com.ccsens.tall.persist.mapper.ProTaskInputDocMapper;
import com.ccsens.util.*;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
@ -22,6 +23,7 @@ import com.ccsens.util.bean.message.common.MessageRule;
import com.ccsens.util.config.RabbitMQConfig;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
@ -70,11 +72,25 @@ public class TaskDeliverService implements ITaskDeliverService {
private SysProjectDao sysProjectDao;
@Resource
private IWpsService wpsService;
@Resource
private ProTaskInputDocMapper proTaskInputDocMapper;
@Override
public void saveDeliver(ProTaskDeliver taskDeliver) {
taskDeliverDao.insertSelective(taskDeliver);
}
@Override
public void saveProTaskInputDoc(String[] inputs,Long taskId){
for (int i = 0; i < inputs.length; i++) {
if(StringUtils.isNotBlank(inputs[i])){
ProTaskInputDoc proTaskInputDoc = new ProTaskInputDoc();
proTaskInputDoc.setId(snowflake.nextId());
proTaskInputDoc.setTaskDetailId(taskId);
proTaskInputDoc.setName(inputs[i].trim());
proTaskInputDocMapper.insertSelective(proTaskInputDoc);
}
}
}
/**
* 根据taskId查找交付物或输入文档

42
tall/src/main/java/com/ccsens/tall/web/InputDocController.java

@ -0,0 +1,42 @@
package com.ccsens.tall.web;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.tall.bean.dto.InputDocDto;
import com.ccsens.tall.bean.dto.LabelDto;
import com.ccsens.tall.bean.vo.LabelVo;
import com.ccsens.tall.service.IInputDocService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.WebConstant;
import com.ccsens.util.bean.dto.QueryDto;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@Slf4j
@Api(tags = "输入文档相关的" , description = "")
@RestController
@RequestMapping("/inputDoc")
public class InputDocController {
@Autowired
IInputDocService iInputDocService;
@MustLogin
@ApiOperation(value = "添加输入文档", notes = "1007:添加输入文档")
@RequestMapping(value = "/addInputDoc", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse addInputDoc(@ApiParam @Validated @RequestBody QueryDto<InputDocDto.AddAddInputDoc> params) {
log.info("添加输入文档:{}",params);
//iInputDocService.addInputDoc(params.getParam(),params.getUserId());
log.info("添加输入文档");
return JsonResponse.newInstance().ok();
}
}

6
tall/src/main/java/com/ccsens/tall/web/LogController.java

@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @description:
* @author: wuHuiJuan
@ -24,9 +26,9 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class LogController {
@Autowired
@Resource
private SysLogMapper sysLogMapper;
@Autowired
@Resource
private Snowflake snowflake;
@RequestMapping("/log/operation")

48
tall/src/main/java/com/ccsens/tall/web/LwbsController.java

@ -0,0 +1,48 @@
package com.ccsens.tall.web;
import com.ccsens.cloudutil.annotation.MustLogin;
import com.ccsens.tall.bean.dto.InputDocDto;
import com.ccsens.tall.bean.dto.LwbsDto;
import com.ccsens.tall.bean.vo.LwbsVo;
import com.ccsens.tall.service.IInputDocService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@Api(tags = "lwbs相关接口输出" , description = "")
@RestController
@RequestMapping("/lwbs")
public class LwbsController {
@Autowired
private IInputDocService iInputDocService;
@MustLogin
@ApiOperation(value = "查询人下参加的所有的项目", notes = "1007:输出")
@RequestMapping(value = "/selByUserIdToComProject", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LwbsVo.SelByUserIdToComProjectVo>> selByUserIdToComProject(@ApiParam @Validated @RequestBody QueryDto<LwbsDto.SelByUserIdToComProject> params) {
log.info("输出某人下的所有的项目:{}",params);
List<LwbsVo.SelByUserIdToComProjectVo> selBylwbs= iInputDocService.selBylwbs(params.getParam(),params.getUserId());
log.info("输出某人下的所有的项目成功");
return JsonResponse.newInstance().ok(selBylwbs);
}
@MustLogin
@ApiOperation(value = "查询某人下参加的项目的所有的任务", notes = "1007:输出")
@RequestMapping(value = "/selByProjectIdToTask", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<List<LwbsVo.SelByProjectIdToTasksVo>> selByProjectIdToTask(@ApiParam @Validated @RequestBody QueryDto<LwbsDto.SelByProjectIdToTaskDto> params) {
log.info("查询某人下参加的项目的所有的任务:{}",params);
List<LwbsVo.SelByProjectIdToTasksVo> selBylwbs= iInputDocService.selByProjectIdToTask(params.getParam(),params.getUserId());
log.info("查询某人下参加的项目的所有的任务");
return JsonResponse.newInstance().ok(selBylwbs);
}
}

1
tall/src/main/resources/application-dev.yml

@ -12,6 +12,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 192.168.0.99
# host: 127.0.0.1
password: guest
port: 5672
username: guest

2
tall/src/main/resources/application-prodsd.yml

@ -31,7 +31,7 @@ swagger:
enable: false
eureka:
instance:
ip-address: 81.70.54.64
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/

2
tall/src/main/resources/application-test.yml

@ -32,7 +32,7 @@ swagger:
enable: true
eureka:
instance:
# ip-address: 192.168.0.99
ip-address: 127.0.0.1
# ip-address: 49.233.89.188
#gatewayUrl: http://192.168.0.99/gateway/

276
tall/src/main/resources/mapper_raw/ProTaskInputDocMapper.xml

@ -0,0 +1,276 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.ProTaskInputDocMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProTaskInputDoc">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="task_detail_id" jdbcType="BIGINT" property="taskDetailId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="sequence" jdbcType="INTEGER" property="sequence" />
<result column="is_upload" jdbcType="INTEGER" property="isUpload" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, task_detail_id, name, description, sequence, is_upload, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputDocExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_pro_task_input_doc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_pro_task_input_doc
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_pro_task_input_doc
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputDocExample">
delete from t_pro_task_input_doc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.ProTaskInputDoc">
insert into t_pro_task_input_doc (id, task_detail_id, name,
description, sequence, is_upload,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{taskDetailId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{sequence,jdbcType=INTEGER}, #{isUpload,jdbcType=INTEGER},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProTaskInputDoc">
insert into t_pro_task_input_doc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="taskDetailId != null">
task_detail_id,
</if>
<if test="name != null">
name,
</if>
<if test="description != null">
description,
</if>
<if test="sequence != null">
sequence,
</if>
<if test="isUpload != null">
is_upload,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="taskDetailId != null">
#{taskDetailId,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="sequence != null">
#{sequence,jdbcType=INTEGER},
</if>
<if test="isUpload != null">
#{isUpload,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputDocExample" resultType="java.lang.Long">
select count(*) from t_pro_task_input_doc
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_pro_task_input_doc
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.taskDetailId != null">
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.sequence != null">
sequence = #{record.sequence,jdbcType=INTEGER},
</if>
<if test="record.isUpload != null">
is_upload = #{record.isUpload,jdbcType=INTEGER},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_pro_task_input_doc
set id = #{record.id,jdbcType=BIGINT},
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
sequence = #{record.sequence,jdbcType=INTEGER},
is_upload = #{record.isUpload,jdbcType=INTEGER},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.ProTaskInputDoc">
update t_pro_task_input_doc
<set>
<if test="taskDetailId != null">
task_detail_id = #{taskDetailId,jdbcType=BIGINT},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="sequence != null">
sequence = #{sequence,jdbcType=INTEGER},
</if>
<if test="isUpload != null">
is_upload = #{isUpload,jdbcType=INTEGER},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProTaskInputDoc">
update t_pro_task_input_doc
set task_detail_id = #{taskDetailId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
sequence = #{sequence,jdbcType=INTEGER},
is_upload = #{isUpload,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
tall/src/main/resources/mapper_raw/ProTaskInputRecordMapper.xml

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.ProTaskInputRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.ProTaskInputRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="input_doc_id" jdbcType="BIGINT" property="inputDocId" />
<result column="file_id" jdbcType="BIGINT" property="fileId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, input_doc_id, file_id, user_id, status, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_pro_task_input_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_pro_task_input_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_pro_task_input_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecordExample">
delete from t_pro_task_input_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
insert into t_pro_task_input_record (id, input_doc_id, file_id,
user_id, status, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{inputDocId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT},
#{userId,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
insert into t_pro_task_input_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="inputDocId != null">
input_doc_id,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="status != null">
status,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="inputDocId != null">
#{inputDocId,jdbcType=BIGINT},
</if>
<if test="fileId != null">
#{fileId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecordExample" resultType="java.lang.Long">
select count(*) from t_pro_task_input_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_pro_task_input_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.inputDocId != null">
input_doc_id = #{record.inputDocId,jdbcType=BIGINT},
</if>
<if test="record.fileId != null">
file_id = #{record.fileId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_pro_task_input_record
set id = #{record.id,jdbcType=BIGINT},
input_doc_id = #{record.inputDocId,jdbcType=BIGINT},
file_id = #{record.fileId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
status = #{record.status,jdbcType=TINYINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
update t_pro_task_input_record
<set>
<if test="inputDocId != null">
input_doc_id = #{inputDocId,jdbcType=BIGINT},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.ProTaskInputRecord">
update t_pro_task_input_record
set input_doc_id = #{inputDocId,jdbcType=BIGINT},
file_id = #{fileId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
status = #{status,jdbcType=TINYINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

1
util/src/main/java/com/ccsens/util/PoiUtil.java

@ -186,7 +186,6 @@ public class PoiUtil {
if(ObjectUtil.isNull(cell.value)) {
log.info("单元格内容为空:{}", cell.value);
}else {
log.info("单元格内容:{}", cell.value);
if (cell.value.length() <= 14 && cell.value.matches("\\d+")) {
newCell.setCellValue(Long.parseLong(cell.value));
} else {

5
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/dto/RecordDto.java

@ -26,6 +26,9 @@ public class RecordDto {
private Long startTime;
@ApiModelProperty("结束时间, 默认当前时间")
private Long endTime;
@ApiModelProperty("数据类型 0开始 1体重 2rfid, 3称重一 4称重二 5称重三 6称重四 7震动 8剂量")
private byte[] types = {1,2};
// @ApiModelProperty("当前页,默认1")
// private int pageNum=1;
// @ApiModelProperty("每页数量,默认100")
@ -55,6 +58,8 @@ public class RecordDto {
private Long startTime;
@ApiModelProperty("结束时间, 默认当前时间")
private Long endTime;
@ApiModelProperty("数据类型 0开始 1体重 2rfid, 3称重一 4称重二 5称重三 6称重四 7震动 8剂量")
private byte[] types = {1,2};
{
endTime = System.currentTimeMillis();

5
wisdomcar/src/main/java/com/ccsens/wisdomcar/bean/vo/RecordVo.java

@ -1,12 +1,9 @@
package com.ccsens.wisdomcar.bean.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @description: 数据记录
* @author: whj
@ -21,7 +18,7 @@ public class RecordVo {
@ApiModelProperty("时间")
private Long time;
@ApiModelProperty("类型:1体重 2rfid")
private Byte type;
private byte type;
private String value;
private String name;
}

11
wisdomcar/src/main/java/com/ccsens/wisdomcar/persist/dao/WisdomCarRecordDao.java

@ -20,4 +20,15 @@ public interface WisdomCarRecordDao extends WisdomCarRecordMapper {
* @return 称重和rfid记录
*/
List<RecordVo.WeightAndRfid> queryWeightAndRfid(@Param("carId") Long carId, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
/**
* 根据类型查询平车记录
* @param carId 平车ID
* @param startTime 开始时间
* @param endTime 结束时间
* @param type 数据类型
* @return 记录
*/
List<RecordVo.WeightAndRfid> queryRecords(@Param("carId") Long carId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("type") byte type);
}

64
wisdomcar/src/main/java/com/ccsens/wisdomcar/service/RecordService.java

@ -151,9 +151,56 @@ public class RecordService implements IRecordService{
@Override
public List<RecordVo.WeightAndRfid> queryWeightAndRfid(RecordDto.WeightAndRfid param, Long userId) {
List<RecordVo.WeightAndRfid> list = queryWeightAndRfid(param.getCarId(), param.getStartTime(), param.getEndTime());
List<RecordVo.WeightAndRfid> list = queryRecord(param.getCarId(), param.getStartTime(), param.getEndTime(), param.getTypes());
return list;
}
private List<RecordVo.WeightAndRfid> queryRecord(Long carId, Long startTime, Long endTime, byte[] types) {
List<RecordVo.WeightAndRfid> records = new ArrayList<>();
if (types == null || types.length == 0) {
log.info("没有输入查询记录类型,直接返回");
return records;
}
for (byte type : types) {
List<RecordVo.WeightAndRfid> list = wisdomCarRecordDao.queryRecords(carId, startTime, endTime, type);
RecordVo.WeightAndRfid prev = null;
for (int i = 0; i < list.size(); i++) {
RecordVo.WeightAndRfid cur = list.get(i);
if (i == 0) {
records.add(cur);
prev = cur;
continue;
}
// i > 0 && cur.type == prev.type
//称重
if (cur.getType() == Constant.CAR_RECORD_WEIGHT) {
// 重量差大于10KG或时间间隔大于10分钟,保留
if (Math.abs(Integer.parseInt(cur.getValue()) - Integer.parseInt(prev.getValue())) > weightMinus
|| Math.abs(cur.getTime() - prev.getTime()) > timeMinus) {
records.add(cur);
prev = cur;
}
continue;
}
// 非称重 值不重复 或 非称重 值重复 最后一条数据
if(!cur.getValue().equals(prev.getValue()) || i == list.size() -1){
records.add(cur);
} else if (!cur.getValue().equals(list.get(i+1).getValue()) ) {
// 非称重 值重复 非最后一条数据
// 判断与下一个是否一致,一致,则不保留第一个和最后一个
records.add(cur);
}
prev = cur;
}
}
if (types.length > 1) {
log.info("重新排序");
Collections.sort(records, (o1, o2) -> (int) (o1.getTime() - o2.getTime()));
}
return records;
}
/**
* 查询数据
@ -218,7 +265,7 @@ public class RecordService implements IRecordService{
@Override
public Workbook exportWeightAndRfid(RecordDto.WeightAndRfidExport param) {
log.info("数据导出:{}", param);
List<RecordVo.WeightAndRfid> list = queryWeightAndRfid(param.getCarId(), param.getStartTime(), param.getEndTime());
List<RecordVo.WeightAndRfid> list = queryRecord(param.getCarId(), param.getStartTime(), param.getEndTime(), param.getTypes());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 参数封装
List<List<PoiUtil.PoiUtilCell>> rows = new ArrayList<>();
@ -246,7 +293,18 @@ public class RecordService implements IRecordService{
Date time = new Date();
time.setTime(record.getTime());
row.add(new PoiUtil.PoiUtilCell(sdf.format(time)));
row.add(new PoiUtil.PoiUtilCell(record.getType() == Constant.CAR_RECORD_WEIGHT ? "称重" : "rfid"));
String type = "称重";
switch (record.getType()) {
case Constant.CAR_RECORD_WEIGHT: type = "称重";break;
case Constant.CAR_RECORD_RFID: type = "rfid";break;
case Constant.WEIGHT_SENSOR_1: type = "称重1";break;
case Constant.WEIGHT_SENSOR_2: type = "称重2";break;
case Constant.WEIGHT_SENSOR_3: type = "称重3";break;
case Constant.WEIGHT_SENSOR_4: type = "称重4";break;
case Constant.SHAKE_SENSOR: type = "震动";break;
case Constant.THROMBOLYTIC: type = "剂量";break;
}
row.add(new PoiUtil.PoiUtilCell(type));
row.add(new PoiUtil.PoiUtilCell(record.getType() == Constant.CAR_RECORD_WEIGHT ? new BigDecimal(record.getValue()).divide(new BigDecimal(1000), 3).toString() + "Kg" : record.getName()));
rows.add(row);
}

2
wisdomcar/src/main/resources/application-test.yml

@ -28,7 +28,7 @@ swagger:
enable: true
eureka:
instance:
ip-address: 192.168.0.99
ip-address: 127.0.0.1
file:
path: /home/cloud/wisdomcar/uploads/
signUpUrl: https://test.tall.wiki/compete/

27
wisdomcar/src/main/resources/mapper_dao/WisdomCarRecordDao.xml

@ -11,4 +11,31 @@
) t
order by time
</select>
<select id="queryRecords" resultType="com.ccsens.wisdomcar.bean.vo.RecordVo$WeightAndRfid">
<choose>
<!--rfid-->
<when test="type == 2">
select r.time, r.type, if(length(HEX(CAST(value as SIGNED))) = 1, concat('0',HEX(CAST(value as SIGNED))), HEX(CAST(value as SIGNED))) as value,
IFNULL(rfid.name,if(length(HEX(CAST(value as SIGNED))) = 1, concat('0',HEX(CAST(value as SIGNED))), HEX(CAST(value as SIGNED)))) as name
from t_wisdom_car_record r left join t_rfid rfid on r.value = rfid.rfid and rfid.rec_status = 0
where r.car_id = #{carId} and r.type = 2 and r.time &gt;= #{startTime} and r.time &lt; #{endTime} and r.value != '0' and r.rec_status = 0
order by r.time
</when>
<otherwise>
select r.time, r.type, r.value,
case
when type = 1 then '称重'
when type = 3 then '称重一'
when type = 4 then '称重二'
when type = 5 then '称重三'
when type = 6 then '称重四'
when type = 7 then '震动'
when type = 8 then '剂量'
end as name
from t_wisdom_car_record r
where r.car_id = #{carId} and r.type = #{type} and r.time &gt;= #{startTime} and r.time &lt; #{endTime} and r.rec_status = 0
order by r.time
</otherwise>
</choose>
</select>
</mapper>
Loading…
Cancel
Save