Commit df625c0c4ff85d849e8c6bd31dbc64d718f7035d
1 parent
21ecea2e
同步数据
Showing
7 changed files
with
21 additions
and
8 deletions
Bsth-admin/sql/DDL.sql
0 → 100644
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
| ... | ... | @@ -285,7 +285,7 @@ public class KeyBoxController extends BaseController { |
| 285 | 285 | // return ResponseResult.error404(); |
| 286 | 286 | // } |
| 287 | 287 | |
| 288 | - List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver, keyInfos); | |
| 288 | + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver, keyInfos,0); | |
| 289 | 289 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.TAKE_OUT); |
| 290 | 290 | if (Objects.isNull(responseResult)) { |
| 291 | 291 | return ResponseResult.error(); |
| ... | ... | @@ -335,7 +335,7 @@ public class KeyBoxController extends BaseController { |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | |
| 338 | - List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver, keyInfos); | |
| 338 | + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings, driver, keyInfos,1); | |
| 339 | 339 | // List<LinggangKeyWorkLocation> errorLocations = locations.stream().filter(l -> Objects.isNull(l.getKeyInfoId())).collect(Collectors.toList()); |
| 340 | 340 | // locations = locations.stream().filter(l -> Objects.nonNull(l.getKeyInfoId())).collect(Collectors.toList()); |
| 341 | 341 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY); |
| ... | ... | @@ -756,7 +756,7 @@ public class KeyBoxController extends BaseController { |
| 756 | 756 | return vo; |
| 757 | 757 | } |
| 758 | 758 | |
| 759 | - private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto, List<LinggangKeyWorkLocation> schedulings, NewDriver driver, List<KeyInfo> keyInfos) { | |
| 759 | + private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto, List<LinggangKeyWorkLocation> schedulings, NewDriver driver, List<KeyInfo> keyInfos,int ty) { | |
| 760 | 760 | if (CollectionUtils.isEmpty(dto.getKeyItem())) { |
| 761 | 761 | return Collections.emptyList(); |
| 762 | 762 | } |
| ... | ... | @@ -770,6 +770,7 @@ public class KeyBoxController extends BaseController { |
| 770 | 770 | location.setType(item.getState()); |
| 771 | 771 | location.setPlate(item.getPlate()); |
| 772 | 772 | location.setTime(dto.getTime()); |
| 773 | + location.setType1(ty); | |
| 773 | 774 | if (CollectionUtils.isNotEmpty(schedulings)) { |
| 774 | 775 | Optional<LinggangKeyWorkLocation> opt = schedulings.stream().filter(s -> Objects.equals(item.getKey(), s.getCabinetNo())).findFirst(); |
| 775 | 776 | if (opt.isPresent()) { | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/domain/DriverScheduling.java
Bsth-admin/src/main/java/com/ruoyi/domain/key/location/LinggangKeyWorkLocation.java
| ... | ... | @@ -101,6 +101,8 @@ public class LinggangKeyWorkLocation { |
| 101 | 101 | @Excel(name = "状态:1 是归还;0是借出;2是初始状态") |
| 102 | 102 | private java.lang.Integer type; |
| 103 | 103 | |
| 104 | + private Integer type1; | |
| 105 | + | |
| 104 | 106 | @TableField(exist = false) |
| 105 | 107 | private Long scheduleDateTimeDiff; |
| 106 | 108 | |
| ... | ... | @@ -128,7 +130,8 @@ public class LinggangKeyWorkLocation { |
| 128 | 130 | } |
| 129 | 131 | |
| 130 | 132 | return Objects.equals(this.yardId, location.getYardId()) && Objects.equals(this.device, location.getDevice()) && Objects.equals(this.keyInfoId, location.getKeyInfoId()) |
| 131 | - && Objects.equals(this.scheduleDate, location.getScheduleDate()) && Objects.equals(this.schedulingId, location.getSchedulingId()) && Objects.equals(this.type, location.getType()); | |
| 133 | + && Objects.equals(this.scheduleDate, location.getScheduleDate()) && Objects.equals(this.schedulingId, location.getSchedulingId()) | |
| 134 | + && Objects.equals(this.type, location.getType()) && Objects.equals(this.type1,location.getType1()); | |
| 132 | 135 | } |
| 133 | 136 | |
| 134 | 137 | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/in/service/impl/SignInServiceV1Impl.java
| ... | ... | @@ -124,7 +124,7 @@ public class SignInServiceV1Impl extends ServiceImpl<SignInMapperV1, SignInV1> i |
| 124 | 124 | calDriverScheduling = findSchedulingByDateTime(schedulings, dateTime, ConstDriverProperties.BC_TYPE_IN); |
| 125 | 125 | } else { |
| 126 | 126 | if (checkAlcoholIntake(signIn.getAlcoholIntake())) { |
| 127 | - AjaxResult ajaxResult = bigViewServiceV1.getAjaxResultByDriverSignInfo(signIn,signInV1); | |
| 127 | + AjaxResult ajaxResult = bigViewServiceV1.getAjaxResultByDriverSignInfo(signIn,signInV1,calDriverScheduling.getDriverScheduling()); | |
| 128 | 128 | if (Objects.nonNull(ajaxResult)) { |
| 129 | 129 | return ajaxResult; |
| 130 | 130 | } | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/BigViewServiceV1.java
| ... | ... | @@ -28,7 +28,7 @@ public interface BigViewServiceV1 { |
| 28 | 28 | * @param signIn |
| 29 | 29 | * @return com.ruoyi.common.core.domain.AjaxResult |
| 30 | 30 | */ |
| 31 | - AjaxResult getAjaxResultByDriverSignInfo(SignIn signIn,SignInV1 signInV1); | |
| 31 | + AjaxResult getAjaxResultByDriverSignInfo(SignIn signIn,SignInV1 signInV1,DriverScheduling scheduling); | |
| 32 | 32 | |
| 33 | 33 | /*** |
| 34 | 34 | * 是否是早签 | ... | ... |
Bsth-admin/src/main/java/com/ruoyi/service/impl/BigViewServiceV1Impl.java
| ... | ... | @@ -92,15 +92,18 @@ public class BigViewServiceV1Impl implements BigViewServiceV1 { |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | @Override |
| 95 | - public AjaxResult getAjaxResultByDriverSignInfo(SignIn signIn,SignInV1 signInV1) { | |
| 95 | + public AjaxResult getAjaxResultByDriverSignInfo(SignIn signIn,SignInV1 signInV1,DriverScheduling scheduling) { | |
| 96 | 96 | String key = StringUtils.join(REDIS_SIGN_IN_DRIVER_ALCOHOL_OVERFLOW, ConstDateUtil.FAST_YYYY_MM_DD.format(new Date()), ":", signIn.getJobCode()); |
| 97 | + String key1 = StringUtils.join(REDIS_SIGN_IN_DRIVER_ALCOHOL_OVERFLOW, ConstDateUtil.FAST_YYYY_MM_DD.format(new Date()), ":", signIn.getJobCode(),":",scheduling.getId()); | |
| 97 | 98 | // 驾驶员酒精测试连续超标两次则提示换人 |
| 98 | - Integer count = redisCache.getCacheObject(key); | |
| 99 | + Integer count = redisCache.getCacheObject(key1); | |
| 99 | 100 | if (Objects.isNull(count) || count.equals(0)) { |
| 100 | 101 | count = 1; |
| 101 | 102 | redisCache.setCacheObject(key, count, 1, TimeUnit.DAYS); |
| 103 | + redisCache.setCacheObject(key1, count, 1, TimeUnit.DAYS); | |
| 102 | 104 | } else { |
| 103 | 105 | redisCache.setCacheObject(key, ++count, 1, TimeUnit.DAYS); |
| 106 | + redisCache.setCacheObject(key1, ++count, 1, TimeUnit.DAYS); | |
| 104 | 107 | } |
| 105 | 108 | if (SIGN_IN_ERROR_COUNT.compareTo(count) <= 0) { |
| 106 | 109 | ... | ... |