Commit 4cac73f96e5c3dc2d550298e8e441e901fab65bd

Authored by liujun001
1 parent bdc1a9f1

同步司机信息

Bsth-admin/pom.xml
... ... @@ -21,6 +21,8 @@
21 21 <artifactId>spring-boot-starter-test</artifactId>
22 22 <scope>test</scope>
23 23 </dependency>
  24 +
  25 +
24 26 <dependency>
25 27 <groupId>junit</groupId>
26 28 <artifactId>junit</artifactId>
... ... @@ -119,6 +121,36 @@
119 121 <version>3.0.0</version>
120 122 </dependency>
121 123  
  124 + <dependency>
  125 + <groupId>com.kingdee.shr</groupId>
  126 + <artifactId>shr_sso_client</artifactId>
  127 + <version>1.0.0</version>
  128 + </dependency>
  129 +
  130 + <dependency>
  131 + <groupId>org.apache.httpcomponents</groupId>
  132 + <artifactId>httpclient</artifactId>
  133 + <version>4.5</version>
  134 + </dependency>
  135 +
  136 + <dependency>
  137 + <groupId>org.apache.httpcomponents</groupId>
  138 + <artifactId>httpcore</artifactId>
  139 + <version>4.4.1</version>
  140 + </dependency>
  141 +
  142 + <dependency>
  143 + <groupId>org.apache.httpcomponents</groupId>
  144 + <artifactId>httpclient</artifactId>
  145 + <version>4.5</version>
  146 + </dependency>
  147 +
  148 + <dependency>
  149 + <groupId>org.apache.httpcomponents</groupId>
  150 + <artifactId>commons-httpclient</artifactId>
  151 + <version>3.1</version>
  152 + </dependency>
  153 +
122 154 </dependencies>
123 155  
124 156 <build>
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/TestController.java
... ... @@ -2,6 +2,7 @@ package com.ruoyi.controller;
2 2  
3 3 import com.ruoyi.common.core.domain.ResponseResult;
4 4 import com.ruoyi.job.DriverJob;
  5 +import com.ruoyi.service.driver.NewDriverService;
5 6 import com.ruoyi.service.key.location.LinggangKeyWorkLocationService;
6 7 import io.swagger.annotations.ApiOperation;
7 8 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -20,6 +21,8 @@ public class TestController {
20 21 private DriverJob driverJob;
21 22 @Autowired
22 23 private LinggangKeyWorkLocationService keyWorkLocationService;
  24 + @Autowired
  25 + private NewDriverService newDriverService;
23 26  
24 27 @GetMapping(value = "/test")
25 28 @ApiOperation("test")
... ... @@ -34,4 +37,10 @@ public class TestController {
34 37 keyWorkLocationService.insertJob("2024-07-30");
35 38 return ResponseResult.success();
36 39 }
  40 +
  41 + @GetMapping(value = "/driver")
  42 + public ResponseResult<Boolean> insertDriver(){
  43 + newDriverService.insertJob();
  44 + return ResponseResult.success();
  45 + }
37 46 }
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
... ... @@ -522,7 +522,7 @@ public class KeyBoxController extends BaseController {
522 522 }
523 523  
524 524 Optional<CarInfo> carInfoOptional = carInfos.stream().filter(c -> Objects.equals(c.getNbbm(), sc.getNbbm())).findFirst();
525   - if (!optional.isPresent()) {
  525 + if (!carInfoOptional.isPresent()) {
526 526 return null;
527 527  
528 528 }
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/driver/NewDriver.java
... ... @@ -140,7 +140,7 @@ public class NewDriver {
140 140 /***同步结果状态;0成功,1失败*/
141 141 @Excel(name = "同步结果状态;0成功,1失败")
142 142 @TableField(value = "driver_integer")
143   - private java.lang.Integer integer;
  143 + private java.lang.Integer integer1;
144 144  
145 145  
146 146 /***同步内容*/
... ... @@ -160,6 +160,13 @@ public class NewDriver {
160 160 @TableField(exist = false)
161 161 private float imageScore;
162 162  
  163 + public Integer getInteger() {
  164 + return integer1;
  165 + }
  166 +
  167 + public void setInteger(Integer integer) {
  168 + this.integer1 = integer1;
  169 + }
163 170  
164 171 @Override
165 172 public String toString() {
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/equipment/self/check/LingangEquimentSelfCheck.java
... ... @@ -12,6 +12,8 @@ import lombok.NoArgsConstructor;
12 12 import lombok.experimental.Accessors;
13 13 import lombok.extern.slf4j.Slf4j;
14 14  
  15 +import java.util.Date;
  16 +
15 17  
16 18 @Data
17 19 @Slf4j
... ... @@ -69,13 +71,13 @@ public class LingangEquimentSelfCheck {
69 71 /***锁控状态 1正常,2故障,null/3未检测到*/
70 72 @Excel(name = "锁控状态 1正常,2故障,null/3未检测到")
71 73 @TableField(value = "equiment_self_lock")
72   - private java.lang.Integer lock;
  74 + private java.lang.Integer lock1;
73 75  
74 76  
75 77 /***设备传过来的时间*/
76 78 @Excel(name = "设备传过来的时间")
77 79 @TableField(value = "equiment_self_time")
78   - private java.util.Date time;
  80 + private java.util.Date time1;
79 81  
80 82  
81 83 /***设备类型*/
... ... @@ -112,6 +114,21 @@ public class LingangEquimentSelfCheck {
112 114 @Excel(name = "修改时间")
113 115 private java.util.Date updateTime;
114 116  
  117 + public Integer getLock() {
  118 + return lock1;
  119 + }
  120 +
  121 + public void setLock(Integer lock) {
  122 + this.lock1 = lock;
  123 + }
  124 +
  125 + public Date getTime() {
  126 + return time1;
  127 + }
  128 +
  129 + public void setTime(Date time1) {
  130 + this.time1 = time1;
  131 + }
115 132  
116 133 @Override
117 134 public String toString() {
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/resource/LinggangSignInResource.java
... ... @@ -36,7 +36,7 @@ public class LinggangSignInResource {
36 36 /***顺序*/
37 37 @Excel(name = "顺序")
38 38 @TableField(value = "sign_in_resource_index")
39   - private Integer index;
  39 + private Integer index1;
40 40  
41 41  
42 42 /***资源类型:1是图片;2是视频*/
... ... @@ -78,6 +78,13 @@ public class LinggangSignInResource {
78 78 @TableField(exist = false)
79 79 private String content;
80 80  
  81 + public Integer getIndex() {
  82 + return index1;
  83 + }
  84 +
  85 + public void setIndex(Integer index1) {
  86 + this.index1 = index1;
  87 + }
81 88  
82 89 @Override
83 90 public String toString() {
... ...
Bsth-admin/src/main/java/com/ruoyi/service/driver/NewDriverService.java
... ... @@ -60,6 +60,8 @@ public interface NewDriverService extends IService&lt;NewDriver&gt; {
60 60 /***插入数据*/
61 61 boolean insert(NewDriver entity);
62 62  
  63 + boolean insertJob();
  64 +
63 65 /**
64 66 * 根据主键修改数据
65 67 */
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/driver/NewDriverServiceImpl.java
... ... @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
6 6 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8 8 import com.github.pagehelper.PageHelper;
  9 +import com.kingdee.shr.api.Response;
  10 +import com.kingdee.shr.api.SHRClient;
9 11 import com.ruoyi.common.TipEnum;
10 12 import com.ruoyi.common.core.domain.ResponseResult;
11 13 import com.ruoyi.common.utils.StringUtils;
... ... @@ -21,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
21 23 import org.springframework.stereotype.Service;
22 24  
23 25 import java.io.File;
  26 +import java.io.IOException;
24 27 import java.util.*;
25 28  
26 29 @Service
... ... @@ -169,6 +172,29 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
169 172 return save(entity);
170 173 }
171 174  
  175 + @Override
  176 + public boolean insertJob() {
  177 + String SHR_LOCAL = "http://dsh.bdo2o.com:6280/shr";
  178 + //OSF���ƣ�ע�������Ʋ��DZ���
  179 + String serviceName = "getPersonByListService";
  180 + SHRClient client = new SHRClient();
  181 + //����OSF����Ҫ�IJ���
  182 + Map<String,Object> param = new HashMap<String,Object>();
  183 +
  184 + ArrayList<String> dataList = new ArrayList<String>();
  185 + dataList.add("05-008018");
  186 + param.put("personlist", dataList);
  187 + Response res = null;
  188 + try {
  189 + res = client.executeService(SHR_LOCAL ,serviceName,param);
  190 + } catch (IOException e) {
  191 + throw new RuntimeException(e);
  192 + }
  193 + System.out.println(res.getData());
  194 +
  195 + return false;
  196 + }
  197 +
172 198 /**
173 199 * 根据主键修改数据
174 200 */
... ...
Bsth-admin/src/main/resources/libs/arcsoft-sdk-face-3.0.0.0.jar deleted 100644 → 0
No preview for this file type