Commit da4006aca2a9a41e7521a0f1f6be838a5697ffb4

Authored by liujun001
1 parent 95f010f4

拉去蓝斯头像特征

Showing 32 changed files with 1738 additions and 265 deletions
Bsth-admin/pom.xml
... ... @@ -109,11 +109,7 @@
109 109 <groupId>com.Bsth</groupId>
110 110 <artifactId>Bsth-generator</artifactId>
111 111 </dependency>
112   - <dependency>
113   - <groupId>org.apache.httpcomponents</groupId>
114   - <artifactId>httpclient</artifactId>
115   - <version>4.5.13</version>
116   - </dependency>
  112 +
117 113  
118 114 <dependency>
119 115 <groupId>com.arcsoft.face</groupId>
... ... @@ -124,7 +120,7 @@
124 120 <dependency>
125 121 <groupId>com.kingdee.shr</groupId>
126 122 <artifactId>shr_sso_client</artifactId>
127   - <version>1.0.0</version>
  123 + <version>1.0.1</version>
128 124 </dependency>
129 125  
130 126 <dependency>
... ... @@ -139,11 +135,7 @@
139 135 <version>4.4.1</version>
140 136 </dependency>
141 137  
142   - <dependency>
143   - <groupId>org.apache.httpcomponents</groupId>
144   - <artifactId>httpclient</artifactId>
145   - <version>4.5</version>
146   - </dependency>
  138 +
147 139  
148 140 <dependency>
149 141 <groupId>org.apache.httpcomponents</groupId>
... ...
Bsth-admin/src/main/java/com/ruoyi/config/BsthSystemConfig.java
1 1 package com.ruoyi.config;
2 2  
  3 +import com.ruoyi.common.config.RuoYiConfig;
3 4 import lombok.Data;
  5 +import org.apache.commons.lang3.ArrayUtils;
  6 +import org.springframework.beans.factory.annotation.Autowired;
4 7 import org.springframework.beans.factory.annotation.Value;
5 8 import org.springframework.stereotype.Component;
6 9  
... ... @@ -11,11 +14,11 @@ import org.springframework.stereotype.Component;
11 14 @Data
12 15 @Component
13 16 public class BsthSystemConfig {
14   - @Value("${bsth.upload.image.basePath}")
15   - private String imageBasePath;
  17 + @Value("${api.sign.image}")
  18 + private String imageBasePath1;
16 19  
17   - @Value("${bsth.upload.video.basePath}")
18   - private String videoBasePath;
  20 + @Value("${api.video.basePath}")
  21 + private String videoBasePath1;
19 22  
20 23 @Value("${bsth.face.app.id}")
21 24 private String faceAppId;
... ... @@ -27,4 +30,27 @@ public class BsthSystemConfig {
27 30 @Value("${api.url.getDriverInfo}")
28 31 private String getDriverInfoURL;
29 32  
  33 + @Autowired
  34 + private RuoYiConfig ruoYiConfig;
  35 +
  36 + @Value("${bsth.face.faceFeature.url}")
  37 + private String faceFeatureURL;
  38 +
  39 + public String getImageBasePath(){
  40 + return combationChar(ruoYiConfig.getUploadPath(),imageBasePath1);
  41 + }
  42 +
  43 +
  44 + public String getVideoBasePath(){
  45 + return combationChar(ruoYiConfig.getUploadPath(),videoBasePath1);
  46 + }
  47 +
  48 + public static String combationChar(String...strs){
  49 + StringBuilder builder = new StringBuilder();
  50 + int length = ArrayUtils.getLength(strs);
  51 + for (int i = 0; i < length; i++) {
  52 + builder.append(strs[i]);
  53 + }
  54 + return builder.toString();
  55 + }
30 56 }
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/TestController.java
... ... @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation;
8 8 import org.springframework.beans.factory.annotation.Autowired;
9 9 import org.springframework.web.bind.annotation.GetMapping;
10 10 import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestParam;
11 12 import org.springframework.web.bind.annotation.RestController;
12 13  
13 14 /**
... ... @@ -33,8 +34,8 @@ public class TestController {
33 34  
34 35 @GetMapping(value = "/key/info/local")
35 36 @ApiOperation("/key/info/local")
36   - public ResponseResult<Boolean> testKeyInfoLocal() {
37   - keyWorkLocationService.insertJob("2024-07-30");
  37 + public ResponseResult<Boolean> testKeyInfoLocal(@RequestParam("dateStr") String dateStr) {
  38 + keyWorkLocationService.insertJob(dateStr);
38 39 return ResponseResult.success();
39 40 }
40 41  
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssDriverController.java
... ... @@ -88,7 +88,18 @@ public class DssDriverController extends BaseController {
88 88 if (bindingResult.hasErrors()) {
89 89 return ResponseResult.error(bindingResult.getFieldError().getDefaultMessage());
90 90 }
91   - NewDriver driver = faceService.checkFace(convertLoginDriverDTO(loginDriverDTO));
  91 + NewDriver driver = null;
  92 + if (Objects.equals(loginDriverDTO.getAuthType(), 1)) {
  93 + NewDriver sDriver = new NewDriver();
  94 + sDriver.setIcCardCode(loginDriverDTO.getAuthValue());
  95 + driver = newDriverService.getOne(sDriver);
  96 + } else {
  97 + driver = faceService.checkFace(convertLoginDriverDTO(loginDriverDTO));
  98 + }
  99 + if (Objects.isNull(driver)) {
  100 + return ResponseResult.error404();
  101 + }
  102 + driver = faceService.checkFace(convertLoginDriverDTO(loginDriverDTO));
92 103 return ResponseResult.success(convertNewDriver(driver));
93 104 }
94 105  
... ... @@ -114,9 +125,9 @@ public class DssDriverController extends BaseController {
114 125  
115 126 SignInResponseVo responseVo = (SignInResponseVo) ajaxResult.get(AjaxResult.DATA_TAG);
116 127 if (Objects.nonNull(responseVo)) {
117   - ResponseResult<DssSignVo> responseResult = ResponseResult.success(convertSignInVo(responseVo,dto,dictData));
  128 + ResponseResult<DssSignVo> responseResult = ResponseResult.success(convertSignInVo(responseVo, dto, dictData));
118 129 responseResult.setMsg(Convert.toStr(ajaxResult.get(AjaxResult.MSG_TAG)));
119   - return responseResult;
  130 + return responseResult;
120 131 }
121 132 }
122 133  
... ... @@ -141,9 +152,9 @@ public class DssDriverController extends BaseController {
141 152 if (Objects.nonNull(ajaxResult) && ajaxResult.isSuccess()) {
142 153 SignInResponseVo responseVo = (SignInResponseVo) ajaxResult.get(AjaxResult.DATA_TAG);
143 154 if (Objects.nonNull(responseVo)) {
144   - ResponseResult<SignOutVo> responseResult = ResponseResult.success(convertSignOutVo(dto,responseVo));
  155 + ResponseResult<SignOutVo> responseResult = ResponseResult.success(convertSignOutVo(dto, responseVo));
145 156 responseResult.setMsg(Convert.toStr(ajaxResult.get(AjaxResult.MSG_TAG)));
146   - return responseResult;
  157 + return responseResult;
147 158 }
148 159 }
149 160  
... ... @@ -154,7 +165,7 @@ public class DssDriverController extends BaseController {
154 165 }
155 166 }
156 167  
157   - @GetMapping(value = "/Driver/GetWineRecord")
  168 + @PostMapping(value = "/Driver/GetWineRecord")
158 169 @ApiOperation("校验司机酒测记录是否有效")
159 170 public ResponseResult<GetWineRecordVo> getWineRecord(@Valid @RequestBody DssGetWineRecordDTO dto, BindingResult bindingResult) {
160 171 if (bindingResult.hasErrors()) {
... ... @@ -162,7 +173,6 @@ public class DssDriverController extends BaseController {
162 173 }
163 174  
164 175  
165   -
166 176 SignIn signIn = convertSignIn(dto);
167 177 SignIn dataSignIn = signInService.getLastOne(signIn);
168 178 return ResponseResult.success(convertGetWineRecordVo(dataSignIn));
... ... @@ -474,13 +484,13 @@ public class DssDriverController extends BaseController {
474 484 return resource;
475 485 }
476 486  
477   - private DssSignVo convertSignInVo(SignInResponseVo responseVo,DssSignDTO dto,SysDictData dictData ) {
  487 + private DssSignVo convertSignInVo(SignInResponseVo responseVo, DssSignDTO dto, SysDictData dictData) {
478 488 DssSignVo vo = new DssSignVo();
479 489 vo.setTestId(Convert.toStr(responseVo.getId()));
480 490  
481 491 Integer testResult = Objects.equals(responseVo.getExType(), 3) ? 2 : 0;
482 492 vo.setTestResult(testResult);
483   - if(Objects.isNull(dictData) || Objects.equals(testResult,0) && dto.getTestValue()>Convert.toLong(dictData.getDictValue())){
  493 + if (Objects.isNull(dictData) || Objects.equals(testResult, 0) && dto.getTestValue() > Convert.toLong(dictData.getDictValue())) {
484 494 vo.setTestResult(1);
485 495 }
486 496  
... ... @@ -490,8 +500,8 @@ public class DssDriverController extends BaseController {
490 500 return vo;
491 501 }
492 502  
493   - private SignOutVo convertSignOutVo(DssSignOutDTO dto,SignInResponseVo vo) {
494   - return new SignOutVo(dto.getDevice(), dto.getDriverCode(), dto.getLogoutTime(),vo.getId());
  503 + private SignOutVo convertSignOutVo(DssSignOutDTO dto, SignInResponseVo vo) {
  504 + return new SignOutVo(dto.getDevice(), dto.getDriverCode(), dto.getLogoutTime(), vo.getId());
495 505 }
496 506  
497 507 private GetWineRecordVo convertGetWineRecordVo(SignIn signIn) {
... ... @@ -529,7 +539,7 @@ public class DssDriverController extends BaseController {
529 539 vo.setSelfCode(scheduling.getNbbm());
530 540 vo.setStartStation(scheduling.getQdzname());
531 541  
532   - String upDown = Objects.equals(0,scheduling.getUpdown())?"1":Objects.equals(1,scheduling.getUpdown())?"2":null;
  542 + String upDown = Objects.equals(0, scheduling.getUpdown()) ? "1" : Objects.equals(1, scheduling.getUpdown()) ? "2" : null;
533 543 vo.setUpDown(upDown);
534 544 if (CollectionUtils.isNotEmpty(carInfos)) {
535 545 Optional<CarInfo> optional = carInfos.stream().filter(c -> Objects.equals(c.getNbbm(), scheduling.getNbbm())).findFirst();
... ... @@ -581,11 +591,11 @@ public class DssDriverController extends BaseController {
581 591 vo.setCheckResult(Convert.toStr(s.getStatus()));
582 592 vo.setDrunkNum(Convert.toStr(s.getAlcoholIntake()));
583 593  
584   - switch (s.getExType()){
  594 + switch (s.getExType()) {
585 595 case 44:
586 596 vo.setDrunkStatus("11");
587 597 break;
588   - case 3:
  598 + case 3:
589 599 vo.setDrunkStatus("12");
590 600 break;
591 601 default:
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssEquipmentController.java
... ... @@ -55,7 +55,7 @@ import java.util.stream.Collectors;
55 55 */
56 56 @RestController
57 57 @Slf4j
58   -@RequestMapping("/dss/Driver")
  58 +@RequestMapping("/dss")
59 59 @Api(tags = "【蓝斯一期】设备信息")
60 60 public class DssEquipmentController extends BaseController {
61 61 @Autowired
... ... @@ -78,7 +78,7 @@ public class DssEquipmentController extends BaseController {
78 78  
79 79  
80 80 @ApiOperation("设备获取访问令牌")
81   - @GetMapping("/Auth")
  81 + @PostMapping("/Driver/Auth")
82 82 public ResponseResult<AuthVo> auth(@Valid @RequestBody EquipmentAuthDTO dto, BindingResult bindingResult) {
83 83 if (bindingResult.hasErrors()) {
84 84 return ResponseResult.error(bindingResult.getFieldError().getDefaultMessage());
... ... @@ -107,7 +107,7 @@ public class DssEquipmentController extends BaseController {
107 107 return ResponseResult.success(vo);
108 108 }
109 109  
110   - @PostMapping("/Heartbeat")
  110 + @PostMapping("/Driver/Heartbeat")
111 111 @ApiOperation("设备报警信息(心跳包)")
112 112 public ResponseResult heartbeat(@Valid @RequestBody HeartbeatDTO heartbeatDTO, BindingResult bindingResult) {
113 113 if (bindingResult.hasErrors()) {
... ... @@ -120,7 +120,7 @@ public class DssEquipmentController extends BaseController {
120 120 return ResponseResult.success();
121 121 }
122 122  
123   - @GetMapping(value = "/getConfig")
  123 + @GetMapping(value = "/device/getConfig")
124 124 @ApiOperation("设备获取远程参数配置")
125 125 @Parameter(name = "device", description = "设备号", required = true)
126 126 public ResponseResult<EquipmentConfigVo> getConfig(@RequestParam(value = "device") String device) {
... ... @@ -141,7 +141,7 @@ public class DssEquipmentController extends BaseController {
141 141 }
142 142  
143 143  
144   - @PostMapping("/selfcheck")
  144 + @PostMapping("/device/selfcheck")
145 145 @ApiOperation("设备获取远程参数配置")
146 146 public ResponseResult selfCheck(@Valid @RequestBody EquipmentSelfcheckDto equipmentSelfcheckDto, BindingResult bindingResult) {
147 147 if (bindingResult.hasErrors()) {
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssFaceController.java
... ... @@ -5,6 +5,8 @@ import cn.hutool.core.convert.Convert;
5 5 import com.ruoyi.common.TipEnum;
6 6 import com.ruoyi.common.core.controller.BaseController;
7 7 import com.ruoyi.common.core.domain.ResponseResult;
  8 +import com.ruoyi.common.utils.file.FileUploadUtils;
  9 +import com.ruoyi.config.BsthSystemConfig;
8 10 import com.ruoyi.domain.driver.NewDriver;
9 11 import com.ruoyi.domain.driver.dss.syn.DrivePosEnum;
10 12 import com.ruoyi.domain.driver.dss.syn.dto.DssDriveQueryDTO;
... ... @@ -17,6 +19,8 @@ import com.ruoyi.domain.driver.dss.syn.res.vo.ReqDataVo;
17 19 import com.ruoyi.domain.driver.dss.syn.vo.DssDriveVo;
18 20 import com.ruoyi.service.driver.NewDriverService;
19 21 import com.ruoyi.service.dss.FaceService;
  22 +import com.ruoyi.utils.HttpClientUtil;
  23 +import com.ruoyi.utils.UploadUtil;
20 24 import io.swagger.annotations.Api;
21 25 import io.swagger.annotations.ApiOperation;
22 26 import lombok.extern.slf4j.Slf4j;
... ... @@ -49,6 +53,14 @@ public class DssFaceController extends BaseController {
49 53 @Autowired
50 54 private FaceService faceService;
51 55  
  56 + @Autowired
  57 + private HttpClientUtil httpClientUtil;
  58 +
  59 + @Autowired
  60 + private BsthSystemConfig bsthSystemConfig;
  61 + @Autowired
  62 + private UploadUtil uploadUtil;
  63 +
52 64 @ApiOperation(value = "05.终端同步人脸数据")
53 65 @PostMapping(value = "/face/syn/reqData")
54 66 public ResponseResult<List<ReqDataVo>> reqData(@Valid @RequestBody ReqDataDTO dto, BindingResult bindingResult) {
... ... @@ -86,7 +98,46 @@ public class DssFaceController extends BaseController {
86 98 if (bindingResult.hasErrors()) {
87 99 return ResponseResult.error(bindingResult.getFieldError().getDefaultMessage());
88 100 }
89   - NewDriver newDriver = convertFaceRegister(dto);
  101 +
  102 + Map<String, Object> parentMap = new HashMap<>();
  103 + parentMap.put("method", "getfacelitefeature");
  104 + parentMap.put("faceid", "1");
  105 + String faceValue = FileUploadUtils.choosePrictureContent(dto.getFaceValue());
  106 + parentMap.put("data", faceValue);
  107 +
  108 + String faceFeature = null;
  109 + String json = null;
  110 + try {
  111 + json = httpClientUtil.doPost(bsthSystemConfig.getFaceFeatureURL(), parentMap, null);
  112 + if (StringUtils.isEmpty(json)) {
  113 + log.warn("获取面部特征失败,请检查数据:[{}]", json);
  114 + return ResponseResult.error("获取面部特征失败,请稍后再试");
  115 + }
  116 + json = StringUtils.substringAfter(json,"{");
  117 + json = StringUtils.substringBeforeLast(json,"}");
  118 + String [] results = StringUtils.split(json,",");
  119 + Map<String,String> resultMap = new HashMap<>();
  120 + for (String result : results) {
  121 + result = StringUtils.replace(result,"\\\"","");
  122 + String key = StringUtils.trim(StringUtils.substringBefore(result,":"));
  123 + String value = StringUtils.trim(StringUtils.substringAfter(result,":"));
  124 + resultMap.put(key,value);
  125 + }
  126 +
  127 +
  128 + if (!StringUtils.equalsIgnoreCase(resultMap.get("result"), "ok")) {
  129 + log.warn("获取面部特征不成功,,请检查数据:[{}]", json);
  130 + return ResponseResult.error("获取面部特征失败,请稍后再试");
  131 + }
  132 + faceFeature = Convert.toStr(resultMap.get("strlitefeature"));
  133 + }catch (Exception e){
  134 + log.error("获取面部特征异常,返回的结果是:[{}]",json,e);
  135 + return ResponseResult.error("获取面部特征异常,请稍后再试");
  136 + }
  137 +
  138 +
  139 + NewDriver newDriver = convertFaceRegister(dto,faceFeature);
  140 +
90 141 TipEnum errorTipEnum = newDriverService.faceRegister(newDriver);
91 142 return new ResponseResult<>(errorTipEnum.getCode(), errorTipEnum.getMsg());
92 143 }
... ... @@ -148,12 +199,14 @@ public class DssFaceController extends BaseController {
148 199 return newDriver;
149 200 }
150 201  
151   - private NewDriver convertFaceRegister(FaceRegisterDTO dto) {
  202 + private NewDriver convertFaceRegister(FaceRegisterDTO dto,String faceFeature) {
152 203 NewDriver newDriver = new NewDriver();
153 204 newDriver.setIcCardCode(dto.getDriverCode());
154 205 newDriver.setFaceSignIn(1);
155 206 newDriver.setSignInEquipment(dto.getDevice());
156 207 newDriver.setImage(dto.getFaceValue());
  208 + newDriver.setJobCode(dto.getStaffCode());
  209 + newDriver.setFaceFeature(faceFeature);
157 210  
158 211 return newDriver;
159 212 }
... ... @@ -171,11 +224,11 @@ public class DssFaceController extends BaseController {
171 224 return faceCheckVo;
172 225 }
173 226  
174   - private List<ReqDataVo> convertReqDataVo(List<NewDriver> drivers){
175   - if(CollectionUtils.isEmpty(drivers)){
  227 + private List<ReqDataVo> convertReqDataVo(List<NewDriver> drivers) {
  228 + if (CollectionUtils.isEmpty(drivers)) {
176 229 return Collections.emptyList();
177 230 }
178   - return drivers.stream().map(d->{
  231 + return drivers.stream().map(d -> {
179 232 ReqDataVo vo = new ReqDataVo();
180 233 vo.setVersionNo(Convert.toStr(d.getImageVersion()));
181 234 vo.setStaffId(Convert.toStr(d.getId()));
... ... @@ -193,73 +246,73 @@ public class DssFaceController extends BaseController {
193 246 }).collect(Collectors.toList());
194 247 }
195 248  
196   - private Set<Integer> switchPostion(String post){
  249 + private Set<Integer> switchPostion(String post) {
197 250  
198 251 Set<Integer> postSet = new LinkedHashSet<>();
199   - if(StringUtils.indexOf(post,"驾驶员") > -1){
  252 + if (StringUtils.indexOf(post, "驾驶员") > -1) {
200 253 postSet.add(2);
201 254 }
202 255  
203   - if(StringUtils.indexOf(post,"集调中心") > -1){
  256 + if (StringUtils.indexOf(post, "集调中心") > -1) {
204 257 postSet.add(3);
205 258 }
206 259  
207   - if(StringUtils.indexOf(post,"稽查") > -1){
  260 + if (StringUtils.indexOf(post, "稽查") > -1) {
208 261 postSet.add(3);
209 262 }
210 263  
211   - if(StringUtils.indexOf(post,"行管员") > -1){
  264 + if (StringUtils.indexOf(post, "行管员") > -1) {
212 265 postSet.add(3);
213 266 }
214 267  
215   - if(StringUtils.indexOf(post,"副队长") > -1){
  268 + if (StringUtils.indexOf(post, "副队长") > -1) {
216 269 postSet.add(3);
217 270 }
218 271  
219   - if(StringUtils.indexOf(post,"调度") > -1){
  272 + if (StringUtils.indexOf(post, "调度") > -1) {
220 273 postSet.add(3);
221 274 }
222 275  
223   - if(StringUtils.indexOf(post,"科员") > -1){
  276 + if (StringUtils.indexOf(post, "科员") > -1) {
224 277 postSet.add(3);
225 278 }
226 279  
227   - if(StringUtils.indexOf(post,"队长") > -1){
  280 + if (StringUtils.indexOf(post, "队长") > -1) {
228 281 postSet.add(3);
229 282 }
230 283  
231   - if(StringUtils.indexOf(post,"车队支部书记") > -1){
  284 + if (StringUtils.indexOf(post, "车队支部书记") > -1) {
232 285 postSet.add(3);
233 286 }
234 287  
235 288  
236   - if(StringUtils.indexOf(post,"部门副经理") > -1){
  289 + if (StringUtils.indexOf(post, "部门副经理") > -1) {
237 290 postSet.add(3);
238 291 }
239 292  
240   - if(StringUtils.indexOf(post,"副总经理") > -1){
  293 + if (StringUtils.indexOf(post, "副总经理") > -1) {
241 294 postSet.add(3);
242 295 }
243 296  
244 297  
245   - if(StringUtils.indexOf(post,"部门经理") > -1){
  298 + if (StringUtils.indexOf(post, "部门经理") > -1) {
246 299 postSet.add(3);
247 300 }
248 301  
249   - if(StringUtils.indexOf(post,"办公室主任") > -1){
  302 + if (StringUtils.indexOf(post, "办公室主任") > -1) {
250 303 postSet.add(3);
251 304 }
252 305  
253   - if(StringUtils.indexOf(post,"办公室副主任") > -1){
  306 + if (StringUtils.indexOf(post, "办公室副主任") > -1) {
254 307 postSet.add(3);
255 308 }
256 309  
257   - if(StringUtils.indexOf(post,"工会副主席") > -1){
  310 + if (StringUtils.indexOf(post, "工会副主席") > -1) {
258 311 postSet.add(3);
259 312 }
260 313  
261 314  
262   - if(CollectionUtils.isEmpty(postSet)){
  315 + if (CollectionUtils.isEmpty(postSet)) {
263 316 postSet.add(1);
264 317 }
265 318  
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
... ... @@ -144,12 +144,6 @@ public class KeyBoxController extends BaseController {
144 144 }
145 145  
146 146 try {
147   - List<LinggangKeyWorkLocation> workLocations = queryKeyWorkLocation(dto);
148   - if (Objects.isNull(workLocations)) {
149   - logger.info("根据DTO的数据无法查询钥匙存放信息:[{}]", dto);
150   - return ResponseResult.error404();
151   - }
152   -
153 147  
154 148 Equipment equipment = queryEquipment(dto.getDevice());
155 149 if (Objects.isNull(equipment)) {
... ... @@ -168,38 +162,48 @@ public class KeyBoxController extends BaseController {
168 162 return ResponseResult.error404();
169 163 }
170 164  
171   - Set<Integer> keyInfoIds = workLocations.stream().map(LinggangKeyWorkLocation::getKeyInfoId).collect(Collectors.toSet());
172   - List<KeyInfo> keyInfos = queryKeyInfos(keyInfoIds);
173   - if (CollectionUtils.isEmpty(keyInfos)) {
174   - logger.info("根据DTO的数据无法查询钥匙信息:[{}]", dto);
175   - return ResponseResult.error404();
  165 + List<LinggangKeyWorkLocation> workLocations = queryKeyWorkLocation(dto);
  166 + Set<Integer> keyInfoIds = null;
  167 + if (CollectionUtils.isNotEmpty(workLocations)) {
  168 + keyInfoIds = workLocations.stream().map(LinggangKeyWorkLocation::getKeyInfoId).collect(Collectors.toSet());
176 169 }
177 170  
  171 + List<KeyInfo> keyInfos = queryKeyInfos(keyInfoIds);
  172 +
178 173 LinggangScheduling scheduling = new LinggangScheduling();
179 174 scheduling.setCzCode(venueInfo.getParkCode());
180 175 scheduling.setStartScheduleDate(DateUtil.shortDate(dto.getTime()));
181 176  
182 177 List<LinggangScheduling> schedulings = schedulingService.listByCZ(scheduling);
183   - if (CollectionUtils.isEmpty(schedulings)) {
184   - logger.info("根据DTO的数据无法查询排班信息:[{}]", dto);
185   - return ResponseResult.error404();
  178 + Set<String> jobCodes = null;
  179 + Set<String> nbbms = null;
  180 + Set<String> nbbms1 = null;
  181 + if (CollectionUtils.isNotEmpty(schedulings)) {
  182 + jobCodes = schedulings.stream().map(LinggangScheduling::getJobCode).collect(Collectors.toSet());
  183 + nbbms = schedulings.stream().map(LinggangScheduling::getNbbm).collect(Collectors.toSet());
  184 + }
  185 +
  186 + scheduling.setEndScheduleDate(scheduling.getStartScheduleDate());
  187 + List<LinggangScheduling> schedulings1 = schedulingService.listByCZ(scheduling);
  188 + if (CollectionUtils.isNotEmpty(schedulings1)) {
  189 + nbbms1 = schedulings1.stream().map(LinggangScheduling::getNbbm).collect(Collectors.toSet());
186 190 }
187 191  
188   - Set<String> jobCodes = schedulings.stream().map(LinggangScheduling::getJobCode).collect(Collectors.toSet());
189 192 List<NewDriver> drivers = queryDrive(jobCodes);
190 193 if (CollectionUtils.isEmpty(drivers)) {
191 194 logger.info("根据DTO的数据无法查询司机信息:[{}]", dto);
192   - return ResponseResult.error404();
193 195 }
194   -
195   - Set<String> nbbms = schedulings.stream().map(LinggangScheduling::getNbbm).collect(Collectors.toSet());
196 196 List<CarInfo> carInfos = queryCarInfo(nbbms);
197 197 if (CollectionUtils.isEmpty(carInfos)) {
198 198 logger.info("根据DTO的数据无法查询车辆信息:[{}]", dto);
199   - return ResponseResult.error404();
200 199 }
201 200  
202   - BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo, equipmentList);
  201 + List<CarInfo> carInfos1 = queryCarInfo(nbbms1);
  202 + if (CollectionUtils.isEmpty(carInfos)) {
  203 + logger.info("根据DTO的数据无法查询车辆信息(carInfos1):[{}]", dto);
  204 + }
  205 +
  206 + BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo, equipmentList,schedulings1,carInfos1);
203 207 return ResponseResult.success(vo);
204 208 } catch (ParseException e) {
205 209 logger.error("钥匙柜基础信息同步异常:[{}]", dto, e);
... ... @@ -236,7 +240,7 @@ public class KeyBoxController extends BaseController {
236 240  
237 241 NewDriver driver = newDriverService.getOne(dto.getDriverCode());
238 242  
239   - List<LinggangKeyWorkLocation> locations = convert(dto, schedulings,driver);
  243 + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver);
240 244 ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.TAKE_OUT);
241 245 if (Objects.isNull(responseResult)) {
242 246 return ResponseResult.error();
... ... @@ -258,7 +262,7 @@ public class KeyBoxController extends BaseController {
258 262  
259 263 NewDriver driver = newDriverService.getOne(dto.getDriverCode());
260 264  
261   - List<LinggangKeyWorkLocation> locations = convert(dto, schedulings,driver);
  265 + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver);
262 266 ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY);
263 267 if (Objects.isNull(responseResult)) {
264 268 return ResponseResult.error();
... ... @@ -478,12 +482,15 @@ public class KeyBoxController extends BaseController {
478 482  
479 483 private BasicSyncVo convertBasicSyncVo(List<LinggangKeyWorkLocation> workLocations, List<LinggangScheduling> schedulings,
480 484 List<KeyInfo> keyInfos, List<NewDriver> drivers, List<CarInfo> carInfos, Equipment equipment,
481   - LinggangVenueInfo venueInfo, List<Equipment> equipmentList) {
  485 + LinggangVenueInfo venueInfo, List<Equipment> equipmentList, List<LinggangScheduling> schedulings1,List<CarInfo> carInfos1) {
482 486 BasicSyncVo vo = new BasicSyncVo();
483 487  
484 488 vo.setDevice(equipment.getDeviceId());
485 489 vo.setDeviceType(equipment.getPromise());
486   - vo.setTime(workLocations.get(0).getScheduleDate());
  490 + if (CollectionUtils.isNotEmpty(workLocations)) {
  491 + vo.setTime(workLocations.get(0).getScheduleDate());
  492 + }
  493 +
487 494 if (Objects.nonNull(venueInfo)) {
488 495 vo.setYardName(venueInfo.getName());
489 496 }
... ... @@ -544,6 +551,13 @@ public class KeyBoxController extends BaseController {
544 551 });
545 552 }
546 553 vo.setDriverWork(driverWork);
  554 + if (CollectionUtils.isNotEmpty(schedulings1) && CollectionUtils.isNotEmpty(carInfos1)) {
  555 + Set<String> nbbms = schedulings1.stream().filter(s -> Objects.equals(s.getQdzcode(), venueInfo.getParkCode()) ||
  556 + Objects.equals(s.getZdzcode(), venueInfo.getParkCode())).map(LinggangScheduling::getNbbm).collect(Collectors.toSet());
  557 + List<String> plateNums = carInfos1.stream().filter(c->nbbms.contains(c.getNbbm())).map(CarInfo::getPlateNum).collect(Collectors.toList());
  558 + vo.setYardVehicles(plateNums);
  559 +
  560 + }
547 561  
548 562 return vo;
549 563 }
... ... @@ -558,7 +572,7 @@ public class KeyBoxController extends BaseController {
558 572 return vo;
559 573 }
560 574  
561   - private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto, List<LinggangKeyWorkLocation> schedulings,NewDriver driver) {
  575 + private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto, List<LinggangKeyWorkLocation> schedulings, NewDriver driver) {
562 576 if (CollectionUtils.isEmpty(dto.getKeyItem())) {
563 577 return Collections.emptyList();
564 578 }
... ... @@ -634,7 +648,7 @@ public class KeyBoxController extends BaseController {
634 648 if (optional.isPresent()) {
635 649 if (Objects.equals(255, optional.get().getType())) {
636 650 keysVO.setState(255);
637   - } else if ((Objects.equals(0, optional.get().getType())||Objects.equals(2, optional.get().getType()))) {
  651 + } else if ((Objects.equals(0, optional.get().getType()) || Objects.equals(2, optional.get().getType()))) {
638 652 keysVO.setState(1);
639 653 }
640 654 }
... ...
Bsth-admin/src/main/java/com/ruoyi/controller/sign/in/exception/report/EquipmentExceptionReportController.java 0 → 100644
  1 +package com.ruoyi.controller.sign.in.exception.report;
  2 +
  3 +import com.baomidou.mybatisplus.core.metadata.IPage;
  4 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5 +import com.ruoyi.common.core.controller.BaseController;
  6 +import com.ruoyi.common.utils.poi.ExcelUtil;
  7 +import com.ruoyi.domain.OrderEntity;
  8 +import com.ruoyi.domain.driver.NewDriver;
  9 +import com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport;
  10 +import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportAddDTO;
  11 +import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportQueryDTO;
  12 +import com.ruoyi.domain.sign.in.exception.report.dto.EquipmentExceptionReportUpdateDTO;
  13 +import com.ruoyi.domain.sign.in.exception.report.vo.EquipmentExceptionReportVO;
  14 +import com.ruoyi.service.driver.NewDriverService;
  15 +import com.ruoyi.service.sign.in.exception.report.EquipmentExceptionReportService;
  16 +import io.swagger.annotations.Api;
  17 +import io.swagger.annotations.ApiOperation;
  18 +import org.apache.commons.collections4.CollectionUtils;
  19 +import org.springframework.beans.BeanUtils;
  20 +import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.security.access.prepost.PreAuthorize;
  22 +import org.springframework.validation.BindingResult;
  23 +import org.springframework.web.bind.annotation.*;
  24 +
  25 +import javax.servlet.http.HttpServletResponse;
  26 +import javax.validation.Valid;
  27 +import java.util.*;
  28 +import java.util.stream.Collectors;
  29 +
  30 +@RestController
  31 +@Api(tags = "打卡异常上报表")
  32 +@RequestMapping("equipment/exception/report")
  33 +public class EquipmentExceptionReportController extends BaseController {
  34 + @Autowired
  35 + private EquipmentExceptionReportService equipmentExceptionReportService;
  36 + @Autowired
  37 + private NewDriverService driverService;
  38 +
  39 + @ApiOperation("分页查询")
  40 + @PreAuthorize("@ss.hasPermi('equipment:exception:report:list:limit:page:limit')")
  41 + @PostMapping(value = "/list/limit/{page}/{pageLimit}")
  42 + public IPage<EquipmentExceptionReportVO> listLimit(@ModelAttribute EquipmentExceptionReportQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) {
  43 + EquipmentExceptionReport entity = convert(request);
  44 + IPage<EquipmentExceptionReport> response = equipmentExceptionReportService.pageList(new Page<EquipmentExceptionReport>(page, pageLimit), entity, orderEntity);
  45 + IPage<EquipmentExceptionReportVO> voiPage = convert(response);
  46 + return voiPage;
  47 + }
  48 +
  49 + @ApiOperation("分页查询-用于对外")
  50 + @PostMapping(value = "/list/limit/contact/{page}/{pageLimit}")
  51 + public IPage<EquipmentExceptionReportVO> listLimitOfContact(@ModelAttribute EquipmentExceptionReportQueryDTO request, @ModelAttribute OrderEntity orderEntity, @PathVariable Integer page, @PathVariable Integer pageLimit, org.springframework.ui.Model model) {
  52 + IPage<EquipmentExceptionReportVO> voiPage = listLimit(request, orderEntity, page, pageLimit, model);
  53 + if (Objects.nonNull(voiPage) && CollectionUtils.isNotEmpty(voiPage.getRecords())) {
  54 + Set<String> jobs = voiPage.getRecords().stream().map(EquipmentExceptionReportVO::getJobCode).collect(Collectors.toSet());
  55 + List<NewDriver> drivers = driverService.list(jobs);
  56 + List<EquipmentExceptionReportVO> vos = voiPage.getRecords().stream().map(v -> {
  57 + if (CollectionUtils.isNotEmpty(drivers)) {
  58 + Optional<NewDriver> optional = drivers.stream().filter(d -> Objects.equals(d.getJobCode(), v.getJobCode())).findFirst();
  59 + if (optional.isPresent()) {
  60 + v.setJobCodeName(optional.get().getPersonnelName());
  61 + }
  62 + }
  63 + return v;
  64 + }).collect(Collectors.toList());
  65 + voiPage.setRecords(vos);
  66 + }
  67 + return voiPage;
  68 + }
  69 +
  70 + @ApiOperation("根据ID查询详情")
  71 + @GetMapping(value = "/view/{id}")
  72 + public com.ruoyi.common.core.domain.ResponseResult<EquipmentExceptionReportVO> view(@PathVariable("id") Long id, org.springframework.ui.Model model) {
  73 + EquipmentExceptionReport source = equipmentExceptionReportService.getById(id);
  74 +
  75 + return com.ruoyi.common.core.domain.ResponseResult.success(convert(source));
  76 + }
  77 +
  78 +
  79 + @PreAuthorize("@ss.hasPermi('equipment:exception:report:export')")
  80 + @ApiOperation("导出")
  81 + @PostMapping("/export")
  82 + public void export(HttpServletResponse response, @RequestBody EquipmentExceptionReportQueryDTO request) {
  83 + EquipmentExceptionReport entity = convert(request);
  84 + List<EquipmentExceptionReport> list = equipmentExceptionReportService.list(entity);
  85 + ExcelUtil<EquipmentExceptionReport> util = new ExcelUtil<EquipmentExceptionReport>(EquipmentExceptionReport.class);
  86 + util.exportExcel(response, list, "EquipmentExceptionReport");
  87 + }
  88 +
  89 + @ApiOperation("添加")
  90 + @PreAuthorize("@ss.hasPermi('equipment:exception:report:add')")
  91 + @PostMapping(value = "/add")
  92 + public com.ruoyi.common.core.domain.ResponseResult add(@Valid @ModelAttribute EquipmentExceptionReportAddDTO request, BindingResult bindingResult) {
  93 + if (bindingResult.hasErrors()) {
  94 + return com.ruoyi.common.core.domain.ResponseResult.error(bindingResult.getFieldError().getDefaultMessage());
  95 + }
  96 + EquipmentExceptionReport entity = convert(request);
  97 + entity.setCreateBy(getUserId());
  98 + entity.setCreateTime(new Date());
  99 + int count = equipmentExceptionReportService.insertSelective(entity);
  100 + return count > 0 ? com.ruoyi.common.core.domain.ResponseResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.ResponseResult.error("添加数据失败,请稍后再试");
  101 + }
  102 +
  103 + @ApiOperation("修改")
  104 + @PreAuthorize("@ss.hasPermi('equipment:exception:report:update')")
  105 + @PostMapping(value = "/update")
  106 + public com.ruoyi.common.core.domain.ResponseResult update(@Valid @ModelAttribute EquipmentExceptionReportUpdateDTO request, BindingResult bindingResult) {
  107 + if (bindingResult.hasErrors()) {
  108 + return com.ruoyi.common.core.domain.ResponseResult.error(bindingResult.getFieldError().getDefaultMessage());
  109 + }
  110 + EquipmentExceptionReport entity = convert(request);
  111 + entity.setUpdateBy(getUserId());
  112 + entity.setUpdateTime(new Date());
  113 + boolean flag = equipmentExceptionReportService.updateByPrimaryKey(entity);
  114 + return flag ? com.ruoyi.common.core.domain.ResponseResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.ResponseResult.error("修改数据失败,请稍后再试");
  115 + }
  116 +
  117 + @PreAuthorize("@ss.hasPermi('equipment:exception:report:del')")
  118 + @ApiOperation("删除数据")
  119 + @GetMapping(value = "/del/{id}")
  120 + public com.ruoyi.common.core.domain.ResponseResult delById(@PathVariable("id") Long id) {
  121 + boolean flag = equipmentExceptionReportService.deleteById(id);
  122 + return flag ? com.ruoyi.common.core.domain.ResponseResult.success(Boolean.TRUE) : com.ruoyi.common.core.domain.ResponseResult.error("操作数据失败,请稍后再试");
  123 + }
  124 +
  125 + private EquipmentExceptionReport convert(EquipmentExceptionReportQueryDTO source) {
  126 + return java.util.Optional.ofNullable(source).map(sc -> {
  127 + EquipmentExceptionReport target = new EquipmentExceptionReport();
  128 + BeanUtils.copyProperties(sc, target);
  129 + return target;
  130 + }).orElse(null);
  131 + }
  132 +
  133 + private EquipmentExceptionReport convert(EquipmentExceptionReportUpdateDTO source) {
  134 + return java.util.Optional.ofNullable(source).map(sc -> {
  135 + EquipmentExceptionReport target = new EquipmentExceptionReport();
  136 + BeanUtils.copyProperties(sc, target);
  137 + return target;
  138 + }).orElse(null);
  139 + }
  140 +
  141 +
  142 + private EquipmentExceptionReport convert(EquipmentExceptionReportAddDTO source) {
  143 + return java.util.Optional.ofNullable(source).map(sc -> {
  144 + EquipmentExceptionReport target = new EquipmentExceptionReport();
  145 + BeanUtils.copyProperties(sc, target);
  146 + return target;
  147 + }).orElseGet(null);
  148 + }
  149 +
  150 + private EquipmentExceptionReportVO convert(EquipmentExceptionReport source) {
  151 + return java.util.Optional.ofNullable(source).map(sc -> {
  152 + EquipmentExceptionReportVO target = new EquipmentExceptionReportVO();
  153 + BeanUtils.copyProperties(source, target);
  154 + return target;
  155 + }).orElseGet(null);
  156 + }
  157 +
  158 + private List<EquipmentExceptionReportVO> convert(List<EquipmentExceptionReport> sources) {
  159 + return java.util.Optional.ofNullable(sources).map(scs -> {
  160 + return scs.stream().map(source -> {
  161 + return convert(source);
  162 + }).collect(java.util.stream.Collectors.toList());
  163 + }).orElseGet(null);
  164 + }
  165 +
  166 + private IPage<EquipmentExceptionReportVO> convert(IPage<EquipmentExceptionReport> sources) {
  167 + return java.util.Optional.ofNullable(sources).map(scs -> {
  168 + IPage<EquipmentExceptionReportVO> target = new Page();
  169 + BeanUtils.copyProperties(scs, target);
  170 + List<EquipmentExceptionReportVO> voNames = convert(scs.getRecords());
  171 + target.setRecords(voNames);
  172 +
  173 + return target;
  174 + }).orElseGet(null);
  175 + }
  176 +}
0 177 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/driver/NewDriver.java
... ... @@ -17,12 +17,13 @@ import lombok.extern.slf4j.Slf4j;
17 17 @TableName("driver")
18 18 public class NewDriver {
19 19 /***主键*/
  20 + @TableId(type = IdType.AUTO)
20 21 @Excel(name = "主键")
21 22 private java.lang.Integer id;
22 23  
23 24  
24 25 /***工号*/
25   - @TableId(value = "job_code", type = IdType.AUTO)
  26 + @TableField(value = "job_code")
26 27 @Excel(name = "工号")
27 28 private java.lang.String jobCode;
28 29  
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/driver/dss/syn/res/dto/FaceRegisterDTO.java
... ... @@ -29,10 +29,14 @@ public class FaceRegisterDTO implements java.io.Serializable {
29 29 @NotEmpty(message = "设备上线号 不能为空")
30 30 @ApiModelProperty(value = "设备上线号", required = true)
31 31 private String device;
32   - @NotEmpty(message = "IC卡号 不能为空")
  32 + // @NotEmpty(message = "IC卡号 不能为空")
33 33 @ApiModelProperty(value = "IC卡号", required = true)
34 34 private String driverCode;
35 35  
  36 + @NotEmpty(message = "工号 不能为空")
  37 + @ApiModelProperty(value = "工号", required = true)
  38 + private String staffCode;
  39 +
36 40 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
37 41 @ApiModelProperty(value = "时间")
38 42 private Date regTime;
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/driver/dss/syn/res/dto/ResDataDriveDTO.java
... ... @@ -10,7 +10,6 @@ import lombok.NoArgsConstructor;
10 10 import lombok.experimental.Accessors;
11 11  
12 12 import javax.validation.constraints.NotEmpty;
13   -import javax.validation.constraints.NotNull;
14 13 import java.util.Set;
15 14  
16 15 /**
... ... @@ -38,7 +37,7 @@ public class ResDataDriveDTO implements java.io.Serializable {
38 37 @ApiModelProperty(value = "设备ID", required = true)
39 38 private String deviceId;
40 39  
41   - @NotEmpty(message = "员工id不能为空")
  40 +
42 41 @ApiModelProperty(value = "员工id", required = true)
43 42 private String staffId;
44 43 @ApiModelProperty(value = "员工姓名")
... ... @@ -54,15 +53,13 @@ public class ResDataDriveDTO implements java.io.Serializable {
54 53 @ApiModelProperty(value = "工号")
55 54 private String staffCode;
56 55  
57   - @NotNull(message = "同步结果状态不能为空")
  56 +
58 57 @ApiModelProperty(value = "同步结果状态;0成功,1失败", required = true, example = "1")
59 58 private Integer integer;
60 59  
61   - @NotEmpty(message = "同步内容不能为空")
62 60 @ApiModelProperty(value = "同步内容", required = true)
63 61 private String synContent;
64 62  
65   - @NotEmpty(message = "物理卡号不能为空")
66 63 @ApiModelProperty(value = "物理卡号", required = true)
67 64 private String csn;
68 65  
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/EquipmentExceptionReport.java 0 → 100644
  1 +package com.ruoyi.domain.sign.in.exception.report;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import com.ruoyi.common.annotation.Excel;
  7 +import lombok.AllArgsConstructor;
  8 +import lombok.Data;
  9 +import lombok.EqualsAndHashCode;
  10 +import lombok.NoArgsConstructor;
  11 +import lombok.experimental.Accessors;
  12 +import lombok.extern.slf4j.Slf4j;
  13 +
  14 +
  15 +@Data
  16 +@Slf4j
  17 +@NoArgsConstructor
  18 +@AllArgsConstructor
  19 +@Accessors(chain = true)
  20 +@EqualsAndHashCode(callSuper = false)
  21 +@TableName("equipment_exception_report")
  22 +/**打卡异常上报表 实体*/
  23 +public class EquipmentExceptionReport {
  24 + /***ID*/
  25 + @TableId(value = "id", type = IdType.AUTO)
  26 + @Excel(name = "ID")
  27 + private Long id;
  28 +
  29 +
  30 + /***标题*/
  31 + @Excel(name = "标题")
  32 + private String title;
  33 +
  34 +
  35 + /***设备id*/
  36 + @Excel(name = "设备id")
  37 + private String deviceId;
  38 +
  39 +
  40 + /***上报人*/
  41 + @Excel(name = "上报人")
  42 + private String jobCode;
  43 +
  44 +
  45 + /***设备图片*/
  46 + @Excel(name = "设备图片")
  47 + private String image;
  48 +
  49 +
  50 + /***处理状态 1 未处理 2 处理中 3 已处理*/
  51 + @Excel(name = "处理状态 1 未处理 2 处理中 3 已处理")
  52 + private Integer status;
  53 +
  54 +
  55 + /***上报时间*/
  56 + @Excel(name = "上报时间")
  57 + private java.util.Date createTime;
  58 +
  59 +
  60 + /***备注*/
  61 + @Excel(name = "备注")
  62 + private String remark;
  63 +
  64 +
  65 + /***异常类型*/
  66 + @Excel(name = "异常类型")
  67 + private Integer exType;
  68 +
  69 +
  70 + /****/
  71 + @Excel(name = "")
  72 + private String fleetName;
  73 +
  74 +
  75 + /****/
  76 + @Excel(name = "")
  77 + private String nbbm;
  78 +
  79 +
  80 + /****/
  81 + @Excel(name = "")
  82 + private String lineName;
  83 +
  84 +
  85 + /****/
  86 + @Excel(name = "")
  87 + private java.util.Date planTime;
  88 +
  89 +
  90 + /****/
  91 + @Excel(name = "")
  92 + private Integer signType;
  93 +
  94 +
  95 + /***上报处理人员*/
  96 + @Excel(name = "上报处理人员")
  97 + private String reportId;
  98 +
  99 +
  100 + /***处理时间*/
  101 + @Excel(name = "处理时间")
  102 + private String reportTime;
  103 +
  104 +
  105 + /***报告状态*/
  106 + @Excel(name = "报告状态")
  107 + private Integer reportOldStatus;
  108 +
  109 +
  110 + /***创建人员*/
  111 + @Excel(name = "创建人员")
  112 + private java.lang.Long createBy;
  113 +
  114 +
  115 + /***修改人员*/
  116 + @Excel(name = "修改人员")
  117 + private java.lang.Long updateBy;
  118 +
  119 +
  120 + /***修改时间*/
  121 + @Excel(name = "修改时间")
  122 + private java.util.Date updateTime;
  123 +
  124 +
  125 + /***是否删除,0 未删除;1是删除*/
  126 + @Excel(name = "是否删除,0 未删除;1是删除")
  127 + private java.lang.Boolean delFlag;
  128 +
  129 +
  130 + @Override
  131 + public String toString() {
  132 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  133 + }
  134 +}
0 135 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportAddDTO.java 0 → 100644
  1 +package com.ruoyi.domain.sign.in.exception.report.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +
  9 +@Data
  10 +@ApiModel(value = "打卡异常上报表的添加DTO")
  11 +@Accessors(chain = true)
  12 +@EqualsAndHashCode(callSuper = false)
  13 +/**打卡异常上报表 DTO*/
  14 +public class EquipmentExceptionReportAddDTO implements java.io.Serializable {
  15 + private static final long serialVersionUID = 370325919L;
  16 +
  17 + /***ID*/
  18 + @ApiModelProperty(value = "ID", example = "1")
  19 + private Long id;
  20 + /***标题*/
  21 + @ApiModelProperty(value = "标题")
  22 + private String title;
  23 + /***设备id*/
  24 + @ApiModelProperty(value = "设备id")
  25 + private String deviceId;
  26 + /***上报人*/
  27 + @ApiModelProperty(value = "上报人")
  28 + private String jobCode;
  29 + /***设备图片*/
  30 + @ApiModelProperty(value = "设备图片")
  31 + private String image;
  32 + /***处理状态 1 未处理 2 处理中 3 已处理*/
  33 + @ApiModelProperty(value = "处理状态 1 未处理 2 处理中 3 已处理", example = "1")
  34 + private Integer status;
  35 + /***上报时间*/
  36 + @ApiModelProperty(value = "上报时间")
  37 + private java.util.Date createTime;
  38 + /***备注*/
  39 + @ApiModelProperty(value = "备注")
  40 + private String remark;
  41 + /***异常类型*/
  42 + @ApiModelProperty(value = "异常类型", example = "1")
  43 + private Integer exType;
  44 + /****/
  45 + @ApiModelProperty(value = "")
  46 + private String fleetName;
  47 + /****/
  48 + @ApiModelProperty(value = "")
  49 + private String nbbm;
  50 + /****/
  51 + @ApiModelProperty(value = "")
  52 + private String lineName;
  53 + /****/
  54 + @ApiModelProperty(value = "")
  55 + private java.util.Date planTime;
  56 + /****/
  57 + @ApiModelProperty(value = "", example = "1")
  58 + private Integer signType;
  59 + /***上报处理人员*/
  60 + @ApiModelProperty(value = "上报处理人员")
  61 + private String reportId;
  62 + /***处理时间*/
  63 + @ApiModelProperty(value = "处理时间")
  64 + private String reportTime;
  65 + /***报告状态*/
  66 + @ApiModelProperty(value = "报告状态", example = "1")
  67 + private Integer reportOldStatus;
  68 + /***创建人员*/
  69 + @ApiModelProperty(value = "创建人员", example = "1")
  70 + private java.lang.Long createBy;
  71 + /***修改人员*/
  72 + @ApiModelProperty(value = "修改人员", example = "1")
  73 + private java.lang.Long updateBy;
  74 + /***修改时间*/
  75 + @ApiModelProperty(value = "修改时间")
  76 + private java.util.Date updateTime;
  77 + /***是否删除,0 未删除;1是删除*/
  78 + @ApiModelProperty(value = "是否删除,0 未删除;1是删除")
  79 + private java.lang.Boolean delFlag;
  80 +
  81 + /***操作人员*/
  82 + @ApiModelProperty(value = "操作人员")
  83 + private String operator;
  84 +
  85 +
  86 + public void clearStrEmpty() {
  87 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.title)) {
  88 + this.title = null;
  89 + }
  90 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.deviceId)) {
  91 + this.deviceId = null;
  92 + }
  93 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) {
  94 + this.jobCode = null;
  95 + }
  96 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) {
  97 + this.image = null;
  98 + }
  99 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) {
  100 + this.remark = null;
  101 + }
  102 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) {
  103 + this.fleetName = null;
  104 + }
  105 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.nbbm)) {
  106 + this.nbbm = null;
  107 + }
  108 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) {
  109 + this.lineName = null;
  110 + }
  111 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportId)) {
  112 + this.reportId = null;
  113 + }
  114 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportTime)) {
  115 + this.reportTime = null;
  116 + }
  117 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) {
  118 + this.operator = null;
  119 + }
  120 + }
  121 +
  122 +
  123 + @Override
  124 + public String toString() {
  125 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  126 + }
  127 +}
0 128 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportQueryDTO.java 0 → 100644
  1 +package com.ruoyi.domain.sign.in.exception.report.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +
  9 +@Data
  10 +@ApiModel(value = "打卡异常上报表的查询DTO")
  11 +@Accessors(chain = true)
  12 +@EqualsAndHashCode(callSuper = false)
  13 +/**打卡异常上报表 DTO*/
  14 +public class EquipmentExceptionReportQueryDTO implements java.io.Serializable {
  15 + private static final long serialVersionUID = 197370327L;
  16 +
  17 + /***ID*/
  18 + @ApiModelProperty(value = "ID", example = "1")
  19 + private Long id;
  20 + /***标题*/
  21 + @ApiModelProperty(value = "标题")
  22 + private String title;
  23 + /***设备id*/
  24 + @ApiModelProperty(value = "设备id")
  25 + private String deviceId;
  26 + /***上报人*/
  27 + @ApiModelProperty(value = "上报人")
  28 + private String jobCode;
  29 + /***设备图片*/
  30 + @ApiModelProperty(value = "设备图片")
  31 + private String image;
  32 + /***处理状态 1 未处理 2 处理中 3 已处理*/
  33 + @ApiModelProperty(value = "处理状态 1 未处理 2 处理中 3 已处理", example = "1")
  34 + private Integer status;
  35 + /***上报时间*/
  36 + @ApiModelProperty(value = "上报时间")
  37 + private java.util.Date createTime;
  38 + /***备注*/
  39 + @ApiModelProperty(value = "备注")
  40 + private String remark;
  41 + /***异常类型*/
  42 + @ApiModelProperty(value = "异常类型", example = "1")
  43 + private Integer exType;
  44 + /****/
  45 + @ApiModelProperty(value = "")
  46 + private String fleetName;
  47 + /****/
  48 + @ApiModelProperty(value = "")
  49 + private String nbbm;
  50 + /****/
  51 + @ApiModelProperty(value = "")
  52 + private String lineName;
  53 + /****/
  54 + @ApiModelProperty(value = "")
  55 + private java.util.Date planTime;
  56 + /****/
  57 + @ApiModelProperty(value = "", example = "1")
  58 + private Integer signType;
  59 + /***上报处理人员*/
  60 + @ApiModelProperty(value = "上报处理人员")
  61 + private String reportId;
  62 + /***处理时间*/
  63 + @ApiModelProperty(value = "处理时间")
  64 + private String reportTime;
  65 + /***报告状态*/
  66 + @ApiModelProperty(value = "报告状态", example = "1")
  67 + private Integer reportOldStatus;
  68 +
  69 + /***创建人员*/
  70 + @ApiModelProperty(value = "创建人员", example = "1")
  71 + private java.lang.Long createBy;
  72 + /***修改人员*/
  73 + @ApiModelProperty(value = "修改人员", example = "1")
  74 + private java.lang.Long updateBy;
  75 + /***修改时间*/
  76 + @ApiModelProperty(value = "修改时间")
  77 + private java.util.Date updateTime;
  78 + /***是否删除,0 未删除;1是删除*/
  79 + @ApiModelProperty(value = "是否删除,0 未删除;1是删除")
  80 + private java.lang.Boolean delFlag;
  81 +
  82 +
  83 + public void clearStrEmpty() {
  84 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.title)) {
  85 + this.title = null;
  86 + }
  87 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.deviceId)) {
  88 + this.deviceId = null;
  89 + }
  90 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) {
  91 + this.jobCode = null;
  92 + }
  93 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) {
  94 + this.image = null;
  95 + }
  96 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) {
  97 + this.remark = null;
  98 + }
  99 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) {
  100 + this.fleetName = null;
  101 + }
  102 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.nbbm)) {
  103 + this.nbbm = null;
  104 + }
  105 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) {
  106 + this.lineName = null;
  107 + }
  108 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportId)) {
  109 + this.reportId = null;
  110 + }
  111 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportTime)) {
  112 + this.reportTime = null;
  113 + }
  114 + }
  115 +
  116 +
  117 + @Override
  118 + public String toString() {
  119 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  120 + }
  121 +}
0 122 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/dto/EquipmentExceptionReportUpdateDTO.java 0 → 100644
  1 +package com.ruoyi.domain.sign.in.exception.report.dto;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.experimental.Accessors;
  8 +
  9 +@Data
  10 +@ApiModel(value = "打卡异常上报表的修改DTO")
  11 +@Accessors(chain = true)
  12 +@EqualsAndHashCode(callSuper = false)
  13 +/**打卡异常上报表 DTO*/
  14 +public class EquipmentExceptionReportUpdateDTO implements java.io.Serializable {
  15 + private static final long serialVersionUID = 837565127L;
  16 +
  17 + /***ID*/
  18 + @ApiModelProperty(value = "ID", example = "1")
  19 + private Long id;
  20 + /***标题*/
  21 + @ApiModelProperty(value = "标题")
  22 + private String title;
  23 + /***设备id*/
  24 + @ApiModelProperty(value = "设备id")
  25 + private String deviceId;
  26 + /***上报人*/
  27 + @ApiModelProperty(value = "上报人")
  28 + private String jobCode;
  29 + /***设备图片*/
  30 + @ApiModelProperty(value = "设备图片")
  31 + private String image;
  32 + /***处理状态 1 未处理 2 处理中 3 已处理*/
  33 + @ApiModelProperty(value = "处理状态 1 未处理 2 处理中 3 已处理", example = "1")
  34 + private Integer status;
  35 + /***上报时间*/
  36 + @ApiModelProperty(value = "上报时间")
  37 + private java.util.Date createTime;
  38 + /***备注*/
  39 + @ApiModelProperty(value = "备注")
  40 + private String remark;
  41 + /***异常类型*/
  42 + @ApiModelProperty(value = "异常类型", example = "1")
  43 + private Integer exType;
  44 + /****/
  45 + @ApiModelProperty(value = "")
  46 + private String fleetName;
  47 + /****/
  48 + @ApiModelProperty(value = "")
  49 + private String nbbm;
  50 + /****/
  51 + @ApiModelProperty(value = "")
  52 + private String lineName;
  53 + /****/
  54 + @ApiModelProperty(value = "")
  55 + private java.util.Date planTime;
  56 + /****/
  57 + @ApiModelProperty(value = "", example = "1")
  58 + private Integer signType;
  59 + /***上报处理人员*/
  60 + @ApiModelProperty(value = "上报处理人员")
  61 + private String reportId;
  62 + /***处理时间*/
  63 + @ApiModelProperty(value = "处理时间")
  64 + private String reportTime;
  65 + /***报告状态*/
  66 + @ApiModelProperty(value = "报告状态", example = "1")
  67 + private Integer reportOldStatus;
  68 +
  69 + /***创建人员*/
  70 + @ApiModelProperty(value = "创建人员", example = "1")
  71 + private java.lang.Long createBy;
  72 + /***修改人员*/
  73 + @ApiModelProperty(value = "修改人员", example = "1")
  74 + private java.lang.Long updateBy;
  75 + /***修改时间*/
  76 + @ApiModelProperty(value = "修改时间")
  77 + private java.util.Date updateTime;
  78 + /***是否删除,0 未删除;1是删除*/
  79 + @ApiModelProperty(value = "是否删除,0 未删除;1是删除")
  80 + private java.lang.Boolean delFlag;
  81 + /***操作人员*/
  82 + @ApiModelProperty(value = "操作人员")
  83 + private String operator;
  84 +
  85 +
  86 + public void clearStrEmpty() {
  87 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.title)) {
  88 + this.title = null;
  89 + }
  90 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.deviceId)) {
  91 + this.deviceId = null;
  92 + }
  93 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.jobCode)) {
  94 + this.jobCode = null;
  95 + }
  96 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.image)) {
  97 + this.image = null;
  98 + }
  99 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.remark)) {
  100 + this.remark = null;
  101 + }
  102 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.fleetName)) {
  103 + this.fleetName = null;
  104 + }
  105 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.nbbm)) {
  106 + this.nbbm = null;
  107 + }
  108 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.lineName)) {
  109 + this.lineName = null;
  110 + }
  111 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportId)) {
  112 + this.reportId = null;
  113 + }
  114 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.reportTime)) {
  115 + this.reportTime = null;
  116 + }
  117 + if (org.apache.commons.lang3.StringUtils.isEmpty(this.operator)) {
  118 + this.operator = null;
  119 + }
  120 + }
  121 +
  122 +
  123 + @Override
  124 + public String toString() {
  125 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  126 + }
  127 +}
0 128 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/vo/EquipmentExceptionReportVO.java 0 → 100644
  1 +package com.ruoyi.domain.sign.in.exception.report.vo;
  2 +
  3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +
  6 +import lombok.Data;
  7 +import lombok.EqualsAndHashCode;
  8 +import lombok.experimental.Accessors;
  9 +import lombok.NoArgsConstructor;
  10 +import lombok.AllArgsConstructor;
  11 +
  12 +@Data
  13 +@NoArgsConstructor
  14 +@AllArgsConstructor
  15 +@ApiModel(value = "打卡异常上报表的VO")
  16 +@Accessors(chain = true)
  17 +@EqualsAndHashCode(callSuper = false)
  18 +/**打卡异常上报表 VO*/
  19 +public class EquipmentExceptionReportVO implements java.io.Serializable {
  20 + private static final long serialVersionUID = 880847166L;
  21 +
  22 + /***ID*/
  23 + @ApiModelProperty(value = "ID", example = "1")
  24 + private Long id;
  25 + /***标题*/
  26 + @ApiModelProperty(value = "标题")
  27 + private String title;
  28 + /***设备id*/
  29 + @ApiModelProperty(value = "设备id")
  30 + private String deviceId;
  31 + /***上报人*/
  32 + @ApiModelProperty(value = "上报人")
  33 + private String jobCode;
  34 + /***设备图片*/
  35 + @ApiModelProperty(value = "设备图片")
  36 + private String image;
  37 + /***处理状态 1 未处理 2 处理中 3 已处理*/
  38 + @ApiModelProperty(value = "处理状态 1 未处理 2 处理中 3 已处理", example = "1")
  39 + private Integer status;
  40 + /***上报时间*/
  41 + @ApiModelProperty(value = "上报时间")
  42 + private java.util.Date createTime;
  43 + /***备注*/
  44 + @ApiModelProperty(value = "备注")
  45 + private String remark;
  46 + /***异常类型*/
  47 + @ApiModelProperty(value = "异常类型", example = "1")
  48 + private Integer exType;
  49 + /****/
  50 + @ApiModelProperty(value = "")
  51 + private String fleetName;
  52 + /****/
  53 + @ApiModelProperty(value = "")
  54 + private String nbbm;
  55 + /****/
  56 + @ApiModelProperty(value = "")
  57 + private String lineName;
  58 + /****/
  59 + @ApiModelProperty(value = "")
  60 + private java.util.Date planTime;
  61 + /****/
  62 + @ApiModelProperty(value = "", example = "1")
  63 + private Integer signType;
  64 + /***上报处理人员*/
  65 + @ApiModelProperty(value = "上报处理人员")
  66 + private String reportId;
  67 + /***处理时间*/
  68 + @ApiModelProperty(value = "处理时间")
  69 + private String reportTime;
  70 + /***报告状态*/
  71 + @ApiModelProperty(value = "报告状态", example = "1")
  72 + private Integer reportOldStatus;
  73 +
  74 + /***创建人员*/
  75 + @ApiModelProperty(value = "创建人员", example = "1")
  76 + private java.lang.Long createBy;
  77 + /***修改人员*/
  78 + @ApiModelProperty(value = "修改人员", example = "1")
  79 + private java.lang.Long updateBy;
  80 + /***修改时间*/
  81 + @ApiModelProperty(value = "修改时间")
  82 + private java.util.Date updateTime;
  83 + /***是否删除,0 未删除;1是删除*/
  84 + @ApiModelProperty(value = "是否删除,0 未删除;1是删除")
  85 + private java.lang.Boolean delFlag;
  86 + @ApiModelProperty(value = "上报姓名")
  87 + private String jobCodeName;
  88 +
  89 +
  90 + @Override
  91 + public String toString() {
  92 + return com.alibaba.fastjson2.JSON.toJSONString(this);
  93 + }
  94 +}
0 95 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/mapper/sign/in/exception/report/EquipmentExceptionReportMapper.java 0 → 100644
  1 +package com.ruoyi.mapper.sign.in.exception.report;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport;
  5 +import org.apache.ibatis.annotations.Mapper;
  6 +
  7 +
  8 +
  9 +@Mapper
  10 +/**打卡异常上报表 Mapper接口*/
  11 +public interface EquipmentExceptionReportMapper extends BaseMapper<EquipmentExceptionReport> {
  12 + /**插入有值的列 */
  13 + int insertSelective(EquipmentExceptionReport name);
  14 +}
0 15 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/driver/NewDriverService.java
... ... @@ -43,6 +43,8 @@ public interface NewDriverService extends IService&lt;NewDriver&gt; {
43 43 */
44 44 List<NewDriver> listOfSelect(NewDriver entity);
45 45  
  46 + Collection<String> listOfJobs(NewDriver entity);
  47 +
46 48 /**
47 49 * 条件查询只返回一条数据的方法
48 50 */
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/driver/NewDriverServiceImpl.java
... ... @@ -14,7 +14,6 @@ import com.kingdee.shr.api.Response;
14 14 import com.kingdee.shr.api.SHRClient;
15 15 import com.ruoyi.common.TipEnum;
16 16 import com.ruoyi.common.core.domain.ResponseResult;
17   -import com.ruoyi.common.utils.StringUtils;
18 17 import com.ruoyi.common.utils.file.FileUploadUtils;
19 18 import com.ruoyi.config.BsthSystemConfig;
20 19 import com.ruoyi.domain.OrderEntity;
... ... @@ -24,8 +23,10 @@ import com.ruoyi.service.driver.NewDriverService;
24 23 import com.ruoyi.utils.UploadUtil;
25 24 import lombok.extern.slf4j.Slf4j;
26 25 import org.apache.commons.collections4.CollectionUtils;
  26 +import org.apache.commons.lang3.StringUtils;
27 27 import org.springframework.beans.factory.annotation.Autowired;
28 28 import org.springframework.stereotype.Service;
  29 +import org.springframework.transaction.annotation.Transactional;
29 30  
30 31 import java.io.File;
31 32 import java.io.IOException;
... ... @@ -146,6 +147,17 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
146 147 }
147 148  
148 149 @Override
  150 + public Collection<String> listOfJobs(NewDriver entity) {
  151 + LambdaQueryWrapper<NewDriver> wrapper = new LambdaQueryWrapper<>(entity);
  152 + wrapper.select(NewDriver::getJobCode, NewDriver::getTelphone);
  153 + List<NewDriver> drivers = list(wrapper);
  154 + if (CollectionUtils.isEmpty(drivers)) {
  155 + return Collections.emptyList();
  156 + }
  157 + return drivers.stream().map(NewDriver::getJobCode).collect(Collectors.toSet());
  158 + }
  159 +
  160 + @Override
149 161 public NewDriver getOne(NewDriver entity) {
150 162 return getOne(new LambdaQueryWrapper<>(entity));
151 163 }
... ... @@ -182,18 +194,22 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
182 194 }
183 195  
184 196 @Override
  197 + @Transactional(rollbackFor = Exception.class)
185 198 public boolean insertJob() {
186 199  
187   - //OSF���ƣ�ע�������Ʋ��DZ���
  200 +
  201 + Collection<String> jobs = listOfJobs(new NewDriver());
  202 +
188 203 String serviceName = "getPersonByListService";
189 204 SHRClient client = new SHRClient();
190   - //����OSF����Ҫ�IJ���
  205 +
191 206 Map<String, Object> param = new HashMap<String, Object>();
192 207  
193 208 ArrayList<String> dataList = new ArrayList<String>();
194   - dataList.add("05-008018");
195 209 param.put("personlist", dataList);
196   - List<NewDriver> drivers = requestDrivers(client, bsthSystemConfig.getGetDriverInfoURL(), serviceName, param);
  210 +
  211 +
  212 + List<NewDriver> drivers = requestDrivers(client, serviceName, param, jobs);
197 213 if (CollectionUtils.isEmpty(drivers)) {
198 214 return false;
199 215 }
... ... @@ -201,16 +217,17 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
201 217 return saveBatch(drivers);
202 218 }
203 219  
204   - private List<NewDriver> requestDrivers(SHRClient client, String SHR_LOCAL, String serviceName, Map<String, Object> param) {
  220 + private List<NewDriver> requestDrivers(SHRClient client, String serviceName, Map<String, Object> param, Collection<String> jobs) {
205 221 Response res = null;
206 222 String resDataStr = null;
207 223 try {
208   - res = client.executeService(SHR_LOCAL, serviceName, param);
  224 + res = client.executeService(bsthSystemConfig.getGetDriverInfoURL(), serviceName, param);
209 225 if (Objects.nonNull(res)) {
210 226 resDataStr = Convert.toStr(res.getData());
211 227 JSONObject jsonObject = JSON.parseObject(resDataStr);
212 228 if (!Objects.equals(Convert.toInt(jsonObject.get("code")), 200)) {
213 229 log.info("同步用户数据返回错误代码,代码为:[{}],返回的 结果为:[{}]", jsonObject.get("code"), resDataStr);
  230 +
214 231 return null;
215 232 }
216 233  
... ... @@ -224,15 +241,35 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
224 241 return jsonArray.stream().map(jo -> {
225 242 if (jo instanceof JSONObject) {
226 243 JSONObject obj = (JSONObject) jo;
  244 + String empRelation = Convert.toStr(obj.get("empRelation"));
  245 + //if(empRelation,index0f("含同")>-l ll empRelation,indexof("劳务")>-1 llempRelation.indexof("返腭")>-1){
  246 + if (!(StringUtils.indexOf(empRelation, "合同") > -1 || StringUtils.indexOf(empRelation, "劳务") > -1
  247 + || StringUtils.indexOf(empRelation, "返聘") > -1)) {
  248 + log.info("[{}]是离职人员", obj);
  249 +
  250 + return null;
  251 + }
  252 +
227 253 NewDriver driver = new NewDriver();
  254 +
228 255 driver.setJobCode(Convert.toStr(obj.get("personNumber")));
  256 +
  257 + if (CollectionUtils.isNotEmpty(jobs) && jobs.contains(driver.getJobCode())) {
  258 + log.info("[{}]的数据已经存在", obj);
  259 + return null;
  260 + }
  261 +
229 262 driver.setCompanyCode(Convert.toStr(obj.get("companyNumner")));
230 263 driver.setBrancheCompanyCode(Convert.toStr(obj.get("companyNumner")));
231 264 driver.setPersonnelName(Convert.toStr(obj.get("personName")));
232 265 // driver.setPapersCode(Convert.toStr(obj.get("personNumber")));
233 266 // driver.setIcCardCode(Convert.toStr(obj.get("personNumber")));
234 267 driver.setPersonnelType(Convert.toStr(obj.get("gender")));
235   - driver.setPosts(Convert.toStr(obj.get("position")));
  268 + String post = Convert.toStr(obj.get("duties"));
  269 + if (StringUtils.isEmpty(post)) {
  270 + post = Convert.toStr(obj.get("position"));
  271 + }
  272 + driver.setPosts(post);
236 273 driver.setCard(Convert.toStr(obj.get("IDcardNo")));
237 274 driver.setTelphone(Convert.toStr(obj.get("cell")));
238 275 // driver.setIcRfid(Convert.toStr(obj.get("personNumber")));
... ... @@ -242,7 +279,7 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
242 279 driver.setLineName(Convert.toStr(obj.get("deptLineName")));
243 280 driver.setLineCode(Convert.toStr(obj.get("deptLineNumber")));
244 281  
245   - String photo = Convert.toStr("photo");
  282 + String photo = Convert.toStr(obj.get("photo"));
246 283 if (StringUtils.isNotEmpty(photo)) {
247 284 StringBuilder builder = new StringBuilder();
248 285 builder.append(obj.get("personID"));
... ... @@ -306,6 +343,7 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
306 343 public TipEnum faceRegister(NewDriver entity) {
307 344 NewDriver driver = new NewDriver();
308 345 driver.setIcCardCode(entity.getIcCardCode());
  346 + driver.setJobCode(entity.getJobCode());
309 347 NewDriver source = getOne(driver);
310 348 if (Objects.isNull(source)) {
311 349 log.info("[{}]找不到数据", entity);
... ... @@ -327,9 +365,20 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
327 365 String result = StringUtils.substringAfter(resultObj.getData(), bsthSystemConfig.getImageBasePath() + File.separator);
328 366 entity.setImage(result);
329 367  
  368 + float imageVersion = 0.01f;
  369 + try {
  370 + if (StringUtils.isNotEmpty(source.getImageVersion())) {
  371 + imageVersion = 0.01f + Convert.toFloat(source.getImageVersion());
  372 + }
  373 + } catch (Exception e) {
  374 + log.error("图片 版本异常:[{}]", source, e);
  375 + }
  376 +
330 377 wrapper.set(NewDriver::getImage, entity.getImage())
331 378 .set(NewDriver::getFaceSignIn, entity.getFaceSignIn())
332 379 .set(NewDriver::getSignInEquipment, entity.getFaceSignIn())
  380 + .set(NewDriver::getFaceFeature, entity.getFaceFeature())
  381 + .set(NewDriver::getImageVersion, imageVersion)
333 382 .eq(NewDriver::getId, source.getId());
334 383 boolean flag = update(wrapper);
335 384 return flag ? TipEnum.TIP_200 : TipEnum.TIP_500;
... ... @@ -482,4 +531,5 @@ public class NewDriverServiceImpl extends ServiceImpl&lt;NewDriverMapper, NewDriver
482 531 }
483 532 }
484 533  
  534 +
485 535 }
486 536 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/key/location/LinggangKeyWorkLocationServiceImpl.java
... ... @@ -589,7 +589,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl&lt;LinggangKeyW
589 589 }
590 590 equipment = equipmentList1.get(index);
591 591 if (Objects.isNull(equipment) || Objects.isNull(equipment.getLatticeNumber())) {
592   - log.info("没有存放钥匙的格子:[{}]", equipment);
  592 + log.debug("没有存放钥匙的格子:[{}]", equipment);
593 593 continue;
594 594 }
595 595 if (Objects.isNull(equipment.getLatticeNumberSet())) {
... ... @@ -598,7 +598,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl&lt;LinggangKeyW
598 598  
599 599 number = RandomUtils.nextInt(1, equipment.getLatticeNumber());
600 600 if (equipment.getLatticeNumberSet().contains(number)) {
601   - log.info("此格子已经被占用;[{}][{}]", equipment, number);
  601 + log.debug("此格子已经被占用;[{}][{}]", equipment, number);
602 602 continue;
603 603 }
604 604 break;
... ...
Bsth-admin/src/main/java/com/ruoyi/service/impl/sign/in/exception/report/EquipmentExceptionReportServiceImpl.java 0 → 100644
  1 +package com.ruoyi.service.impl.sign.in.exception.report;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  6 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  7 +import com.github.pagehelper.PageHelper;
  8 +import com.ruoyi.domain.OrderEntity;
  9 +import com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport;
  10 +import com.ruoyi.mapper.sign.in.exception.report.EquipmentExceptionReportMapper;
  11 +import com.ruoyi.service.sign.in.exception.report.EquipmentExceptionReportService;
  12 +import lombok.extern.slf4j.Slf4j;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.stereotype.Service;
  15 +
  16 +import java.util.Collections;
  17 +import java.util.List;
  18 +
  19 +@Slf4j
  20 +@Service
  21 +/**打卡异常上报表 Service实现类*/
  22 +public class EquipmentExceptionReportServiceImpl extends ServiceImpl<EquipmentExceptionReportMapper, EquipmentExceptionReport> implements EquipmentExceptionReportService {
  23 + @Autowired
  24 + private EquipmentExceptionReportMapper equipmentExceptionReportMapper;
  25 +
  26 + /**
  27 + * 分页查询
  28 + */
  29 + @Override
  30 + public IPage<EquipmentExceptionReport> pageList(Page<EquipmentExceptionReport> page, EquipmentExceptionReport entity, OrderEntity orderEntity) {
  31 + LambdaQueryWrapper<EquipmentExceptionReport> countWrapper = new LambdaQueryWrapper<>(entity);
  32 + countWrapper.select(EquipmentExceptionReport::getId);
  33 + int count = count(countWrapper);
  34 +
  35 + List<EquipmentExceptionReport> lists = Collections.emptyList();
  36 + if (count > 0) {
  37 + PageHelper.startPage((int) page.getCurrent(), (int) page.getSize(), false);
  38 + LambdaQueryWrapper<EquipmentExceptionReport> selectWrapper = new LambdaQueryWrapper<>(entity);
  39 + orderColumn(selectWrapper, orderEntity);
  40 + lists = list(selectWrapper);
  41 + }
  42 +
  43 + IPage<EquipmentExceptionReport> returnPage = new Page<EquipmentExceptionReport>();
  44 + returnPage.setRecords(lists);
  45 + returnPage.setPages(count % page.getSize() == 0 ? count / page.getSize() : count / page.getSize() + 1);
  46 + returnPage.setCurrent(page.getCurrent());
  47 + returnPage.setSize(page.getSize());
  48 + returnPage.setTotal(count);
  49 +
  50 + return returnPage;
  51 + }
  52 +
  53 + @Override
  54 + public List<EquipmentExceptionReport> list(EquipmentExceptionReport entity) {
  55 + return list(new LambdaQueryWrapper<>(entity));
  56 + }
  57 + // @Override
  58 + // public List<EquipmentExceptionReport> listOfSelect(EquipmentExceptionReport entity) {
  59 + // LambdaQueryWrapper<EquipmentExceptionReport> wrapper = new LambdaQueryWrapper<>(entity);
  60 + // wrapper.select(EquipmentExceptionReport::, EquipmentExceptionReport::);
  61 + // return list(wrapper);
  62 + // }
  63 +
  64 + // @Override
  65 + // public List<EquipmentExceptionReport> listOfIds(java.util.Collection<java.lang.Long> ids) {
  66 + // if (org.springframework.util.CollectionUtils.isEmpty(ids)) {
  67 + // return java.util.Collections.emptyList();
  68 + // }
  69 + // LambdaQueryWrapper<EquipmentExceptionReport> wrapper = new LambdaQueryWrapper<>();
  70 + // wrapper.select(EquipmentExceptionReport::getId,EquipmentExceptionReport::);
  71 + // wrapper.in(EquipmentExceptionReport::getId, ids);
  72 + // return list(wrapper);
  73 + // }
  74 +
  75 + @Override
  76 + public EquipmentExceptionReport getOne(EquipmentExceptionReport entity) {
  77 + return getOne(new LambdaQueryWrapper<>(entity));
  78 + }
  79 +
  80 + @Override
  81 + public Integer countId(EquipmentExceptionReport entity) {
  82 + LambdaQueryWrapper<EquipmentExceptionReport> wrapper = new LambdaQueryWrapper<>(entity);
  83 + wrapper.select(EquipmentExceptionReport::getId);
  84 + return count(wrapper);
  85 + }
  86 +
  87 +
  88 + /**
  89 + * 插入有值的列
  90 + */
  91 + @Override
  92 + public int insertSelective(EquipmentExceptionReport entity) {
  93 + return equipmentExceptionReportMapper.insertSelective(entity);
  94 + }
  95 +
  96 + /**
  97 + * 插入数据
  98 + */
  99 + @Override
  100 + public boolean insert(EquipmentExceptionReport entity) {
  101 + return save(entity);
  102 + }
  103 +
  104 + /**
  105 + * 根据主键修改数据
  106 + */
  107 + @Override
  108 + public boolean updateByPrimaryKey(EquipmentExceptionReport entity) {
  109 + return updateById(entity);
  110 + }
  111 +
  112 + /***根据主键删除数据*/
  113 + @Override
  114 + public boolean deleteById(Long id) {
  115 + return removeById(id);
  116 + }
  117 +
  118 +
  119 + public static void orderColumn(LambdaQueryWrapper<EquipmentExceptionReport> wrapper, OrderEntity orderEntity) {
  120 + if (org.apache.commons.lang3.StringUtils.equals("ascending", orderEntity.getOrder())) {
  121 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  122 + wrapper.orderByAsc(EquipmentExceptionReport::getId);
  123 + }
  124 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "title")) {
  125 + wrapper.orderByAsc(EquipmentExceptionReport::getTitle);
  126 + }
  127 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) {
  128 + wrapper.orderByAsc(EquipmentExceptionReport::getDeviceId);
  129 + }
  130 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "jobCode")) {
  131 + wrapper.orderByAsc(EquipmentExceptionReport::getJobCode);
  132 + }
  133 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "image")) {
  134 + wrapper.orderByAsc(EquipmentExceptionReport::getImage);
  135 + }
  136 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  137 + wrapper.orderByAsc(EquipmentExceptionReport::getStatus);
  138 + }
  139 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  140 + wrapper.orderByAsc(EquipmentExceptionReport::getCreateTime);
  141 + }
  142 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "remark")) {
  143 + wrapper.orderByAsc(EquipmentExceptionReport::getRemark);
  144 + }
  145 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "exType")) {
  146 + wrapper.orderByAsc(EquipmentExceptionReport::getExType);
  147 + }
  148 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "fleetName")) {
  149 + wrapper.orderByAsc(EquipmentExceptionReport::getFleetName);
  150 + }
  151 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "nbbm")) {
  152 + wrapper.orderByAsc(EquipmentExceptionReport::getNbbm);
  153 + }
  154 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lineName")) {
  155 + wrapper.orderByAsc(EquipmentExceptionReport::getLineName);
  156 + }
  157 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "planTime")) {
  158 + wrapper.orderByAsc(EquipmentExceptionReport::getPlanTime);
  159 + }
  160 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signType")) {
  161 + wrapper.orderByAsc(EquipmentExceptionReport::getSignType);
  162 + }
  163 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportId")) {
  164 + wrapper.orderByAsc(EquipmentExceptionReport::getReportId);
  165 + }
  166 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportTime")) {
  167 + wrapper.orderByAsc(EquipmentExceptionReport::getReportTime);
  168 + }
  169 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportOldStatus")) {
  170 + wrapper.orderByAsc(EquipmentExceptionReport::getReportOldStatus);
  171 + }
  172 + } else if (org.apache.commons.lang3.StringUtils.equals("descending", orderEntity.getOrder())) {
  173 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "id")) {
  174 + wrapper.orderByDesc(EquipmentExceptionReport::getId);
  175 + }
  176 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "title")) {
  177 + wrapper.orderByDesc(EquipmentExceptionReport::getTitle);
  178 + }
  179 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "deviceId")) {
  180 + wrapper.orderByDesc(EquipmentExceptionReport::getDeviceId);
  181 + }
  182 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "jobCode")) {
  183 + wrapper.orderByDesc(EquipmentExceptionReport::getJobCode);
  184 + }
  185 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "image")) {
  186 + wrapper.orderByDesc(EquipmentExceptionReport::getImage);
  187 + }
  188 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "status")) {
  189 + wrapper.orderByDesc(EquipmentExceptionReport::getStatus);
  190 + }
  191 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "createTime")) {
  192 + wrapper.orderByDesc(EquipmentExceptionReport::getCreateTime);
  193 + }
  194 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "remark")) {
  195 + wrapper.orderByDesc(EquipmentExceptionReport::getRemark);
  196 + }
  197 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "exType")) {
  198 + wrapper.orderByDesc(EquipmentExceptionReport::getExType);
  199 + }
  200 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "fleetName")) {
  201 + wrapper.orderByDesc(EquipmentExceptionReport::getFleetName);
  202 + }
  203 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "nbbm")) {
  204 + wrapper.orderByDesc(EquipmentExceptionReport::getNbbm);
  205 + }
  206 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "lineName")) {
  207 + wrapper.orderByDesc(EquipmentExceptionReport::getLineName);
  208 + }
  209 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "planTime")) {
  210 + wrapper.orderByDesc(EquipmentExceptionReport::getPlanTime);
  211 + }
  212 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "signType")) {
  213 + wrapper.orderByDesc(EquipmentExceptionReport::getSignType);
  214 + }
  215 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportId")) {
  216 + wrapper.orderByDesc(EquipmentExceptionReport::getReportId);
  217 + }
  218 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportTime")) {
  219 + wrapper.orderByDesc(EquipmentExceptionReport::getReportTime);
  220 + }
  221 + if (org.apache.commons.lang3.StringUtils.equals(orderEntity.getProp(), "reportOldStatus")) {
  222 + wrapper.orderByDesc(EquipmentExceptionReport::getReportOldStatus);
  223 + }
  224 + } else {
  225 + wrapper.orderByDesc(EquipmentExceptionReport::getId);
  226 + }
  227 + }
  228 +}
0 229 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/service/sign/in/exception/report/EquipmentExceptionReportService.java 0 → 100644
  1 +package com.ruoyi.service.sign.in.exception.report;
  2 +
  3 +import com.baomidou.mybatisplus.core.metadata.IPage;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +import com.ruoyi.domain.OrderEntity;
  6 +import com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport;
  7 +
  8 +import java.util.List;
  9 +
  10 +
  11 +/**
  12 + * 打卡异常上报表 Service接口
  13 + */
  14 +public interface EquipmentExceptionReportService extends IService<EquipmentExceptionReport> {
  15 + /**
  16 + * 分页查询
  17 + */
  18 + IPage<EquipmentExceptionReport> pageList(com.baomidou.mybatisplus.extension.plugins.pagination.Page<EquipmentExceptionReport> page, EquipmentExceptionReport entity, OrderEntity orderEntity);
  19 +
  20 + /**
  21 + * 带条件查询
  22 + */
  23 + List<EquipmentExceptionReport> list(EquipmentExceptionReport entity);
  24 +
  25 + // List<EquipmentExceptionReport> listOfIds(java.util.Collection<java.lang.Long> ids);
  26 + // /***
  27 + // *用于页面选择
  28 + // */
  29 + // List<EquipmentExceptionReport> listOfSelect(EquipmentExceptionReport entity);
  30 +
  31 + /**
  32 + * 条件查询只返回一条数据的方法
  33 + */
  34 + EquipmentExceptionReport getOne(EquipmentExceptionReport entity);
  35 +
  36 + Integer countId(EquipmentExceptionReport entity);
  37 +
  38 + /**
  39 + * 插入有值的列
  40 + */
  41 + int insertSelective(EquipmentExceptionReport entity);
  42 +
  43 + /***插入数据*/
  44 + boolean insert(EquipmentExceptionReport entity);
  45 +
  46 + /**
  47 + * 根据主键修改数据
  48 + */
  49 + boolean updateByPrimaryKey(EquipmentExceptionReport entity);
  50 +
  51 + boolean deleteById(Long id);
  52 +}
0 53 \ No newline at end of file
... ...
Bsth-admin/src/main/java/com/ruoyi/utils/HttpClientUtil.java 0 → 100644
  1 +package com.ruoyi.utils;
  2 +
  3 +import com.alibaba.fastjson2.JSON;
  4 +import lombok.extern.slf4j.Slf4j;
  5 +import org.apache.commons.collections4.MapUtils;
  6 +import org.apache.http.HttpResponse;
  7 +import org.apache.http.client.ClientProtocolException;
  8 +import org.apache.http.client.HttpClient;
  9 +import org.apache.http.client.methods.HttpPost;
  10 +import org.apache.http.entity.ContentType;
  11 +import org.apache.http.entity.StringEntity;
  12 +import org.apache.http.impl.client.HttpClients;
  13 +import org.apache.http.util.EntityUtils;
  14 +import org.springframework.stereotype.Component;
  15 +
  16 +import java.io.IOException;
  17 +import java.net.URI;
  18 +import java.net.URISyntaxException;
  19 +import java.util.Map;
  20 +import java.util.Objects;
  21 +
  22 +/**
  23 + * @author liujun
  24 + * @date 2024年08月06日 16:54
  25 + */
  26 +@Slf4j
  27 +@Component
  28 +public class HttpClientUtil {
  29 + public String doPost(String url, Map<String, Object> paraMap, Map<String, Object> head) {
  30 + HttpClient client = null;
  31 + HttpPost post = null;
  32 + try {
  33 + client = HttpClients.createDefault();
  34 + post = new HttpPost();
  35 + post.setURI(new URI(url));
  36 + if (MapUtils.isNotEmpty(paraMap)) {
  37 +// ArrayList<BasicNameValuePair> list = new ArrayList<>();
  38 +// Set<Map.Entry<String, Object>> entrySet = paraMap.entrySet();
  39 +// for (Map.Entry<String,Object> entry : entrySet) {
  40 +// String key = entry.getKey();
  41 +// String value = Objects.isNull(entry.getValue())?"":entry.getValue().toString();
  42 +// list.add(new BasicNameValuePair(key, value));
  43 +// }
  44 +// post.setEntity(new UrlEncodedFormEntity(list, org.apache.http.protocol.HTTP.UTF_8));
  45 + StringEntity entity = new StringEntity(JSON.toJSONString(paraMap), ContentType.APPLICATION_JSON);
  46 + post.setEntity(entity);
  47 + }
  48 +
  49 + if (MapUtils.isNotEmpty(head)) {
  50 + for (Map.Entry<String, Object> entry : head.entrySet()) {
  51 + String value = Objects.isNull(entry.getValue()) ? "" : entry.getValue().toString();
  52 + post.addHeader(entry.getKey(), value);
  53 + }
  54 + }
  55 +
  56 +
  57 + HttpResponse response = client.execute(post);
  58 + if (Objects.isNull(response) || response.getStatusLine().getStatusCode() != 200) {
  59 + log.info("[{}]请求数据错误", url, response.getEntity());
  60 + return null;
  61 + }
  62 + return EntityUtils.toString(response.getEntity(), "UTF-8");
  63 + } catch (URISyntaxException e) {
  64 + log.error("请求数据,URL错误,请检查请求URL,[{}]", url, e);
  65 + } catch (ClientProtocolException e) {
  66 + log.error("请求数据错误,[{}]", url, e);
  67 + } catch (IOException e) {
  68 + log.error("请求数据错误,[{}]", url, e);
  69 + }
  70 + return null;
  71 + }
  72 +}
... ...
Bsth-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
1 1 package com.ruoyi.web.controller.system;
2 2  
3   -import java.util.List;
4   -import java.util.Set;
5   -
6   -import io.swagger.annotations.Api;
7   -import io.swagger.annotations.ApiOperation;
8   -import org.springframework.beans.factory.annotation.Autowired;
9   -import org.springframework.web.bind.annotation.GetMapping;
10   -import org.springframework.web.bind.annotation.PostMapping;
11   -import org.springframework.web.bind.annotation.RequestBody;
12   -import org.springframework.web.bind.annotation.RestController;
13 3 import com.ruoyi.common.constant.Constants;
14 4 import com.ruoyi.common.core.domain.AjaxResult;
15 5 import com.ruoyi.common.core.domain.entity.SysMenu;
... ... @@ -19,16 +9,25 @@ import com.ruoyi.common.utils.SecurityUtils;
19 9 import com.ruoyi.framework.web.service.SysLoginService;
20 10 import com.ruoyi.framework.web.service.SysPermissionService;
21 11 import com.ruoyi.system.service.ISysMenuService;
  12 +import io.swagger.annotations.Api;
  13 +import io.swagger.annotations.ApiOperation;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.web.bind.annotation.GetMapping;
  16 +import org.springframework.web.bind.annotation.PostMapping;
  17 +import org.springframework.web.bind.annotation.RequestBody;
  18 +import org.springframework.web.bind.annotation.RestController;
  19 +
  20 +import java.util.List;
  21 +import java.util.Set;
22 22  
23 23 /**
24 24 * 登录验证
25   - *
  25 + *
26 26 * @author ruoyi
27 27 */
28 28 @RestController
29 29 @Api(tags = "登录管理")
30   -public class SysLoginController
31   -{
  30 +public class SysLoginController {
32 31 @Autowired
33 32 private SysLoginService loginService;
34 33  
... ... @@ -40,14 +39,13 @@ public class SysLoginController
40 39  
41 40 /**
42 41 * 登录方法
43   - *
  42 + *
44 43 * @param loginBody 登录信息
45 44 * @return 结果
46 45 */
47 46 @PostMapping("/login")
48 47 @ApiOperation("登录")
49   - public AjaxResult login(@RequestBody LoginBody loginBody)
50   - {
  48 + public AjaxResult login(@RequestBody LoginBody loginBody) {
51 49 AjaxResult ajax = AjaxResult.success();
52 50 // 生成令牌
53 51 String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
... ... @@ -57,14 +55,31 @@ public class SysLoginController
57 55 }
58 56  
59 57 /**
  58 + * 登录方法
  59 + *
  60 + * @param loginBody 登录信息
  61 + * @return 结果
  62 + */
  63 + @PostMapping("/login/no/code")
  64 + @ApiOperation("登录")
  65 + public AjaxResult loginNoCode(@RequestBody LoginBody loginBody) {
  66 + AjaxResult ajax = AjaxResult.success();
  67 + // 生成令牌
  68 + String token = loginService.loginNoCode(loginBody.getUsername(), loginBody.getPassword());
  69 + ajax.put(Constants.TOKEN, token);
  70 + return ajax;
  71 + }
  72 +
  73 +
  74 +
  75 + /**
60 76 * 获取用户信息
61   - *
  77 + *
62 78 * @return 用户信息
63 79 */
64 80 @ApiOperation("获取用户信息")
65 81 @GetMapping("getInfo")
66   - public AjaxResult getInfo()
67   - {
  82 + public AjaxResult getInfo() {
68 83 SysUser user = SecurityUtils.getLoginUser().getUser();
69 84 // 角色集合
70 85 Set<String> roles = permissionService.getRolePermission(user);
... ... @@ -79,13 +94,12 @@ public class SysLoginController
79 94  
80 95 /**
81 96 * 获取路由信息
82   - *
  97 + *
83 98 * @return 路由信息
84 99 */
85 100 @ApiOperation("获取路由信息")
86 101 @GetMapping("getRouters")
87   - public AjaxResult getRouters()
88   - {
  102 + public AjaxResult getRouters() {
89 103 Long userId = SecurityUtils.getUserId();
90 104 List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
91 105 return AjaxResult.success(menuService.buildMenus(menus));
... ...
Bsth-admin/src/main/resources/LtpaToken.properties 0 → 100644
  1 +#Updated by: CN=admin/O=Vanke
  2 +#Thu Feb 16 15:49:29 CST 200
  3 +cookie.domain=.vanke.com
  4 +token.expiration=30
  5 +domino.secret=BTfa8F+HwNejYEGBNKhtuZSJTW3OZ/t8\=
  6 +otp.domino.secret=8a5WD4J1M5r0we244NS7c63817BYNLdXSr6nh4BkA4n9HlcjqrwPr9oUE3V43ead
  7 +email.domino.secret=erewqreqr888
  8 +openid.domino.secret=erewqre99988
... ...
Bsth-admin/src/main/resources/application-druid-dev.yml
... ... @@ -137,7 +137,7 @@ ruoyi:
137 137 # 实例演示开关
138 138 demoEnabled: true
139 139 # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
140   - profile: D:/ruoyi/uploadPath
  140 + profile: /data/test/bath-alcoho-sign/apache-tomcat-8.5.61/webapps/ROOT/uploadPath
141 141 # 获取ip地址开关
142 142 addressEnabled: false
143 143 # 验证码类型 math 数字计算 char 字符验证
... ... @@ -174,6 +174,10 @@ api:
174 174 path: /apk/dev
175 175 # 用户头像存放位置
176 176 headImage: /head/image
  177 + sign:
  178 + image: /image
  179 + video:
  180 + basePath: /video
177 181  
178 182 personnel:
179 183 token:
... ... @@ -196,15 +200,15 @@ netty:
196 200 speech: device/speech
197 201 port: 8989
198 202 bsth:
199   - upload:
200   - image:
201   - basePath: D:/temp/temp/bsth/upload
202   - video:
203   - basePath: D:/temp/temp/bsth/upload
204 203 face:
205 204 app:
206 205 id: 8jPk3SNnaoGsd9SidMefgZXg1zbst64jB44vVyx9Cijq
207 206 sdk:
208 207 key: C21s5J1n1rHwXPkvVjubKshtofV5sHXvyUQqSWYxHp2b
209 208 lib:
210   - path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64
211 209 \ No newline at end of file
  210 + path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64
  211 + faceFeature:
  212 + url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system
  213 + skip:
  214 + url: /big/view/queryNumberByType;/big/view/queryLineInfo/*;/big/view/querySignDetails;/report/list/**;/system/dict/data/**;/app/version/check/**;/app/checkDeviceHeart;/app/download;"/driver/**;/in/**;/eexception/**;/equipment/**;/report/**;/login;/register;/captchaImage;/dss/Driver/Auth;/test/**;login/no/code
  215 +
... ...
Bsth-admin/src/main/resources/application-druid-devTest.yml
... ... @@ -174,6 +174,10 @@ api:
174 174 path: /apk/dev
175 175 # 用户头像存放位置
176 176 headImage: /head/image
  177 + sign:
  178 + image: /image
  179 + video:
  180 + basePath: /video
177 181  
178 182 personnel:
179 183 token:
... ... @@ -198,11 +202,6 @@ netty:
198 202  
199 203  
200 204 bsth:
201   - upload:
202   - image:
203   - basePath: /head/image/upload
204   - video:
205   - basePath: /head/video/upload
206 205 face:
207 206 app:
208 207 id: 8jPk3SNnaoGsd9SidMefgZXg1zbst64jB44vVyx9Cijq
... ... @@ -212,3 +211,7 @@ bsth:
212 211 lib:
213 212 path: /data/test/bath-alcoho-sign/LINUX64
214 213 # path: D:/work/code/jienengjiancha/bsth-alcohol-sign/Bsth-admin/src/main/resources/libs/WIN64
  214 + faceFeature:
  215 + url: http://222.76.217.238:8880/fcgi-bin/entry.fcgi/system
  216 + skip:
  217 + url: /big/view/queryNumberByType;/big/view/queryLineInfo/*;/big/view/querySignDetails;/report/list/**;/system/dict/data/**;/app/version/check/**;/app/checkDeviceHeart;/app/download;"/driver/**;/in/**;/eexception/**;/equipment/**;/report/**;/login;/register;/captchaImage;/dss/Driver/Auth;/test/**;login/no/code
... ...
Bsth-admin/src/main/resources/mapper/driver/NewDriverMapper.xml
... ... @@ -2,8 +2,8 @@
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3 <mapper namespace="com.ruoyi.mapper.driver.NewDriverMapper">
4 4 <resultMap id="BaseResultMap" type="com.ruoyi.domain.driver.NewDriver">
5   - <id column="job_code" jdbcType="VARCHAR" property="jobCode"/>
6   - <result column="id" jdbcType="INTEGER" property="id"/>
  5 + <id column="id" jdbcType="INTEGER" property="id"/>
  6 + <result column="job_code" jdbcType="VARCHAR" property="jobCode"/>
7 7 <result column="company_code" jdbcType="VARCHAR" property="companyCode"/>
8 8 <result column="branche_company_code" jdbcType="VARCHAR" property="brancheCompanyCode"/>
9 9 <result column="personnel_name" jdbcType="VARCHAR" property="personnelName"/>
... ...
Bsth-admin/src/main/resources/mapper/scheduling/LinggangSchedulingMapper.xml
... ... @@ -21,6 +21,11 @@
21 21 <result column="alcohol_intake" jdbcType="DECIMAL" property="alcoholIntake"/>
22 22 <result column="remark" jdbcType="VARCHAR" property="remark"/>
23 23 <result column="key_info_id" jdbcType="INTEGER" property="keyInfoId"/>
  24 + <result column="upDown" jdbcType="INTEGER" property="updown" />
  25 + <result column="qdzCode" jdbcType="VARCHAR" property="qdzcode" />
  26 + <result column="qdzName" jdbcType="VARCHAR" property="qdzname" />
  27 + <result column="zdzCode" jdbcType="VARCHAR" property="zdzcode" />
  28 + <result column="zdzName" jdbcType="VARCHAR" property="zdzname" />
24 29 </resultMap>
25 30  
26 31 <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
... ... @@ -31,49 +36,30 @@
31 36 </insert>
32 37 <select id="listByCZ" resultMap="BaseResultMap">
33 38 select <include refid="columns"></include> from scheduling
34   - <where >
  39 + <where>
35 40 <include refid="where"></include>
36   - <if test="null != czCode"> and (qdzcode = #{czCode} OR zdzcode = #{czCode}) </if>
  41 + <if test="null != czCode">and (qdzcode = #{czCode} OR zdzcode = #{czCode})</if>
37 42 <choose>
38   - <when test="null !=startScheduleDate and null !=endScheduleDate"> and schedule_date BETWEEN #{startScheduleDate} and #{endScheduleDate} </when>
  43 + <when test="null !=startScheduleDate and null !=endScheduleDate">and schedule_date BETWEEN
  44 + #{startScheduleDate} and #{endScheduleDate}
  45 + </when>
39 46 <when test="null !=startScheduleDate">and schedule_date &gt;= #{startScheduleDate}</when>
40 47 <when test="null !=endScheduleDate">and schedule_date &lt;= #{endScheduleDate}</when>
41 48 </choose>
42   -
  49 +
43 50 </where>
44 51 </select>
45 52  
46 53 <sql id="columns">
47   - id
48   - , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark , key_info_id
  54 + id , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark , key_info_id , upDown , qdzCode , qdzName , zdzCode , zdzName
49 55 </sql>
50 56  
51 57 <sql id="insert_columns">
52   - id
53   - , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark , key_info_id
  58 + id , schedule_date , line_name , job_code , name , posts , lp_name , nbbm , bc_type , fcsj_t , zdsj_t , sign_in_id , ex_type , sign_time , sign_type , alcohol_flag , alcohol_intake , remark , key_info_id , upDown , qdzCode , qdzName , zdzCode , zdzName
54 59 </sql>
55 60  
56 61 <sql id="insert_values">
57   - #{id}
58   - ,
59   - #{scheduleDate},
60   - #{lineName},
61   - #{jobCode},
62   - #{name},
63   - #{posts},
64   - #{lpName},
65   - #{nbbm},
66   - #{bcType},
67   - #{fcsjT},
68   - #{zdsjT},
69   - #{signInId},
70   - #{exType},
71   - #{signTime},
72   - #{signType},
73   - #{alcoholFlag},
74   - #{alcoholIntake},
75   - #{remark},
76   - #{keyInfoId}
  62 + #{id}, #{scheduleDate}, #{lineName}, #{jobCode}, #{name}, #{posts}, #{lpName}, #{nbbm}, #{bcType}, #{fcsjT}, #{zdsjT}, #{signInId}, #{exType}, #{signTime}, #{signType}, #{alcoholFlag}, #{alcoholIntake}, #{remark}, #{keyInfoId}, #{updown}, #{qdzcode}, #{qdzname}, #{zdzcode}, #{zdzname}
77 63 </sql>
78 64  
79 65 <sql id="insertSelectiveColumn">
... ... @@ -97,6 +83,11 @@
97 83 <if test="null!=alcoholIntake">alcohol_intake,</if>
98 84 <if test="null!=remark">remark,</if>
99 85 <if test="null!=keyInfoId">key_info_id,</if>
  86 + <if test="null!=updown">upDown,</if>
  87 + <if test="null!=qdzcode">qdzCode,</if>
  88 + <if test="null!=qdzname">qdzName,</if>
  89 + <if test="null!=zdzcode">zdzCode,</if>
  90 + <if test="null!=zdzname">zdzName,</if>
100 91 </trim>
101 92 </sql>
102 93  
... ... @@ -121,52 +112,67 @@
121 112 <if test="null!=alcoholIntake">#{alcoholIntake,jdbcType=DECIMAL},</if>
122 113 <if test="null!=remark">#{remark,jdbcType=VARCHAR},</if>
123 114 <if test="null!=keyInfoId">#{keyInfoId,jdbcType=INTEGER},</if>
  115 + <if test="null!=updown">#{updown,jdbcType=INTEGER},</if>
  116 + <if test="null!=qdzcode">#{qdzcode,jdbcType=VARCHAR},</if>
  117 + <if test="null!=qdzname">#{qdzname,jdbcType=VARCHAR},</if>
  118 + <if test="null!=zdzcode">#{zdzcode,jdbcType=VARCHAR},</if>
  119 + <if test="null!=zdzname">#{zdzname,jdbcType=VARCHAR},</if>
124 120 </trim>
125 121 </sql>
126 122  
127 123 <sql id="updateByPrimaryKeySelectiveSql">
128 124 <set>
129   - <if test="null!=id">id = #{id,jdbcType=INTEGER},</if>
130   - <if test="null!=scheduleDate">schedule_date = #{scheduleDate,jdbcType=DATE},</if>
131   - <if test="null!=lineName">line_name = #{lineName,jdbcType=VARCHAR},</if>
132   - <if test="null!=jobCode">job_code = #{jobCode,jdbcType=VARCHAR},</if>
133   - <if test="null!=name">name = #{name,jdbcType=VARCHAR},</if>
134   - <if test="null!=posts">posts = #{posts,jdbcType=VARCHAR},</if>
135   - <if test="null!=lpName">lp_name = #{lpName,jdbcType=VARCHAR},</if>
136   - <if test="null!=nbbm">nbbm = #{nbbm,jdbcType=VARCHAR},</if>
137   - <if test="null!=bcType">bc_type = #{bcType,jdbcType=VARCHAR},</if>
138   - <if test="null!=fcsjT">fcsj_t = #{fcsjT,jdbcType=BIGINT},</if>
139   - <if test="null!=zdsjT">zdsj_t = #{zdsjT,jdbcType=BIGINT},</if>
140   - <if test="null!=signInId">sign_in_id = #{signInId,jdbcType=INTEGER},</if>
141   - <if test="null!=exType">ex_type = #{exType,jdbcType=TINYINT},</if>
142   - <if test="null!=signTime">sign_time = #{signTime,jdbcType=TIMESTAMP},</if>
143   - <if test="null!=signType">sign_type = #{signType,jdbcType=TINYINT},</if>
144   - <if test="null!=alcoholFlag">alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if>
145   - <if test="null!=alcoholIntake">alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if>
146   - <if test="null!=remark">remark = #{remark,jdbcType=VARCHAR},</if>
147   - <if test="null!=keyInfoId">key_info_id = #{keyInfoId,jdbcType=INTEGER},</if>
  125 + <if test="null!=id"> id = #{id,jdbcType=INTEGER},</if>
  126 + <if test="null!=scheduleDate"> schedule_date = #{scheduleDate,jdbcType=DATE},</if>
  127 + <if test="null!=lineName"> line_name = #{lineName,jdbcType=VARCHAR},</if>
  128 + <if test="null!=jobCode"> job_code = #{jobCode,jdbcType=VARCHAR},</if>
  129 + <if test="null!=name"> name = #{name,jdbcType=VARCHAR},</if>
  130 + <if test="null!=posts"> posts = #{posts,jdbcType=VARCHAR},</if>
  131 + <if test="null!=lpName"> lp_name = #{lpName,jdbcType=VARCHAR},</if>
  132 + <if test="null!=nbbm"> nbbm = #{nbbm,jdbcType=VARCHAR},</if>
  133 + <if test="null!=bcType"> bc_type = #{bcType,jdbcType=VARCHAR},</if>
  134 + <if test="null!=fcsjT"> fcsj_t = #{fcsjT,jdbcType=BIGINT},</if>
  135 + <if test="null!=zdsjT"> zdsj_t = #{zdsjT,jdbcType=BIGINT},</if>
  136 + <if test="null!=signInId"> sign_in_id = #{signInId,jdbcType=INTEGER},</if>
  137 + <if test="null!=exType"> ex_type = #{exType,jdbcType=TINYINT},</if>
  138 + <if test="null!=signTime"> sign_time = #{signTime,jdbcType=TIMESTAMP},</if>
  139 + <if test="null!=signType"> sign_type = #{signType,jdbcType=TINYINT},</if>
  140 + <if test="null!=alcoholFlag"> alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if>
  141 + <if test="null!=alcoholIntake"> alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if>
  142 + <if test="null!=remark"> remark = #{remark,jdbcType=VARCHAR},</if>
  143 + <if test="null!=keyInfoId"> key_info_id = #{keyInfoId,jdbcType=INTEGER},</if>
  144 + <if test="null!=updown"> upDown = #{updown,jdbcType=INTEGER},</if>
  145 + <if test="null!=qdzcode"> qdzCode = #{qdzcode,jdbcType=VARCHAR},</if>
  146 + <if test="null!=qdzname"> qdzName = #{qdzname,jdbcType=VARCHAR},</if>
  147 + <if test="null!=zdzcode"> zdzCode = #{zdzcode,jdbcType=VARCHAR},</if>
  148 + <if test="null!=zdzname"> zdzName = #{zdzname,jdbcType=VARCHAR},</if>
148 149 </set>
149 150 </sql>
150 151  
151 152 <sql id="where">
152   - <if test="null!=id">AND id = #{id,jdbcType=INTEGER},</if>
153   - <if test="null!=scheduleDate">AND schedule_date = #{scheduleDate,jdbcType=DATE},</if>
154   - <if test="null!=lineName">AND line_name = #{lineName,jdbcType=VARCHAR},</if>
155   - <if test="null!=jobCode">AND job_code = #{jobCode,jdbcType=VARCHAR},</if>
156   - <if test="null!=name">AND name = #{name,jdbcType=VARCHAR},</if>
157   - <if test="null!=posts">AND posts = #{posts,jdbcType=VARCHAR},</if>
158   - <if test="null!=lpName">AND lp_name = #{lpName,jdbcType=VARCHAR},</if>
159   - <if test="null!=nbbm">AND nbbm = #{nbbm,jdbcType=VARCHAR},</if>
160   - <if test="null!=bcType">AND bc_type = #{bcType,jdbcType=VARCHAR},</if>
161   - <if test="null!=fcsjT">AND fcsj_t = #{fcsjT,jdbcType=BIGINT},</if>
162   - <if test="null!=zdsjT">AND zdsj_t = #{zdsjT,jdbcType=BIGINT},</if>
163   - <if test="null!=signInId">AND sign_in_id = #{signInId,jdbcType=INTEGER},</if>
164   - <if test="null!=exType">AND ex_type = #{exType,jdbcType=TINYINT},</if>
165   - <if test="null!=signTime">AND sign_time = #{signTime,jdbcType=TIMESTAMP},</if>
166   - <if test="null!=signType">AND sign_type = #{signType,jdbcType=TINYINT},</if>
167   - <if test="null!=alcoholFlag">AND alcohol_flag = #{alcoholFlag,jdbcType=TINYINT},</if>
168   - <if test="null!=alcoholIntake">AND alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL},</if>
169   - <if test="null!=remark">AND remark = #{remark,jdbcType=VARCHAR},</if>
170   - <if test="null!=keyInfoId">AND key_info_id = #{keyInfoId,jdbcType=INTEGER},</if>
  153 + <if test="null!=id">AND id = #{id,jdbcType=INTEGER}, </if>
  154 + <if test="null!=scheduleDate">AND schedule_date = #{scheduleDate,jdbcType=DATE}, </if>
  155 + <if test="null!=lineName">AND line_name = #{lineName,jdbcType=VARCHAR}, </if>
  156 + <if test="null!=jobCode">AND job_code = #{jobCode,jdbcType=VARCHAR}, </if>
  157 + <if test="null!=name">AND name = #{name,jdbcType=VARCHAR}, </if>
  158 + <if test="null!=posts">AND posts = #{posts,jdbcType=VARCHAR}, </if>
  159 + <if test="null!=lpName">AND lp_name = #{lpName,jdbcType=VARCHAR}, </if>
  160 + <if test="null!=nbbm">AND nbbm = #{nbbm,jdbcType=VARCHAR}, </if>
  161 + <if test="null!=bcType">AND bc_type = #{bcType,jdbcType=VARCHAR}, </if>
  162 + <if test="null!=fcsjT">AND fcsj_t = #{fcsjT,jdbcType=BIGINT}, </if>
  163 + <if test="null!=zdsjT">AND zdsj_t = #{zdsjT,jdbcType=BIGINT}, </if>
  164 + <if test="null!=signInId">AND sign_in_id = #{signInId,jdbcType=INTEGER}, </if>
  165 + <if test="null!=exType">AND ex_type = #{exType,jdbcType=TINYINT}, </if>
  166 + <if test="null!=signTime">AND sign_time = #{signTime,jdbcType=TIMESTAMP}, </if>
  167 + <if test="null!=signType">AND sign_type = #{signType,jdbcType=TINYINT}, </if>
  168 + <if test="null!=alcoholFlag">AND alcohol_flag = #{alcoholFlag,jdbcType=TINYINT}, </if>
  169 + <if test="null!=alcoholIntake">AND alcohol_intake = #{alcoholIntake,jdbcType=DECIMAL}, </if>
  170 + <if test="null!=remark">AND remark = #{remark,jdbcType=VARCHAR}, </if>
  171 + <if test="null!=keyInfoId">AND key_info_id = #{keyInfoId,jdbcType=INTEGER}, </if>
  172 + <if test="null!=updown">AND upDown = #{updown,jdbcType=INTEGER}, </if>
  173 + <if test="null!=qdzcode">AND qdzCode = #{qdzcode,jdbcType=VARCHAR}, </if>
  174 + <if test="null!=qdzname">AND qdzName = #{qdzname,jdbcType=VARCHAR}, </if>
  175 + <if test="null!=zdzcode">AND zdzCode = #{zdzcode,jdbcType=VARCHAR}, </if>
  176 + <if test="null!=zdzname">AND zdzName = #{zdzname,jdbcType=VARCHAR}, </if>
171 177 </sql>
172 178 </mapper>
173 179 \ No newline at end of file
... ...
Bsth-admin/src/main/resources/mapper/sign/in/exception/report/EquipmentExceptionReportMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.ruoyi.mapper.sign.in.exception.report.EquipmentExceptionReportMapper">
  4 + <resultMap id="BaseResultMap" type="com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport">
  5 + <id column="id" jdbcType="BIGINT" property="id"/>
  6 + <result column="title" jdbcType="VARCHAR" property="title"/>
  7 + <result column="device_id" jdbcType="VARCHAR" property="deviceId"/>
  8 + <result column="job_code" jdbcType="VARCHAR" property="jobCode"/>
  9 + <result column="image" jdbcType="VARCHAR" property="image"/>
  10 + <result column="status" jdbcType="TINYINT" property="status"/>
  11 + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  12 + <result column="remark" jdbcType="VARCHAR" property="remark"/>
  13 + <result column="ex_type" jdbcType="TINYINT" property="exType"/>
  14 + <result column="fleet_name" jdbcType="VARCHAR" property="fleetName"/>
  15 + <result column="nbbm" jdbcType="VARCHAR" property="nbbm"/>
  16 + <result column="line_name" jdbcType="VARCHAR" property="lineName"/>
  17 + <result column="plan_time" jdbcType="TIMESTAMP" property="planTime"/>
  18 + <result column="sign_type" jdbcType="INTEGER" property="signType"/>
  19 + <result column="report_id" jdbcType="VARCHAR" property="reportId"/>
  20 + <result column="report_time" jdbcType="VARCHAR" property="reportTime"/>
  21 + <result column="report_old_status" jdbcType="INTEGER" property="reportOldStatus"/>
  22 + </resultMap>
  23 +
  24 + <insert id="insertSelective" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  25 + parameterType="com.ruoyi.domain.sign.in.exception.report.EquipmentExceptionReport">
  26 + INSERT INTO equipment_exception_report
  27 + <include refid="insertSelectiveColumn"></include>
  28 + <include refid="insertSelectiveValue"></include>
  29 + </insert>
  30 +
  31 + <sql id="columns">
  32 + id
  33 + , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status
  34 + </sql>
  35 +
  36 + <sql id="insert_columns">
  37 + id
  38 + , title , device_id , job_code , image , status , create_time , remark , ex_type , fleet_name , nbbm , line_name , plan_time , sign_type , report_id , report_time , report_old_status
  39 + </sql>
  40 +
  41 + <sql id="insert_values">
  42 + #{id}
  43 + ,
  44 + #{title},
  45 + #{deviceId},
  46 + #{jobCode},
  47 + #{image},
  48 + #{status},
  49 + #{createTime},
  50 + #{remark},
  51 + #{exType},
  52 + #{fleetName},
  53 + #{nbbm},
  54 + #{lineName},
  55 + #{planTime},
  56 + #{signType},
  57 + #{reportId},
  58 + #{reportTime},
  59 + #{reportOldStatus}
  60 + </sql>
  61 +
  62 + <sql id="insertSelectiveColumn">
  63 + <trim prefix="(" suffix=")" suffixOverrides=",">
  64 + <if test="null!=id">id,</if>
  65 + <if test="null!=title">title,</if>
  66 + <if test="null!=deviceId">device_id,</if>
  67 + <if test="null!=jobCode">job_code,</if>
  68 + <if test="null!=image">image,</if>
  69 + <if test="null!=status">status,</if>
  70 + <if test="null!=createTime">create_time,</if>
  71 + <if test="null!=remark">remark,</if>
  72 + <if test="null!=exType">ex_type,</if>
  73 + <if test="null!=fleetName">fleet_name,</if>
  74 + <if test="null!=nbbm">nbbm,</if>
  75 + <if test="null!=lineName">line_name,</if>
  76 + <if test="null!=planTime">plan_time,</if>
  77 + <if test="null!=signType">sign_type,</if>
  78 + <if test="null!=reportId">report_id,</if>
  79 + <if test="null!=reportTime">report_time,</if>
  80 + <if test="null!=reportOldStatus">report_old_status,</if>
  81 + </trim>
  82 + </sql>
  83 +
  84 + <sql id="insertSelectiveValue">
  85 + <trim prefix="values (" suffix=")" suffixOverrides=",">
  86 + <if test="null!=id">#{id,jdbcType=BIGINT},</if>
  87 + <if test="null!=title">#{title,jdbcType=VARCHAR},</if>
  88 + <if test="null!=deviceId">#{deviceId,jdbcType=VARCHAR},</if>
  89 + <if test="null!=jobCode">#{jobCode,jdbcType=VARCHAR},</if>
  90 + <if test="null!=image">#{image,jdbcType=VARCHAR},</if>
  91 + <if test="null!=status">#{status,jdbcType=TINYINT},</if>
  92 + <if test="null!=createTime">#{createTime,jdbcType=TIMESTAMP},</if>
  93 + <if test="null!=remark">#{remark,jdbcType=VARCHAR},</if>
  94 + <if test="null!=exType">#{exType,jdbcType=TINYINT},</if>
  95 + <if test="null!=fleetName">#{fleetName,jdbcType=VARCHAR},</if>
  96 + <if test="null!=nbbm">#{nbbm,jdbcType=VARCHAR},</if>
  97 + <if test="null!=lineName">#{lineName,jdbcType=VARCHAR},</if>
  98 + <if test="null!=planTime">#{planTime,jdbcType=TIMESTAMP},</if>
  99 + <if test="null!=signType">#{signType,jdbcType=INTEGER},</if>
  100 + <if test="null!=reportId">#{reportId,jdbcType=VARCHAR},</if>
  101 + <if test="null!=reportTime">#{reportTime,jdbcType=VARCHAR},</if>
  102 + <if test="null!=reportOldStatus">#{reportOldStatus,jdbcType=INTEGER},</if>
  103 + </trim>
  104 + </sql>
  105 +
  106 + <sql id="updateByPrimaryKeySelectiveSql">
  107 + <set>
  108 + <if test="null!=id">id = #{id,jdbcType=BIGINT},</if>
  109 + <if test="null!=title">title = #{title,jdbcType=VARCHAR},</if>
  110 + <if test="null!=deviceId">device_id = #{deviceId,jdbcType=VARCHAR},</if>
  111 + <if test="null!=jobCode">job_code = #{jobCode,jdbcType=VARCHAR},</if>
  112 + <if test="null!=image">image = #{image,jdbcType=VARCHAR},</if>
  113 + <if test="null!=status">status = #{status,jdbcType=TINYINT},</if>
  114 + <if test="null!=createTime">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
  115 + <if test="null!=remark">remark = #{remark,jdbcType=VARCHAR},</if>
  116 + <if test="null!=exType">ex_type = #{exType,jdbcType=TINYINT},</if>
  117 + <if test="null!=fleetName">fleet_name = #{fleetName,jdbcType=VARCHAR},</if>
  118 + <if test="null!=nbbm">nbbm = #{nbbm,jdbcType=VARCHAR},</if>
  119 + <if test="null!=lineName">line_name = #{lineName,jdbcType=VARCHAR},</if>
  120 + <if test="null!=planTime">plan_time = #{planTime,jdbcType=TIMESTAMP},</if>
  121 + <if test="null!=signType">sign_type = #{signType,jdbcType=INTEGER},</if>
  122 + <if test="null!=reportId">report_id = #{reportId,jdbcType=VARCHAR},</if>
  123 + <if test="null!=reportTime">report_time = #{reportTime,jdbcType=VARCHAR},</if>
  124 + <if test="null!=reportOldStatus">report_old_status = #{reportOldStatus,jdbcType=INTEGER},</if>
  125 + </set>
  126 + </sql>
  127 +
  128 + <sql id="where">
  129 + <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if>
  130 + <if test="null!=title">AND title = #{title,jdbcType=VARCHAR},</if>
  131 + <if test="null!=deviceId">AND device_id = #{deviceId,jdbcType=VARCHAR},</if>
  132 + <if test="null!=jobCode">AND job_code = #{jobCode,jdbcType=VARCHAR},</if>
  133 + <if test="null!=image">AND image = #{image,jdbcType=VARCHAR},</if>
  134 + <if test="null!=status">AND status = #{status,jdbcType=TINYINT},</if>
  135 + <if test="null!=createTime">AND create_time = #{createTime,jdbcType=TIMESTAMP},</if>
  136 + <if test="null!=remark">AND remark = #{remark,jdbcType=VARCHAR},</if>
  137 + <if test="null!=exType">AND ex_type = #{exType,jdbcType=TINYINT},</if>
  138 + <if test="null!=fleetName">AND fleet_name = #{fleetName,jdbcType=VARCHAR},</if>
  139 + <if test="null!=nbbm">AND nbbm = #{nbbm,jdbcType=VARCHAR},</if>
  140 + <if test="null!=lineName">AND line_name = #{lineName,jdbcType=VARCHAR},</if>
  141 + <if test="null!=planTime">AND plan_time = #{planTime,jdbcType=TIMESTAMP},</if>
  142 + <if test="null!=signType">AND sign_type = #{signType,jdbcType=INTEGER},</if>
  143 + <if test="null!=reportId">AND report_id = #{reportId,jdbcType=VARCHAR},</if>
  144 + <if test="null!=reportTime">AND report_time = #{reportTime,jdbcType=VARCHAR},</if>
  145 + <if test="null!=reportOldStatus">AND report_old_status = #{reportOldStatus,jdbcType=INTEGER},</if>
  146 + </sql>
  147 +</mapper>
0 148 \ No newline at end of file
... ...
Bsth-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
1 1 package com.ruoyi.framework.config;
2 2  
  3 +import org.apache.commons.lang3.StringUtils;
3 4 import org.springframework.beans.factory.annotation.Autowired;
  5 +import org.springframework.beans.factory.annotation.Value;
4 6 import org.springframework.context.annotation.Bean;
5 7 import org.springframework.http.HttpMethod;
6 8 import org.springframework.security.authentication.AuthenticationManager;
... ... @@ -36,6 +38,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
36 38 @Resource(name="com.ruoyi.service.impl.LingGangUserDetailsServiceImpl")
37 39 private UserDetailsService userDetailsService;
38 40  
  41 + @Value("${bsth.skip.url}")
  42 + private String skipURL;
  43 +
39 44  
40 45  
41 46 /**
... ... @@ -103,6 +108,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
103 108 ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = httpSecurity.authorizeRequests();
104 109 permitAllUrl.getUrls().forEach(url -> registry.antMatchers(url).permitAll());
105 110  
  111 + String[] arrs = StringUtils.split(skipURL,";");
  112 +
  113 +
106 114 httpSecurity
107 115 // CSRF禁用,因为不使用session
108 116 .csrf().disable()
... ... @@ -115,9 +123,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
115 123 // 过滤请求
116 124 .authorizeRequests()
117 125 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
118   - .antMatchers("/big/view/queryNumberByType","/big/view/queryLineInfo/*","/big/view/querySignDetails","/report/list/**","/system/dict/data/**",
119   - "/app/version/check/**","/app/checkDeviceHeart","/app/download","/driver/**","/in/**","/eexception/**","/equipment/**",
120   - "/report/**","/login", "/register", "/captchaImage","/dss/Driver/Auth","/test/**").permitAll()
  126 + .antMatchers(arrs).permitAll()
121 127 // 静态资源,可匿名访问
122 128 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
123 129 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
... ...
Bsth-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
1 1 package com.ruoyi.framework.web.service;
2 2  
3   -import javax.annotation.Resource;
4   -import org.springframework.beans.factory.annotation.Autowired;
5   -import org.springframework.security.authentication.AuthenticationManager;
6   -import org.springframework.security.authentication.BadCredentialsException;
7   -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
8   -import org.springframework.security.core.Authentication;
9   -import org.springframework.stereotype.Component;
10 3 import com.ruoyi.common.constant.CacheConstants;
11 4 import com.ruoyi.common.constant.Constants;
12 5 import com.ruoyi.common.constant.UserConstants;
... ... @@ -14,11 +7,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
14 7 import com.ruoyi.common.core.domain.model.LoginUser;
15 8 import com.ruoyi.common.core.redis.RedisCache;
16 9 import com.ruoyi.common.exception.ServiceException;
17   -import com.ruoyi.common.exception.user.BlackListException;
18   -import com.ruoyi.common.exception.user.CaptchaException;
19   -import com.ruoyi.common.exception.user.CaptchaExpireException;
20   -import com.ruoyi.common.exception.user.UserNotExistsException;
21   -import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
  10 +import com.ruoyi.common.exception.user.*;
22 11 import com.ruoyi.common.utils.DateUtils;
23 12 import com.ruoyi.common.utils.MessageUtils;
24 13 import com.ruoyi.common.utils.StringUtils;
... ... @@ -28,15 +17,22 @@ import com.ruoyi.framework.manager.factory.AsyncFactory;
28 17 import com.ruoyi.framework.security.context.AuthenticationContextHolder;
29 18 import com.ruoyi.system.service.ISysConfigService;
30 19 import com.ruoyi.system.service.ISysUserService;
  20 +import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.security.authentication.AuthenticationManager;
  22 +import org.springframework.security.authentication.BadCredentialsException;
  23 +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
  24 +import org.springframework.security.core.Authentication;
  25 +import org.springframework.stereotype.Component;
  26 +
  27 +import javax.annotation.Resource;
31 28  
32 29 /**
33 30 * 登录校验方法
34   - *
  31 + *
35 32 * @author ruoyi
36 33 */
37 34 @Component
38   -public class SysLoginService
39   -{
  35 +public class SysLoginService {
40 36 @Autowired
41 37 private TokenService tokenService;
42 38  
... ... @@ -45,7 +41,7 @@ public class SysLoginService
45 41  
46 42 @Autowired
47 43 private RedisCache redisCache;
48   -
  44 +
49 45 @Autowired
50 46 private ISysUserService userService;
51 47  
... ... @@ -54,43 +50,47 @@ public class SysLoginService
54 50  
55 51 /**
56 52 * 登录验证
57   - *
  53 + *
58 54 * @param username 用户名
59 55 * @param password 密码
60   - * @param code 验证码
61   - * @param uuid 唯一标识
  56 + * @param code 验证码
  57 + * @param uuid 唯一标识
62 58 * @return 结果
63 59 */
64   - public String login(String username, String password, String code, String uuid)
65   - {
  60 + public String login(String username, String password, String code, String uuid) {
66 61 // 验证码校验
67 62 validateCaptcha(username, code, uuid);
  63 + return loginNoCode(username, password);
  64 + }
  65 +
  66 +
  67 + /**
  68 + * 登录验证
  69 + *
  70 + * @param username 用户名
  71 + * @param password 密码
  72 + * @return 结果
  73 + */
  74 + public String loginNoCode(String username, String password) {
68 75 // 登录前置校验
69 76 loginPreCheck(username, password);
70 77 // 用户验证
71 78 Authentication authentication = null;
72   - try
73   - {
  79 + try {
74 80 UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
75 81 AuthenticationContextHolder.setContext(authenticationToken);
76 82 // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
77 83 authentication = authenticationManager.authenticate(authenticationToken);
78   - }
79   - catch (Exception e)
80   - {
81   - if (e instanceof BadCredentialsException)
82   - {
  84 + } catch (Exception e) {
  85 + if (e instanceof BadCredentialsException) {
83 86 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
  87 +
84 88 throw new UserPasswordNotMatchException();
85   - }
86   - else
87   - {
  89 + } else {
88 90 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
89 91 throw new ServiceException(e.getMessage());
90 92 }
91   - }
92   - finally
93   - {
  93 + } finally {
94 94 AuthenticationContextHolder.clearContext();
95 95 }
96 96 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
... ... @@ -101,30 +101,25 @@ public class SysLoginService
101 101 }
102 102  
103 103  
104   -
105 104 /**
106 105 * 校验验证码
107   - *
  106 + *
108 107 * @param username 用户名
109   - * @param code 验证码
110   - * @param uuid 唯一标识
  108 + * @param code 验证码
  109 + * @param uuid 唯一标识
111 110 * @return 结果
112 111 */
113   - public void validateCaptcha(String username, String code, String uuid)
114   - {
  112 + public void validateCaptcha(String username, String code, String uuid) {
115 113 boolean captchaEnabled = configService.selectCaptchaEnabled();
116   - if (captchaEnabled)
117   - {
  114 + if (captchaEnabled) {
118 115 String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
119 116 String captcha = redisCache.getCacheObject(verifyKey);
120 117 redisCache.deleteObject(verifyKey);
121   - if (captcha == null)
122   - {
  118 + if (captcha == null) {
123 119 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
124 120 throw new CaptchaExpireException();
125 121 }
126   - if (!code.equalsIgnoreCase(captcha))
127   - {
  122 + if (!code.equalsIgnoreCase(captcha)) {
128 123 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
129 124 throw new CaptchaException();
130 125 }
... ... @@ -133,35 +128,31 @@ public class SysLoginService
133 128  
134 129 /**
135 130 * 登录前置校验
  131 + *
136 132 * @param username 用户名
137 133 * @param password 用户密码
138 134 */
139   - public void loginPreCheck(String username, String password)
140   - {
  135 + public void loginPreCheck(String username, String password) {
141 136 // 用户名或密码为空 错误
142   - if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password))
143   - {
  137 + if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
144 138 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("not.null")));
145 139 throw new UserNotExistsException();
146 140 }
147 141 // 密码如果不在指定范围内 错误
148 142 if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
149   - || password.length() > UserConstants.PASSWORD_MAX_LENGTH)
150   - {
  143 + || password.length() > UserConstants.PASSWORD_MAX_LENGTH) {
151 144 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
152 145 throw new UserPasswordNotMatchException();
153 146 }
154 147 // 用户名不在指定范围内 错误
155 148 if (username.length() < UserConstants.USERNAME_MIN_LENGTH
156   - || username.length() > UserConstants.USERNAME_MAX_LENGTH)
157   - {
  149 + || username.length() > UserConstants.USERNAME_MAX_LENGTH) {
158 150 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
159 151 throw new UserPasswordNotMatchException();
160 152 }
161 153 // IP黑名单校验
162 154 String blackStr = configService.selectConfigByKey("sys.login.blackIPList");
163   - if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr()))
164   - {
  155 + if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr())) {
165 156 AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("login.blocked")));
166 157 throw new BlackListException();
167 158 }
... ... @@ -172,8 +163,7 @@ public class SysLoginService
172 163 *
173 164 * @param userId 用户ID
174 165 */
175   - public void recordLoginInfo(Long userId)
176   - {
  166 + public void recordLoginInfo(Long userId) {
177 167 SysUser sysUser = new SysUser();
178 168 sysUser.setUserId(userId);
179 169 sysUser.setLoginIp(IpUtils.getIpAddr());
... ...