Commit 3168b6ae0389b74ea2eaba4620e34cc1dff5d808

Authored by guzijian
1 parent 9d2c2b6e

fix: 修改人脸更新接口逻辑

ruoyi-admin/src/main/java/com/ruoyi/job/DriverJob.java
@@ -224,6 +224,7 @@ public class DriverJob implements InitializingBean { @@ -224,6 +224,7 @@ public class DriverJob implements InitializingBean {
224 int countPage = vo.getTotalCount() / pageSize; 224 int countPage = vo.getTotalCount() / pageSize;
225 countPage = vo.getTotalCount() % pageSize == 0 ? countPage : countPage + 1; 225 countPage = vo.getTotalCount() % pageSize == 0 ? countPage : countPage + 1;
226 List<Driver> drivers = getDrivers(date, vo); 226 List<Driver> drivers = getDrivers(date, vo);
  227 +// updateDrivers(drivers);
227 saveDrivers(drivers, accessToken); 228 saveDrivers(drivers, accessToken);
228 for (int i = 1; i <= countPage; ) { 229 for (int i = 1; i <= countPage; ) {
229 if (++i <= countPage) { 230 if (++i <= countPage) {
ruoyi-admin/src/main/java/com/ruoyi/pojo/request/FaceUpdateReqVo.java
@@ -11,45 +11,49 @@ import java.util.List; @@ -11,45 +11,49 @@ import java.util.List;
11 11
12 /** 12 /**
13 * 人脸更新数据 13 * 人脸更新数据
  14 + *
14 * @author 20412 15 * @author 20412
15 */ 16 */
16 @Data 17 @Data
17 @ApiModel("人脸更新数据") 18 @ApiModel("人脸更新数据")
18 public class FaceUpdateReqVo { 19 public class FaceUpdateReqVo {
19 - @ApiModelProperty("人脸数据") 20 + @ApiModelProperty(value = "人脸数据",required = true)
20 @NotEmpty(message = "人脸数据集合不能为空") 21 @NotEmpty(message = "人脸数据集合不能为空")
21 @Valid 22 @Valid
22 List<FaceData> faceDataList; 23 List<FaceData> faceDataList;
23 - @Data  
24 - @ApiModel("FaceData")  
25 - public static class FaceData{  
26 - /**  
27 - * 工号  
28 - */  
29 - @ApiModelProperty("工号")  
30 - @NotBlank(message = "工号不能为空")  
31 - String jobCode;  
32 - /**  
33 - * 图片url不能为空  
34 - */  
35 - @ApiModelProperty("图片url")  
36 - @NotBlank(message = "图片url不能为空")  
37 - String imageUrl;  
38 - /**  
39 - * 姓名  
40 - */  
41 - @ApiModelProperty("姓名")  
42 - @NotBlank(message = "姓名不能为空")  
43 - String name;  
44 - /**  
45 - * 工种  
46 - */  
47 - @ApiModelProperty("工种")  
48 - @NotBlank(message = "工种不能为空")  
49 - String posts;  
50 - @ApiModelProperty("线路")  
51 - String lineName;  
52 - @ApiModelProperty("车队")  
53 - String fleetName;  
54 - } 24 +
  25 + @Data
  26 + @ApiModel("FaceData")
  27 + public static class FaceData {
  28 + /**
  29 + * 工号
  30 + */
  31 + @ApiModelProperty(value = "工号",required = true)
  32 + @NotBlank(message = "工号不能为空")
  33 + String jobCode;
  34 + /**
  35 + * 图片url不能为空
  36 + */
  37 + @ApiModelProperty(value = "图片url",required = true)
  38 + @NotBlank(message = "图片url不能为空")
  39 + String imageUrl;
  40 + /**
  41 + * 姓名
  42 + */
  43 + @ApiModelProperty(value = "姓名",required = true)
  44 + @NotBlank(message = "姓名不能为空")
  45 + String name;
  46 + /**
  47 + * 工种
  48 + */
  49 + @ApiModelProperty(value = "工种",required = true)
  50 + @NotBlank(message = "工种不能为空")
  51 + String posts;
  52 + @ApiModelProperty(value = "线路",required = true)
  53 + @NotBlank(message = "线路不能为空")
  54 + String lineName;
  55 + @ApiModelProperty(value = "车队名称",required = true)
  56 + @NotBlank(message = "车队名称不能为空")
  57 + String fleetName;
  58 + }
55 } 59 }
ruoyi-admin/src/main/resources/application-druid-prd.yml
@@ -110,8 +110,8 @@ ruoyi: @@ -110,8 +110,8 @@ ruoyi:
110 copyrightYear: 2023 110 copyrightYear: 2023
111 # 实例演示开关 111 # 实例演示开关
112 demoEnabled: true 112 demoEnabled: true
113 - # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)  
114 - profile: D:/ruoyi/uploadPath 113 + # 文件路径 示例( Windows配置E:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
  114 + profile: E:/ruoyi/uploadPath
115 # 获取ip地址开关 115 # 获取ip地址开关
116 addressEnabled: false 116 addressEnabled: false
117 # 验证码类型 math 数字计算 char 字符验证 117 # 验证码类型 math 数字计算 char 字符验证
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="E:/ruoyi/logs" />-->
  5 +<!-- <property name="log.path" value="D:/ruoyi/logs" />-->
  6 + <property name="log.path" value="/home/ruoyi/logs" />
6 <!-- 日志输出格式 --> 7 <!-- 日志输出格式 -->
7 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> 8 <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
8 9
ruoyi-admin/src/main/resources/mapper/driver/DriverMapper.xml
@@ -168,7 +168,8 @@ @@ -168,7 +168,8 @@
168 <if test="lineCode != null">line_code,</if> 168 <if test="lineCode != null">line_code,</if>
169 <if test="faceSignIn != null">face_sign_in,</if> 169 <if test="faceSignIn != null">face_sign_in,</if>
170 <if test="image != null">image,</if> 170 <if test="image != null">image,</if>
171 - <if test="updateTime != null">update_time</if> 171 + <if test="updateTime != null">update_time,</if>
  172 + <if test="fleetName != null">fleet_name</if>
172 </trim> 173 </trim>
173 <trim prefix="values (" suffix=")" suffixOverrides=","> 174 <trim prefix="values (" suffix=")" suffixOverrides=",">
174 <if test="jobCode != null and jobCode != ''">#{jobCode},</if> 175 <if test="jobCode != null and jobCode != ''">#{jobCode},</if>
@@ -189,7 +190,8 @@ @@ -189,7 +190,8 @@
189 <if test="lineCode != null">#{lineCode},</if> 190 <if test="lineCode != null">#{lineCode},</if>
190 <if test="faceSignIn != null">#{faceSignIn},</if> 191 <if test="faceSignIn != null">#{faceSignIn},</if>
191 <if test="image != null">#{image},</if> 192 <if test="image != null">#{image},</if>
192 - <if test="updateTime != null">#{updateTime}</if> 193 + <if test="updateTime != null">#{updateTime},</if>
  194 + <if test="fleetName != null">#{fleetName}</if>
193 </trim> 195 </trim>
194 on duplicate key update 196 on duplicate key update
195 job_code = values(job_code) 197 job_code = values(job_code)
@@ -215,8 +217,9 @@ @@ -215,8 +217,9 @@
215 <if test="lineName != null">line_name = #{lineName},</if> 217 <if test="lineName != null">line_name = #{lineName},</if>
216 <if test="lineCode != null">line_code = #{lineCode},</if> 218 <if test="lineCode != null">line_code = #{lineCode},</if>
217 <if test="faceSignIn != null">face_sign_in = #{faceSignIn},</if> 219 <if test="faceSignIn != null">face_sign_in = #{faceSignIn},</if>
218 - <if test="image != null">image = #{image}</if>  
219 - <if test="signInEquipment != null">sign_in_equipment = #{signInEquipment}</if> 220 + <if test="image != null">image = #{image},</if>
  221 + <if test="signInEquipment != null">sign_in_equipment = #{signInEquipment},</if>
  222 + <if test="fleetName != null">fleet_name = #{fleetName}</if>
220 </trim> 223 </trim>
221 where id = #{id} 224 where id = #{id}
222 </update> 225 </update>