Commit 6141b055ad59573a91afa01a85ed9d10bee7ce41
1 parent
1854df32
酒测未通过审核
Showing
7 changed files
with
61 additions
and
22 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/DssDriverController.java
| @@ -548,7 +548,7 @@ public class DssDriverController extends BaseController { | @@ -548,7 +548,7 @@ public class DssDriverController extends BaseController { | ||
| 548 | } | 548 | } |
| 549 | } | 549 | } |
| 550 | vo.setRouteName(scheduling.getLineName()); | 550 | vo.setRouteName(scheduling.getLineName()); |
| 551 | - vo.setFache(new Date(scheduling.getFcsjT())); | 551 | + vo.setFache(new Date(scheduling.getFcsjT()*100)); |
| 552 | 552 | ||
| 553 | return vo; | 553 | return vo; |
| 554 | }).collect(Collectors.toList()); | 554 | }).collect(Collectors.toList()); |
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
| @@ -203,7 +203,7 @@ public class KeyBoxController extends BaseController { | @@ -203,7 +203,7 @@ public class KeyBoxController extends BaseController { | ||
| 203 | logger.info("根据DTO的数据无法查询车辆信息(carInfos1):[{}]", dto); | 203 | logger.info("根据DTO的数据无法查询车辆信息(carInfos1):[{}]", dto); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | - BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo, equipmentList,schedulings1,carInfos1); | 206 | + BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo, equipmentList, schedulings1, carInfos1); |
| 207 | return ResponseResult.success(vo); | 207 | return ResponseResult.success(vo); |
| 208 | } catch (ParseException e) { | 208 | } catch (ParseException e) { |
| 209 | logger.error("钥匙柜基础信息同步异常:[{}]", dto, e); | 209 | logger.error("钥匙柜基础信息同步异常:[{}]", dto, e); |
| @@ -247,7 +247,7 @@ public class KeyBoxController extends BaseController { | @@ -247,7 +247,7 @@ public class KeyBoxController extends BaseController { | ||
| 247 | } | 247 | } |
| 248 | Equipment equipment = equipmentService.getOneByDeviceId(dto.getDevice()); | 248 | Equipment equipment = equipmentService.getOneByDeviceId(dto.getDevice()); |
| 249 | 249 | ||
| 250 | - TakeKeyVo vo = convertTakeKeyVo(dto, responseResult,equipment); | 250 | + TakeKeyVo vo = convertTakeKeyVo(dto, responseResult, equipment); |
| 251 | 251 | ||
| 252 | return new ResponseResult<>(responseResult.getCode(), responseResult.getMsg(), vo); | 252 | return new ResponseResult<>(responseResult.getCode(), responseResult.getMsg(), vo); |
| 253 | } | 253 | } |
| @@ -266,11 +266,17 @@ public class KeyBoxController extends BaseController { | @@ -266,11 +266,17 @@ public class KeyBoxController extends BaseController { | ||
| 266 | 266 | ||
| 267 | List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver); | 267 | List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver); |
| 268 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY); | 268 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY); |
| 269 | - if (Objects.isNull(responseResult) || !responseResult.isSuccess()) { | 269 | + if (Objects.isNull(responseResult)) { |
| 270 | return ResponseResult.error(); | 270 | return ResponseResult.error(); |
| 271 | } | 271 | } |
| 272 | + | ||
| 273 | + if (responseResult.isSuccess()) { | ||
| 274 | + return ResponseResult.error(responseResult.getCode(), responseResult.getMsg()); | ||
| 275 | + } | ||
| 276 | + | ||
| 277 | + | ||
| 272 | Equipment equipment = equipmentService.getOneByDeviceId(dto.getDevice()); | 278 | Equipment equipment = equipmentService.getOneByDeviceId(dto.getDevice()); |
| 273 | - TakeKeyVo vo = convertTakeKeyVo(dto, responseResult,equipment); | 279 | + TakeKeyVo vo = convertTakeKeyVo(dto, responseResult, equipment); |
| 274 | 280 | ||
| 275 | return new ResponseResult<>(responseResult.getCode(), responseResult.getMsg(), vo); | 281 | return new ResponseResult<>(responseResult.getCode(), responseResult.getMsg(), vo); |
| 276 | } | 282 | } |
| @@ -370,7 +376,18 @@ public class KeyBoxController extends BaseController { | @@ -370,7 +376,18 @@ public class KeyBoxController extends BaseController { | ||
| 370 | String bcType = ConstDriverProperties.BC_TYPE_IN; | 376 | String bcType = ConstDriverProperties.BC_TYPE_IN; |
| 371 | scheduling.setBcType(bcType); | 377 | scheduling.setBcType(bcType); |
| 372 | 378 | ||
| 373 | - return schedulingService.getOne(scheduling); | 379 | + List<LinggangScheduling> linggangSchedulings = schedulingService.list(scheduling); |
| 380 | + if (CollectionUtils.isEmpty(linggangSchedulings)) { | ||
| 381 | + return null; | ||
| 382 | + } | ||
| 383 | + | ||
| 384 | + | ||
| 385 | + Optional<LinggangScheduling> optional = linggangSchedulings.stream().filter(lin -> lin.getZdsjT() >= dto.getTime().getTime()).findFirst(); | ||
| 386 | + if (optional.isPresent()) { | ||
| 387 | + return optional.get(); | ||
| 388 | + } | ||
| 389 | + int size = linggangSchedulings.size(); | ||
| 390 | + return linggangSchedulings.get(size - 1); | ||
| 374 | } | 391 | } |
| 375 | 392 | ||
| 376 | private List<LinggangScheduling> queryScheduling(Collection<Long> ids) { | 393 | private List<LinggangScheduling> queryScheduling(Collection<Long> ids) { |
| @@ -483,7 +500,7 @@ public class KeyBoxController extends BaseController { | @@ -483,7 +500,7 @@ public class KeyBoxController extends BaseController { | ||
| 483 | 500 | ||
| 484 | private BasicSyncVo convertBasicSyncVo(List<LinggangKeyWorkLocation> workLocations, List<LinggangScheduling> schedulings, | 501 | private BasicSyncVo convertBasicSyncVo(List<LinggangKeyWorkLocation> workLocations, List<LinggangScheduling> schedulings, |
| 485 | List<KeyInfo> keyInfos, List<NewDriver> drivers, List<CarInfo> carInfos, Equipment equipment, | 502 | List<KeyInfo> keyInfos, List<NewDriver> drivers, List<CarInfo> carInfos, Equipment equipment, |
| 486 | - LinggangVenueInfo venueInfo, List<Equipment> equipmentList, List<LinggangScheduling> schedulings1,List<CarInfo> carInfos1) { | 503 | + LinggangVenueInfo venueInfo, List<Equipment> equipmentList, List<LinggangScheduling> schedulings1, List<CarInfo> carInfos1) { |
| 487 | BasicSyncVo vo = new BasicSyncVo(); | 504 | BasicSyncVo vo = new BasicSyncVo(); |
| 488 | 505 | ||
| 489 | vo.setDevice(equipment.getDeviceId()); | 506 | vo.setDevice(equipment.getDeviceId()); |
| @@ -538,7 +555,7 @@ public class KeyBoxController extends BaseController { | @@ -538,7 +555,7 @@ public class KeyBoxController extends BaseController { | ||
| 538 | planVo.setStaffCode(sc.getJobCode()); | 555 | planVo.setStaffCode(sc.getJobCode()); |
| 539 | 556 | ||
| 540 | BasicSyncDriverWorkDriverPlanTimePlateVo planTimePlateVo = new BasicSyncDriverWorkDriverPlanTimePlateVo(); | 557 | BasicSyncDriverWorkDriverPlanTimePlateVo planTimePlateVo = new BasicSyncDriverWorkDriverPlanTimePlateVo(); |
| 541 | - planTimePlateVo.setKey(sc.getScheduleDate()); | 558 | + planTimePlateVo.setKey(new Date(sc.getFcsjT())); |
| 542 | 559 | ||
| 543 | planTimePlateVo.setValue(carInfoOptional.get().getPlateNum()); | 560 | planTimePlateVo.setValue(carInfoOptional.get().getPlateNum()); |
| 544 | planVo.setTimePlate(planTimePlateVo); | 561 | planVo.setTimePlate(planTimePlateVo); |
| @@ -555,8 +572,8 @@ public class KeyBoxController extends BaseController { | @@ -555,8 +572,8 @@ public class KeyBoxController extends BaseController { | ||
| 555 | if (CollectionUtils.isNotEmpty(schedulings1) && CollectionUtils.isNotEmpty(carInfos1)) { | 572 | if (CollectionUtils.isNotEmpty(schedulings1) && CollectionUtils.isNotEmpty(carInfos1)) { |
| 556 | Set<String> nbbms = schedulings1.stream().filter(s -> Objects.equals(s.getQdzcode(), venueInfo.getParkCode()) || | 573 | Set<String> nbbms = schedulings1.stream().filter(s -> Objects.equals(s.getQdzcode(), venueInfo.getParkCode()) || |
| 557 | Objects.equals(s.getZdzcode(), venueInfo.getParkCode())).map(LinggangScheduling::getNbbm).collect(Collectors.toSet()); | 574 | Objects.equals(s.getZdzcode(), venueInfo.getParkCode())).map(LinggangScheduling::getNbbm).collect(Collectors.toSet()); |
| 558 | - List<String> plateNums = carInfos1.stream().filter(c->nbbms.contains(c.getNbbm())).map(CarInfo::getPlateNum).collect(Collectors.toList()); | ||
| 559 | - vo.setYardVehicles(plateNums); | 575 | + List<String> plateNums = carInfos1.stream().filter(c -> nbbms.contains(c.getNbbm())).map(CarInfo::getPlateNum).collect(Collectors.toList()); |
| 576 | + vo.setYardVehicles(plateNums); | ||
| 560 | 577 | ||
| 561 | } | 578 | } |
| 562 | 579 | ||
| @@ -592,7 +609,7 @@ public class KeyBoxController extends BaseController { | @@ -592,7 +609,7 @@ public class KeyBoxController extends BaseController { | ||
| 592 | } | 609 | } |
| 593 | } | 610 | } |
| 594 | 611 | ||
| 595 | - if(Objects.nonNull(driver)) { | 612 | + if (Objects.nonNull(driver)) { |
| 596 | location.setCreateBy(Convert.toLong(driver.getId())); | 613 | location.setCreateBy(Convert.toLong(driver.getId())); |
| 597 | } | 614 | } |
| 598 | location.setCreateTime(new Date()); | 615 | location.setCreateTime(new Date()); |
| @@ -601,12 +618,12 @@ public class KeyBoxController extends BaseController { | @@ -601,12 +618,12 @@ public class KeyBoxController extends BaseController { | ||
| 601 | }).filter(obj -> Objects.nonNull(obj.getKeyInfoId())).collect(Collectors.toList()); | 618 | }).filter(obj -> Objects.nonNull(obj.getKeyInfoId())).collect(Collectors.toList()); |
| 602 | } | 619 | } |
| 603 | 620 | ||
| 604 | - private TakeKeyVo convertTakeKeyVo(TakeKeyDTO dto, ResponseResult<Boolean> result,Equipment equipment) { | 621 | + private TakeKeyVo convertTakeKeyVo(TakeKeyDTO dto, ResponseResult<Boolean> result, Equipment equipment) { |
| 605 | TakeKeyVo vo = new TakeKeyVo(); | 622 | TakeKeyVo vo = new TakeKeyVo(); |
| 606 | vo.setDevice(dto.getDevice()); | 623 | vo.setDevice(dto.getDevice()); |
| 607 | vo.setTime(new Date()); | 624 | vo.setTime(new Date()); |
| 608 | vo.setResult(result.isSuccess() ? 0 : 1); | 625 | vo.setResult(result.isSuccess() ? 0 : 1); |
| 609 | - if(Objects.nonNull(equipment)){ | 626 | + if (Objects.nonNull(equipment)) { |
| 610 | vo.setDeviceType(equipment.getPromise()); | 627 | vo.setDeviceType(equipment.getPromise()); |
| 611 | vo.setDriverCode(equipment.getDeviceId()); | 628 | vo.setDriverCode(equipment.getDeviceId()); |
| 612 | } | 629 | } |
Bsth-admin/src/main/java/com/ruoyi/controller/sign/in/exception/report/EquipmentExceptionReportController.java
| @@ -109,8 +109,20 @@ public class EquipmentExceptionReportController extends BaseController { | @@ -109,8 +109,20 @@ public class EquipmentExceptionReportController extends BaseController { | ||
| 109 | @GetMapping(value = "/view/{id}") | 109 | @GetMapping(value = "/view/{id}") |
| 110 | public com.ruoyi.common.core.domain.ResponseResult<EquipmentExceptionReportVO> view(@PathVariable("id") Long id, org.springframework.ui.Model model) { | 110 | public com.ruoyi.common.core.domain.ResponseResult<EquipmentExceptionReportVO> view(@PathVariable("id") Long id, org.springframework.ui.Model model) { |
| 111 | EquipmentExceptionReport source = equipmentExceptionReportService.getById(id); | 111 | EquipmentExceptionReport source = equipmentExceptionReportService.getById(id); |
| 112 | + NewDriver driver = driverService.getOne(source.getJobCode()); | ||
| 113 | + SignIn signIn = signInService.getById(source.getSignId()); | ||
| 114 | + EquipmentExceptionReportVO vo = convert(source); | ||
| 112 | 115 | ||
| 113 | - return com.ruoyi.common.core.domain.ResponseResult.success(convert(source)); | 116 | + if(Objects.nonNull(driver)){ |
| 117 | + vo.setJobCodeName(driver.getPersonnelName()); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + if(Objects.nonNull(signIn)){ | ||
| 121 | + vo.setAlcoholIntake(signIn.getAlcoholIntake()); | ||
| 122 | + vo.setCreateTime(signIn.getCreateTime()); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + return com.ruoyi.common.core.domain.ResponseResult.success(vo); | ||
| 114 | } | 126 | } |
| 115 | 127 | ||
| 116 | 128 |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/exception/report/EquipmentExceptionReport.java
| @@ -117,6 +117,7 @@ public class EquipmentExceptionReport { | @@ -117,6 +117,7 @@ public class EquipmentExceptionReport { | ||
| 117 | private java.lang.Long createBy; | 117 | private java.lang.Long createBy; |
| 118 | 118 | ||
| 119 | 119 | ||
| 120 | + | ||
| 120 | /***修改人员*/ | 121 | /***修改人员*/ |
| 121 | @Excel(name = "修改人员") | 122 | @Excel(name = "修改人员") |
| 122 | private java.lang.Long updateBy; | 123 | private java.lang.Long updateBy; |
Bsth-admin/src/main/java/com/ruoyi/service/impl/dss/FaceServiceImpl.java
| @@ -79,12 +79,21 @@ public class FaceServiceImpl implements FaceService { | @@ -79,12 +79,21 @@ public class FaceServiceImpl implements FaceService { | ||
| 79 | return dr; | 79 | return dr; |
| 80 | }).max(Comparator.comparing(NewDriver::getImageScore)); | 80 | }).max(Comparator.comparing(NewDriver::getImageScore)); |
| 81 | 81 | ||
| 82 | - bufferedImage.flush(); | ||
| 83 | - return optional.isPresent() ? optional.get() : null; | 82 | + if (Objects.nonNull(bufferedImage)) { |
| 83 | + bufferedImage.flush(); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + if (optional.isPresent() && Objects.nonNull(optional.get().getImageScore()) && optional.get().getImageScore() > 0.95) { | ||
| 87 | + return optional.get(); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + | ||
| 91 | + return null; | ||
| 84 | } catch (IOException e) { | 92 | } catch (IOException e) { |
| 85 | sourceDriver.setImage(null); | 93 | sourceDriver.setImage(null); |
| 86 | log.error("图片校验异常:[{}]", sourceDriver, e); | 94 | log.error("图片校验异常:[{}]", sourceDriver, e); |
| 87 | } finally { | 95 | } finally { |
| 96 | + | ||
| 88 | IOUtils.closeQuietly(byteArrayInputStream); | 97 | IOUtils.closeQuietly(byteArrayInputStream); |
| 89 | } | 98 | } |
| 90 | return null; | 99 | return null; |
| @@ -127,14 +136,14 @@ public class FaceServiceImpl implements FaceService { | @@ -127,14 +136,14 @@ public class FaceServiceImpl implements FaceService { | ||
| 127 | List<FaceInfo> faceInfoList = new ArrayList<>(); | 136 | List<FaceInfo> faceInfoList = new ArrayList<>(); |
| 128 | int errorCode = faceEngine.detectFaces(image.getImageData(), image.getWidth(), image.getHeight(), image.getImageFormat(), faceInfoList); | 137 | int errorCode = faceEngine.detectFaces(image.getImageData(), image.getWidth(), image.getHeight(), image.getImageFormat(), faceInfoList); |
| 129 | if (errorCode != ErrorInfo.MOK.getValue()) { | 138 | if (errorCode != ErrorInfo.MOK.getValue()) { |
| 130 | - log.error("人脸对比失败,请检查数据:[{}];错误代码:[{}]", driver,errorCode); | 139 | + log.error("人脸对比失败,请检查数据:[{}];错误代码:[{}]", driver, errorCode); |
| 131 | return null; | 140 | return null; |
| 132 | } | 141 | } |
| 133 | 142 | ||
| 134 | FaceFeature faceFeature = new FaceFeature(); | 143 | FaceFeature faceFeature = new FaceFeature(); |
| 135 | errorCode = faceEngine.extractFaceFeature(image.getImageData(), image.getWidth(), image.getHeight(), image.getImageFormat(), faceInfoList.get(0), faceFeature); | 144 | errorCode = faceEngine.extractFaceFeature(image.getImageData(), image.getWidth(), image.getHeight(), image.getImageFormat(), faceInfoList.get(0), faceFeature); |
| 136 | if (errorCode != ErrorInfo.MOK.getValue()) { | 145 | if (errorCode != ErrorInfo.MOK.getValue()) { |
| 137 | - log.error("提取对比特征失败,请检查数据:[{}];错误代码:[{}]", driver,errorCode); | 146 | + log.error("提取对比特征失败,请检查数据:[{}];错误代码:[{}]", driver, errorCode); |
| 138 | return null; | 147 | return null; |
| 139 | } | 148 | } |
| 140 | return faceFeature; | 149 | return faceFeature; |
Bsth-admin/src/main/java/com/ruoyi/service/impl/key/location/LinggangKeyWorkLocationServiceImpl.java
| @@ -602,7 +602,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | @@ -602,7 +602,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | ||
| 602 | continue; | 602 | continue; |
| 603 | } | 603 | } |
| 604 | break; | 604 | break; |
| 605 | - } while (i < 10000); | 605 | + } while (i < 100); |
| 606 | 606 | ||
| 607 | if (Objects.isNull(equipment) || Objects.isNull(number)) { | 607 | if (Objects.isNull(equipment) || Objects.isNull(number)) { |
| 608 | log.info("没有找到存放的格子:[{}]", equipment); | 608 | log.info("没有找到存放的格子:[{}]", equipment); |
Bsth-admin/src/main/resources/logback.xml
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | 16 | ||
| 17 | <!-- 系统日志输出 --> | 17 | <!-- 系统日志输出 --> |
| 18 | <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> | 18 | <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 19 | - <file>${log.path}/sys-info.log</file> | 19 | + <file>${log.path}/lingang-bsth.log</file> |
| 20 | <!-- 循环政策:基于时间创建日志文件 --> | 20 | <!-- 循环政策:基于时间创建日志文件 --> |
| 21 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | 21 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 22 | <!-- 日志文件名格式 --> | 22 | <!-- 日志文件名格式 --> |
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | </appender> | 38 | </appender> |
| 39 | 39 | ||
| 40 | <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> | 40 | <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 41 | - <file>${log.path}/sys-error.log</file> | 41 | + <file>${log.path}/lingang-bsth-error.log</file> |
| 42 | <!-- 循环政策:基于时间创建日志文件 --> | 42 | <!-- 循环政策:基于时间创建日志文件 --> |
| 43 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | 43 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 44 | <!-- 日志文件名格式 --> | 44 | <!-- 日志文件名格式 --> |
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | 61 | ||
| 62 | <!-- 用户访问日志输出 --> | 62 | <!-- 用户访问日志输出 --> |
| 63 | <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender"> | 63 | <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 64 | - <file>${log.path}/sys-user.log</file> | 64 | + <file>${log.path}/lingang-bsth-user.log</file> |
| 65 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | 65 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 66 | <!-- 按天回滚 daily --> | 66 | <!-- 按天回滚 daily --> |
| 67 | <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> | 67 | <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> |