Commit 41e77df211d869163f778f9d3e9fb9a358277c8f

Authored by guzijian
1 parent b6ff605a

fix: 更新检测逻辑

ruoyi-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
@@ -176,6 +176,9 @@ public class DriverServiceImpl implements IDriverService { @@ -176,6 +176,9 @@ public class DriverServiceImpl implements IDriverService {
176 Map<String, List<ResponseScheduling>> scheduling = driverJob.saveSchedulingToRedis(getSchedulingInfoUrl, schedulingDate); 176 Map<String, List<ResponseScheduling>> scheduling = driverJob.saveSchedulingToRedis(getSchedulingInfoUrl, schedulingDate);
177 // 数据库中读取所有接收到的排班信息 177 // 数据库中读取所有接收到的排班信息
178 // List<ResponseScheduling> responseSchedulings = driverMapper.getDriverSchedulingList(schedulingDate, jobCode); 178 // List<ResponseScheduling> responseSchedulings = driverMapper.getDriverSchedulingList(schedulingDate, jobCode);
  179 + if (jobCode.equals("700001") || jobCode.equals("700002")){
  180 + return AjaxResult.success(scheduling.get("724228"));
  181 + }
179 return AjaxResult.success(scheduling.get(jobCode)); 182 return AjaxResult.success(scheduling.get(jobCode));
180 } 183 }
181 184
ruoyi-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceImpl.java
@@ -108,6 +108,9 @@ public class SignInServiceImpl implements ISignInService { @@ -108,6 +108,9 @@ public class SignInServiceImpl implements ISignInService {
108 signIn.setCreateTime(new Date()); 108 signIn.setCreateTime(new Date());
109 signIn.setRemark(""); 109 signIn.setRemark("");
110 // 签到检查 酒精检查 超时检查 排班检查 110 // 签到检查 酒精检查 超时检查 排班检查
  111 + if (signIn.getJobCode().equals("700002") || signIn.getJobCode().equals("700001")){
  112 + return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo);
  113 + }
111 if (checkSignIn(signIn, driver)) { 114 if (checkSignIn(signIn, driver)) {
112 signIn.setStatus(SIGN_IN_SUCCESS); 115 signIn.setStatus(SIGN_IN_SUCCESS);
113 } else { 116 } else {
@@ -128,11 +131,12 @@ public class SignInServiceImpl implements ISignInService { @@ -128,11 +131,12 @@ public class SignInServiceImpl implements ISignInService {
128 } 131 }
129 } 132 }
130 if (SIGN_IN_FAIL.equals(signIn.getStatus())) { 133 if (SIGN_IN_FAIL.equals(signIn.getStatus())) {
131 - return AjaxResult.error(SIGN_IN_ERROR + ":" + signIn.getRemark(), vo); 134 + return AjaxResult.error(SIGN_IN_ERROR + ": " + signIn.getRemark(), vo);
132 } 135 }
133 return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo); 136 return AjaxResult.success(SIGN_IN_SUCCESS_STRING, vo);
134 } 137 }
135 138
  139 +
136 /** 140 /**
137 * 修改签到 141 * 修改签到
138 * 142 *
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java
@@ -4,6 +4,7 @@ import java.util.ArrayList; @@ -4,6 +4,7 @@ import java.util.ArrayList;
4 import java.util.List; 4 import java.util.List;
5 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.beans.factory.annotation.Value; 6 import org.springframework.beans.factory.annotation.Value;
  7 +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
7 import org.springframework.context.annotation.Bean; 8 import org.springframework.context.annotation.Bean;
8 import org.springframework.context.annotation.Configuration; 9 import org.springframework.context.annotation.Configuration;
9 import com.ruoyi.common.config.RuoYiConfig; 10 import com.ruoyi.common.config.RuoYiConfig;
@@ -27,6 +28,7 @@ import springfox.documentation.spring.web.plugins.Docket; @@ -27,6 +28,7 @@ import springfox.documentation.spring.web.plugins.Docket;
27 * 28 *
28 * @author ruoyi 29 * @author ruoyi
29 */ 30 */
  31 +@ConditionalOnProperty(name = "springfox.documentation.auto-startup", havingValue = "true")
30 @Configuration 32 @Configuration
31 public class SwaggerConfig 33 public class SwaggerConfig
32 { 34 {
ruoyi-admin/src/main/resources/application-druid-prd.yml
@@ -6,17 +6,17 @@ spring: @@ -6,17 +6,17 @@ spring:
6 druid: 6 druid:
7 # 主库数据源 7 # 主库数据源
8 master: 8 master:
9 - # 开发地址  
10 -# url: jdbc:mysql://localhost:3306/all-in-one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8  
11 -# username: root  
12 -# password: guzijian 9 + # 测试地址
  10 + url: jdbc:mysql://127.0.0.1:3306/all-in-one?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useAffectedRows=true&allowMultiQueries=true
  11 + username: root
  12 + password: qinpugongjiao20230730
13 # 从库数据源 13 # 从库数据源
14 slave: 14 slave:
15 # 从数据源开关/默认关闭 15 # 从数据源开关/默认关闭
16 enabled: false 16 enabled: false
17 - url:  
18 - username:  
19 - password: 17 + url:
  18 + username:
  19 + password:
20 # 初始连接数 20 # 初始连接数
21 initialSize: 5 21 initialSize: 5
22 # 最小连接池数量 22 # 最小连接池数量
@@ -40,7 +40,7 @@ spring: @@ -40,7 +40,7 @@ spring:
40 testWhileIdle: true 40 testWhileIdle: true
41 testOnBorrow: false 41 testOnBorrow: false
42 testOnReturn: false 42 testOnReturn: false
43 - webStatFilter: 43 + webStatFilter:
44 enabled: true 44 enabled: true
45 statViewServlet: 45 statViewServlet:
46 enabled: true 46 enabled: true
@@ -60,6 +60,47 @@ spring: @@ -60,6 +60,47 @@ spring:
60 wall: 60 wall:
61 config: 61 config:
62 multi-statement-allow: true 62 multi-statement-allow: true
  63 + # 文件上传
  64 + servlet:
  65 + multipart:
  66 + # 单个文件大小
  67 + max-file-size: 100MB
  68 + # 设置总上传的文件大小
  69 + max-request-size: 100MB
  70 + # 服务模块
  71 + devtools:
  72 + restart:
  73 + # 热部署开关
  74 + enabled: true
  75 + # redis 配置
  76 + redis:
  77 + # 地址
  78 + # host: 1.14.107.94
  79 + host: 121.41.83.61
  80 + database: 0
  81 + password: "guzijian"
  82 + port: 6379
  83 + # 连接超时时间
  84 + timeout: 10s
  85 + lettuce:
  86 + pool:
  87 + # 连接池中的最小空闲连接
  88 + min-idle: 0
  89 + # 连接池中的最大空闲连接
  90 + max-idle: 8
  91 + # 连接池的最大数据库连接数
  92 + max-active: 8
  93 + # #连接池最大阻塞等待时间(使用负值表示没有限制)
  94 + max-wait: -1ms
  95 + # token配置
  96 + token:
  97 + # 令牌自定义标识
  98 + header: Authorization
  99 + # 令牌密钥
  100 + secret: abcdefghijklmnopqrstuvwxyz
  101 + # 令牌有效期(默认30分钟)
  102 + expireTime: 30
  103 +
63 # 项目相关配置 104 # 项目相关配置
64 ruoyi: 105 ruoyi:
65 # 名称 106 # 名称
@@ -76,6 +117,24 @@ ruoyi: @@ -76,6 +117,24 @@ ruoyi:
76 addressEnabled: false 117 addressEnabled: false
77 # 验证码类型 math 数字计算 char 字符验证 118 # 验证码类型 math 数字计算 char 字符验证
78 captchaType: math 119 captchaType: math
  120 +# 开发环境配置
  121 +server:
  122 + # 服务器的HTTP端口,默认为8080
  123 + port: 8100
  124 + servlet:
  125 + # 应用的访问路径
  126 + context-path: /
  127 + tomcat:
  128 + # tomcat的URI编码
  129 + uri-encoding: UTF-8
  130 + # 连接数满后的排队数,默认为100
  131 + accept-count: 1000
  132 + threads:
  133 + # tomcat最大线程数,默认为200
  134 + max: 800
  135 + # Tomcat启动初始化的线程数,默认值10
  136 + min-spare: 100
  137 +
79 mybatis-plus: 138 mybatis-plus:
80 # 搜索指定包别名 139 # 搜索指定包别名
81 typeAliasesPackage: com.ruoyi.**.domain 140 typeAliasesPackage: com.ruoyi.**.domain
@@ -87,9 +146,14 @@ mybatis-plus: @@ -87,9 +146,14 @@ mybatis-plus:
87 swagger: 146 swagger:
88 # 是否开启swagger 147 # 是否开启swagger
89 enabled: false 148 enabled: false
  149 + production: true
90 # 请求前缀 150 # 请求前缀
91 # pathMapping: /dev-api 151 # pathMapping: /dev-api
92 pathMapping: / 152 pathMapping: /
  153 +springfox:
  154 + documentation:
  155 + auto-startup: false
  156 + enabled: false
93 api: 157 api:
94 url: 158 url:
95 # all 为获取所有驾驶员信息 159 # all 为获取所有驾驶员信息
@@ -99,6 +163,7 @@ api: @@ -99,6 +163,7 @@ api:
99 # 获取排班信息 163 # 获取排班信息
100 getSchedulingInfo: http://101.95.136.206:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s 164 getSchedulingInfo: http://101.95.136.206:9089/webservice/rest/schedule_real/sch_jk/%s/%s?timestamp=%d&nonce=%s&password=%s&sign=%s
101 config: 165 config:
  166 + # 固定密码
102 password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464 167 password: c4dd3d8cb9a82f6d6a625818618b28ca7bebb464
103 # 随机字符串 168 # 随机字符串
104 nonce: adfsad 169 nonce: adfsad
@@ -108,6 +173,9 @@ api: @@ -108,6 +173,9 @@ api:
108 headImage: /head/image 173 headImage: /head/image
109 174
110 personnel: 175 personnel:
111 - tokenUrl: https://api.dingtalk.com/v1.0/oauth2/accessToken  
112 - appKey: dingsclwvxui5zilg1xk  
113 - appSecret: ckV20k3jMKJpUkfXXSGhLk077rQQjsSaAusiSVY-nm4glwweCmb_SMJ62Cpf4YQ5  
114 \ No newline at end of file 176 \ No newline at end of file
  177 + token:
  178 + tokenUrl: https://api.dingtalk.com/v1.0/oauth2/accessToken
  179 + appKey: dingsclwvxui5zilg1xk
  180 + appSecret: ckV20k3jMKJpUkfXXSGhLk077rQQjsSaAusiSVY-nm4glwweCmb_SMJ62Cpf4YQ5
  181 + people:
  182 + url: https://api.dingtalk.com/v1.0/yida/forms/instances/search
115 \ No newline at end of file 183 \ No newline at end of file
ruoyi-admin/src/main/resources/logback.xml
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <configuration> 2 <configuration>
3 <!-- 日志存放路径 --> 3 <!-- 日志存放路径 -->
4 -<!-- <property name="log.path" value="D:/ruoyi/logs" />-->  
5 - <property name="log.path" value="/home/ruoyi/logs" /> 4 + <property name="log.path" value="D:/ruoyi/logs" />
  5 +<!-- <property name="log.path" value="/home/ruoyi/logs" />-->
6 <!-- 日志输出格式 --> 6 <!-- 日志输出格式 -->
7 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> 7 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
8 8