Commit c469c2f0aea1eadb27381c9e39e7f38497879e68
1 parent
aba59a0d
设备和场地
Showing
10 changed files
with
60 additions
and
52 deletions
Bsth-admin/src/main/java/com/ruoyi/controller/dss/KeyBoxController.java
| @@ -163,7 +163,7 @@ public class KeyBoxController extends BaseController { | @@ -163,7 +163,7 @@ public class KeyBoxController extends BaseController { | ||
| 163 | 163 | ||
| 164 | List<Equipment> equipmentList = equipmentService.list(eq); | 164 | List<Equipment> equipmentList = equipmentService.list(eq); |
| 165 | LinggangVenueInfo venueInfo = venueInfoService.getById(equipment.getYardId()); | 165 | LinggangVenueInfo venueInfo = venueInfoService.getById(equipment.getYardId()); |
| 166 | - if(Objects.isNull(venueInfo)){ | 166 | + if (Objects.isNull(venueInfo)) { |
| 167 | logger.info("根据DTO的数据无法查询场站信息:[{}]", dto); | 167 | logger.info("根据DTO的数据无法查询场站信息:[{}]", dto); |
| 168 | return ResponseResult.error404(); | 168 | return ResponseResult.error404(); |
| 169 | } | 169 | } |
| @@ -199,7 +199,7 @@ public class KeyBoxController extends BaseController { | @@ -199,7 +199,7 @@ public class KeyBoxController extends BaseController { | ||
| 199 | return ResponseResult.error404(); | 199 | return ResponseResult.error404(); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | - BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo,equipmentList); | 202 | + BasicSyncVo vo = convertBasicSyncVo(workLocations, schedulings, keyInfos, drivers, carInfos, equipment, venueInfo, equipmentList); |
| 203 | return ResponseResult.success(vo); | 203 | return ResponseResult.success(vo); |
| 204 | } catch (ParseException e) { | 204 | } catch (ParseException e) { |
| 205 | logger.error("钥匙柜基础信息同步异常:[{}]", dto, e); | 205 | logger.error("钥匙柜基础信息同步异常:[{}]", dto, e); |
| @@ -234,7 +234,7 @@ public class KeyBoxController extends BaseController { | @@ -234,7 +234,7 @@ public class KeyBoxController extends BaseController { | ||
| 234 | entity.setDevice(dto.getDevice()); | 234 | entity.setDevice(dto.getDevice()); |
| 235 | List<LinggangKeyWorkLocation> schedulings = linggangKeyWorkLocationService.list(entity); | 235 | List<LinggangKeyWorkLocation> schedulings = linggangKeyWorkLocationService.list(entity); |
| 236 | 236 | ||
| 237 | - List<LinggangKeyWorkLocation> locations = convert(dto,schedulings); | 237 | + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings); |
| 238 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.TAKE_OUT); | 238 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.TAKE_OUT); |
| 239 | if (Objects.isNull(responseResult)) { | 239 | if (Objects.isNull(responseResult)) { |
| 240 | return ResponseResult.error(); | 240 | return ResponseResult.error(); |
| @@ -254,7 +254,7 @@ public class KeyBoxController extends BaseController { | @@ -254,7 +254,7 @@ public class KeyBoxController extends BaseController { | ||
| 254 | entity.setDevice(dto.getDevice()); | 254 | entity.setDevice(dto.getDevice()); |
| 255 | List<LinggangKeyWorkLocation> schedulings = linggangKeyWorkLocationService.list(entity); | 255 | List<LinggangKeyWorkLocation> schedulings = linggangKeyWorkLocationService.list(entity); |
| 256 | 256 | ||
| 257 | - List<LinggangKeyWorkLocation> locations = convert(dto,schedulings); | 257 | + List<LinggangKeyWorkLocation> locations = convert(dto, schedulings); |
| 258 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY); | 258 | ResponseResult<Boolean> responseResult = linggangKeyWorkLocationService.updateTakeKey(locations, LinggangKeyWorkLocation.LinggangKeyWorkLocationTypeEnum.REPAY); |
| 259 | if (Objects.isNull(responseResult)) { | 259 | if (Objects.isNull(responseResult)) { |
| 260 | return ResponseResult.error(); | 260 | return ResponseResult.error(); |
| @@ -296,7 +296,7 @@ public class KeyBoxController extends BaseController { | @@ -296,7 +296,7 @@ public class KeyBoxController extends BaseController { | ||
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | location.setType(255); | 298 | location.setType(255); |
| 299 | - location.setScheduleDate(locations.get(0).getScheduleDate()); | 299 | + location.setStartScheduleDate(locations.get(0).getScheduleDate()); |
| 300 | int errorCount = linggangKeyWorkLocationService.countId(location); | 300 | int errorCount = linggangKeyWorkLocationService.countId(location); |
| 301 | 301 | ||
| 302 | location.setType(0); | 302 | location.setType(0); |
| @@ -310,13 +310,13 @@ public class KeyBoxController extends BaseController { | @@ -310,13 +310,13 @@ public class KeyBoxController extends BaseController { | ||
| 310 | 310 | ||
| 311 | LinggangKeyWorkLocation locationEq = new LinggangKeyWorkLocation(); | 311 | LinggangKeyWorkLocation locationEq = new LinggangKeyWorkLocation(); |
| 312 | locationEq.setYardId(sourceEq.getYardId()); | 312 | locationEq.setYardId(sourceEq.getYardId()); |
| 313 | - locationEq.setScheduleDate(locations.get(0).getScheduleDate()); | 313 | + locationEq.setStartScheduleDate(locations.get(0).getScheduleDate()); |
| 314 | 314 | ||
| 315 | List<LinggangKeyWorkLocation> locationsOfEq = linggangKeyWorkLocationService.list(locationEq); | 315 | List<LinggangKeyWorkLocation> locationsOfEq = linggangKeyWorkLocationService.list(locationEq); |
| 316 | 316 | ||
| 317 | locationEq = new LinggangKeyWorkLocation(); | 317 | locationEq = new LinggangKeyWorkLocation(); |
| 318 | locationEq.setYardId(sourceEq.getYardId()); | 318 | locationEq.setYardId(sourceEq.getYardId()); |
| 319 | - locationEq.setEndScheduleDate(locations.get(0).getScheduleDate()); | 319 | + locationEq.setStartScheduleDate(locations.get(0).getScheduleDate()); |
| 320 | IPage<LinggangKeyWorkLocation> page = linggangKeyWorkLocationService.pageList(new Page<>(dto.getPageNum(), dto.getPageSize()), locationEq, new OrderEntity()); | 320 | IPage<LinggangKeyWorkLocation> page = linggangKeyWorkLocationService.pageList(new Page<>(dto.getPageNum(), dto.getPageSize()), locationEq, new OrderEntity()); |
| 321 | 321 | ||
| 322 | List<LinggangScheduling> schedulings = Collections.emptyList(); | 322 | List<LinggangScheduling> schedulings = Collections.emptyList(); |
| @@ -480,7 +480,7 @@ public class KeyBoxController extends BaseController { | @@ -480,7 +480,7 @@ public class KeyBoxController extends BaseController { | ||
| 480 | vo.setDevice(equipment.getDeviceId()); | 480 | vo.setDevice(equipment.getDeviceId()); |
| 481 | vo.setDeviceType(equipment.getPromise()); | 481 | vo.setDeviceType(equipment.getPromise()); |
| 482 | vo.setTime(workLocations.get(0).getScheduleDate()); | 482 | vo.setTime(workLocations.get(0).getScheduleDate()); |
| 483 | - if(Objects.nonNull(venueInfo)) { | 483 | + if (Objects.nonNull(venueInfo)) { |
| 484 | vo.setYardName(venueInfo.getName()); | 484 | vo.setYardName(venueInfo.getName()); |
| 485 | } | 485 | } |
| 486 | vo.setKeyboxName(equipment.getName()); | 486 | vo.setKeyboxName(equipment.getName()); |
| @@ -532,7 +532,7 @@ public class KeyBoxController extends BaseController { | @@ -532,7 +532,7 @@ public class KeyBoxController extends BaseController { | ||
| 532 | planVo.setTimePlate(planTimePlateVo); | 532 | planVo.setTimePlate(planTimePlateVo); |
| 533 | 533 | ||
| 534 | return planVo; | 534 | return planVo; |
| 535 | - }).filter(obj->Objects.nonNull(obj)).collect(Collectors.toList()); | 535 | + }).filter(obj -> Objects.nonNull(obj)).collect(Collectors.toList()); |
| 536 | 536 | ||
| 537 | driverPlanVo.setDriverPlan(planVos); | 537 | driverPlanVo.setDriverPlan(planVos); |
| 538 | } | 538 | } |
| @@ -554,7 +554,7 @@ public class KeyBoxController extends BaseController { | @@ -554,7 +554,7 @@ public class KeyBoxController extends BaseController { | ||
| 554 | return vo; | 554 | return vo; |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | - private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto,List<LinggangKeyWorkLocation> schedulings) { | 557 | + private List<LinggangKeyWorkLocation> convert(TakeKeyDTO dto, List<LinggangKeyWorkLocation> schedulings) { |
| 558 | if (CollectionUtils.isEmpty(dto.getKeyItem())) { | 558 | if (CollectionUtils.isEmpty(dto.getKeyItem())) { |
| 559 | return Collections.emptyList(); | 559 | return Collections.emptyList(); |
| 560 | } | 560 | } |
| @@ -566,15 +566,15 @@ public class KeyBoxController extends BaseController { | @@ -566,15 +566,15 @@ public class KeyBoxController extends BaseController { | ||
| 566 | location.setKey(item.getKey()); | 566 | location.setKey(item.getKey()); |
| 567 | location.setScheduleDate(DateUtil.shortDate(dto.getTime())); | 567 | location.setScheduleDate(DateUtil.shortDate(dto.getTime())); |
| 568 | location.setType(item.getState()); | 568 | location.setType(item.getState()); |
| 569 | - if(CollectionUtils.isNotEmpty(schedulings)){ | ||
| 570 | - Optional<LinggangKeyWorkLocation> opt = schedulings.stream().filter(s->Objects.equals(item.getKey(),s.getCabinetNo())).findFirst(); | ||
| 571 | - if(opt.isPresent()){ | ||
| 572 | - location.setKeyInfoId(opt.get().getKeyInfoId()); | ||
| 573 | - } | 569 | + if (CollectionUtils.isNotEmpty(schedulings)) { |
| 570 | + Optional<LinggangKeyWorkLocation> opt = schedulings.stream().filter(s -> Objects.equals(item.getKey(), s.getCabinetNo())).findFirst(); | ||
| 571 | + if (opt.isPresent()) { | ||
| 572 | + location.setKeyInfoId(opt.get().getKeyInfoId()); | ||
| 573 | + } | ||
| 574 | } | 574 | } |
| 575 | 575 | ||
| 576 | return location; | 576 | return location; |
| 577 | - }).filter(obj->Objects.nonNull(obj.getKeyInfoId())).collect(Collectors.toList()); | 577 | + }).filter(obj -> Objects.nonNull(obj.getKeyInfoId())).collect(Collectors.toList()); |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | private TakeKeyVo convertTakeKeyVo(TakeKeyDTO dto, ResponseResult<Boolean> result) { | 580 | private TakeKeyVo convertTakeKeyVo(TakeKeyDTO dto, ResponseResult<Boolean> result) { |
| @@ -619,22 +619,20 @@ public class KeyBoxController extends BaseController { | @@ -619,22 +619,20 @@ public class KeyBoxController extends BaseController { | ||
| 619 | for (int i = 0; i < count; i++) { | 619 | for (int i = 0; i < count; i++) { |
| 620 | YarnCabinetStatePageCabinetsKeysVO keysVO = new YarnCabinetStatePageCabinetsKeysVO(); | 620 | YarnCabinetStatePageCabinetsKeysVO keysVO = new YarnCabinetStatePageCabinetsKeysVO(); |
| 621 | keysVO.setCabinetNo(Convert.toStr(i + 1)); | 621 | keysVO.setCabinetNo(Convert.toStr(i + 1)); |
| 622 | - if (CollectionUtils.isEmpty(locationsOfEqs)) { | ||
| 623 | - keysVO.setState(2); | ||
| 624 | - } else { | 622 | + keysVO.setState(2); |
| 623 | + if (CollectionUtils.isNotEmpty(locationsOfEqs)) { | ||
| 625 | Optional<LinggangKeyWorkLocation> optional = locationsOfEqs.stream().filter(l -> Objects.equals(l.getDevice(), eq.getDeviceId()) && | 624 | Optional<LinggangKeyWorkLocation> optional = locationsOfEqs.stream().filter(l -> Objects.equals(l.getDevice(), eq.getDeviceId()) && |
| 626 | Objects.equals(keysVO.getCabinetNo(), l.getCabinetNo())).findFirst(); | 625 | Objects.equals(keysVO.getCabinetNo(), l.getCabinetNo())).findFirst(); |
| 626 | + | ||
| 627 | if (optional.isPresent()) { | 627 | if (optional.isPresent()) { |
| 628 | if (Objects.equals(255, optional.get().getType())) { | 628 | if (Objects.equals(255, optional.get().getType())) { |
| 629 | keysVO.setState(255); | 629 | keysVO.setState(255); |
| 630 | - } else if (Objects.equals(0, optional.get().getType())) { | 630 | + } else if ((Objects.equals(0, optional.get().getType())||Objects.equals(2, optional.get().getType()))) { |
| 631 | keysVO.setState(1); | 631 | keysVO.setState(1); |
| 632 | - } else { | ||
| 633 | - keysVO.setState(2); | ||
| 634 | } | 632 | } |
| 635 | - | ||
| 636 | } | 633 | } |
| 637 | } | 634 | } |
| 635 | + keys.add(keysVO); | ||
| 638 | } | 636 | } |
| 639 | 637 | ||
| 640 | cabinetsVO.setKeys(keys); | 638 | cabinetsVO.setKeys(keys); |
| @@ -657,6 +655,7 @@ public class KeyBoxController extends BaseController { | @@ -657,6 +655,7 @@ public class KeyBoxController extends BaseController { | ||
| 657 | Optional<LinggangScheduling> optional = schedulings.stream().filter(sc -> Objects.equals(l.getSchedulingId(), sc.getId())).findFirst(); | 655 | Optional<LinggangScheduling> optional = schedulings.stream().filter(sc -> Objects.equals(l.getSchedulingId(), sc.getId())).findFirst(); |
| 658 | if (optional.isPresent()) { | 656 | if (optional.isPresent()) { |
| 659 | recordsVo.setRouteName(optional.get().getLineName()); | 657 | recordsVo.setRouteName(optional.get().getLineName()); |
| 658 | + recordsVo.setSelfCode(optional.get().getNbbm()); | ||
| 660 | if (CollectionUtils.isNotEmpty(carInfos)) { | 659 | if (CollectionUtils.isNotEmpty(carInfos)) { |
| 661 | Optional<CarInfo> optCar = carInfos.stream().filter(c -> Objects.equals(c.getNbbm(), optional.get().getNbbm())).findFirst(); | 660 | Optional<CarInfo> optCar = carInfos.stream().filter(c -> Objects.equals(c.getNbbm(), optional.get().getNbbm())).findFirst(); |
| 662 | if (optCar.isPresent()) { | 661 | if (optCar.isPresent()) { |
Bsth-admin/src/main/java/com/ruoyi/domain/driver/NewDriver.java
| @@ -139,7 +139,7 @@ public class NewDriver { | @@ -139,7 +139,7 @@ public class NewDriver { | ||
| 139 | 139 | ||
| 140 | /***同步结果状态;0成功,1失败*/ | 140 | /***同步结果状态;0成功,1失败*/ |
| 141 | @Excel(name = "同步结果状态;0成功,1失败") | 141 | @Excel(name = "同步结果状态;0成功,1失败") |
| 142 | - @TableField(value = "`integer`") | 142 | + @TableField(value = "driver_integer") |
| 143 | private java.lang.Integer integer; | 143 | private java.lang.Integer integer; |
| 144 | 144 | ||
| 145 | 145 |
Bsth-admin/src/main/java/com/ruoyi/domain/dss/key/box/dto/YarnCabinetStatePageDTO.java
| @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode; | @@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode; | ||
| 8 | import lombok.experimental.Accessors; | 8 | import lombok.experimental.Accessors; |
| 9 | 9 | ||
| 10 | import javax.validation.constraints.NotEmpty; | 10 | import javax.validation.constraints.NotEmpty; |
| 11 | +import javax.validation.constraints.NotNull; | ||
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| 13 | * @author liujun | 14 | * @author liujun |
| @@ -27,11 +28,11 @@ public class YarnCabinetStatePageDTO implements java.io.Serializable { | @@ -27,11 +28,11 @@ public class YarnCabinetStatePageDTO implements java.io.Serializable { | ||
| 27 | @ApiModelProperty(value = "车牌号") | 28 | @ApiModelProperty(value = "车牌号") |
| 28 | private String plate; | 29 | private String plate; |
| 29 | 30 | ||
| 30 | - @NotEmpty(message = "每页条数不能为空") | 31 | + @NotNull(message = "每页条数不能为空") |
| 31 | @ApiModelProperty(value = "钥匙领取记录,每页条数", required = true, example = "1") | 32 | @ApiModelProperty(value = "钥匙领取记录,每页条数", required = true, example = "1") |
| 32 | private Integer pageSize; | 33 | private Integer pageSize; |
| 33 | 34 | ||
| 34 | - @NotEmpty(message = "第几页不能为空") | 35 | + @NotNull(message = "第几页不能为空") |
| 35 | @ApiModelProperty(value = "钥匙领取记录,第几页", required = true, example = "1") | 36 | @ApiModelProperty(value = "钥匙领取记录,第几页", required = true, example = "1") |
| 36 | private Integer pageNum; | 37 | private Integer pageNum; |
| 37 | 38 |
Bsth-admin/src/main/java/com/ruoyi/domain/equipment/self/check/LingangEquimentSelfCheck.java
| @@ -68,12 +68,13 @@ public class LingangEquimentSelfCheck { | @@ -68,12 +68,13 @@ public class LingangEquimentSelfCheck { | ||
| 68 | 68 | ||
| 69 | /***锁控状态 1正常,2故障,null/3未检测到*/ | 69 | /***锁控状态 1正常,2故障,null/3未检测到*/ |
| 70 | @Excel(name = "锁控状态 1正常,2故障,null/3未检测到") | 70 | @Excel(name = "锁控状态 1正常,2故障,null/3未检测到") |
| 71 | - @TableField(value = "`lock`") | 71 | + @TableField(value = "equiment_self_lock") |
| 72 | private java.lang.Integer lock; | 72 | private java.lang.Integer lock; |
| 73 | 73 | ||
| 74 | 74 | ||
| 75 | /***设备传过来的时间*/ | 75 | /***设备传过来的时间*/ |
| 76 | @Excel(name = "设备传过来的时间") | 76 | @Excel(name = "设备传过来的时间") |
| 77 | + @TableField(value = "equiment_self_time") | ||
| 77 | private java.util.Date time; | 78 | private java.util.Date time; |
| 78 | 79 | ||
| 79 | 80 |
Bsth-admin/src/main/java/com/ruoyi/domain/sign/in/resource/LinggangSignInResource.java
| @@ -35,6 +35,7 @@ public class LinggangSignInResource { | @@ -35,6 +35,7 @@ public class LinggangSignInResource { | ||
| 35 | 35 | ||
| 36 | /***顺序*/ | 36 | /***顺序*/ |
| 37 | @Excel(name = "顺序") | 37 | @Excel(name = "顺序") |
| 38 | + @TableField(value = "sign_in_resource_index") | ||
| 38 | private Integer index; | 39 | private Integer index; |
| 39 | 40 | ||
| 40 | 41 |
Bsth-admin/src/main/java/com/ruoyi/service/impl/key/location/LinggangKeyWorkLocationServiceImpl.java
| @@ -103,7 +103,9 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | @@ -103,7 +103,9 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | ||
| 103 | 103 | ||
| 104 | @Override | 104 | @Override |
| 105 | public List<LinggangKeyWorkLocation> list(LinggangKeyWorkLocation entity) { | 105 | public List<LinggangKeyWorkLocation> list(LinggangKeyWorkLocation entity) { |
| 106 | - return list(new LambdaQueryWrapper<>(entity)); | 106 | + LambdaQueryWrapper<LinggangKeyWorkLocation> wrapper = new LambdaQueryWrapper<>(entity); |
| 107 | + switchTime(entity,wrapper); | ||
| 108 | + return list(wrapper); | ||
| 107 | } | 109 | } |
| 108 | 110 | ||
| 109 | @Override | 111 | @Override |
| @@ -133,14 +135,14 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | @@ -133,14 +135,14 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | ||
| 133 | public List<LinggangKeyWorkLocation> listRecent(LinggangKeyWorkLocation entity, Collection<Integer> keyIds, Date date) { | 135 | public List<LinggangKeyWorkLocation> listRecent(LinggangKeyWorkLocation entity, Collection<Integer> keyIds, Date date) { |
| 134 | LambdaQueryWrapper<LinggangKeyWorkLocation> wrapper = new LambdaQueryWrapper<>(entity); | 136 | LambdaQueryWrapper<LinggangKeyWorkLocation> wrapper = new LambdaQueryWrapper<>(entity); |
| 135 | if (Objects.nonNull(date)) { | 137 | if (Objects.nonNull(date)) { |
| 136 | - wrapper.lt(LinggangKeyWorkLocation::getScheduleDate, date); | 138 | + wrapper.le(LinggangKeyWorkLocation::getScheduleDate, date); |
| 137 | } | 139 | } |
| 138 | 140 | ||
| 139 | if (CollectionUtils.isNotEmpty(keyIds)) { | 141 | if (CollectionUtils.isNotEmpty(keyIds)) { |
| 140 | wrapper.in(LinggangKeyWorkLocation::getKeyInfoId, keyIds); | 142 | wrapper.in(LinggangKeyWorkLocation::getKeyInfoId, keyIds); |
| 141 | } | 143 | } |
| 142 | List<LinggangKeyWorkLocation> locations = list(wrapper); | 144 | List<LinggangKeyWorkLocation> locations = list(wrapper); |
| 143 | - return chooseRecent(locations, date); | 145 | + return locations; |
| 144 | } | 146 | } |
| 145 | 147 | ||
| 146 | @Override | 148 | @Override |
| @@ -185,6 +187,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | @@ -185,6 +187,7 @@ public class LinggangKeyWorkLocationServiceImpl extends ServiceImpl<LinggangKeyW | ||
| 185 | public Integer countId(LinggangKeyWorkLocation entity) { | 187 | public Integer countId(LinggangKeyWorkLocation entity) { |
| 186 | LambdaQueryWrapper<LinggangKeyWorkLocation> wrapper = new LambdaQueryWrapper<>(entity); | 188 | LambdaQueryWrapper<LinggangKeyWorkLocation> wrapper = new LambdaQueryWrapper<>(entity); |
| 187 | wrapper.select(LinggangKeyWorkLocation::getId); | 189 | wrapper.select(LinggangKeyWorkLocation::getId); |
| 190 | + switchTime(entity,wrapper); | ||
| 188 | return count(wrapper); | 191 | return count(wrapper); |
| 189 | } | 192 | } |
| 190 | 193 |
Bsth-admin/src/main/java/com/ruoyi/utils/UploadUtil.java
| @@ -3,6 +3,7 @@ package com.ruoyi.utils; | @@ -3,6 +3,7 @@ package com.ruoyi.utils; | ||
| 3 | import cn.hutool.core.codec.Base64; | 3 | import cn.hutool.core.codec.Base64; |
| 4 | import com.ruoyi.common.core.domain.ResponseResult; | 4 | import com.ruoyi.common.core.domain.ResponseResult; |
| 5 | import com.ruoyi.common.utils.StringUtils; | 5 | import com.ruoyi.common.utils.StringUtils; |
| 6 | +import com.ruoyi.common.utils.file.FileUploadUtils; | ||
| 6 | import com.ruoyi.config.BsthSystemConfig; | 7 | import com.ruoyi.config.BsthSystemConfig; |
| 7 | import lombok.extern.slf4j.Slf4j; | 8 | import lombok.extern.slf4j.Slf4j; |
| 8 | import org.apache.commons.io.FileUtils; | 9 | import org.apache.commons.io.FileUtils; |
| @@ -46,6 +47,7 @@ public class UploadUtil { | @@ -46,6 +47,7 @@ public class UploadUtil { | ||
| 46 | ByteArrayInputStream inputStream = null; | 47 | ByteArrayInputStream inputStream = null; |
| 47 | BufferedImage bufferedImage = null; | 48 | BufferedImage bufferedImage = null; |
| 48 | try { | 49 | try { |
| 50 | + content = FileUploadUtils.choosePrictureContent(content); | ||
| 49 | byte[] bytes = Base64.decode(content); | 51 | byte[] bytes = Base64.decode(content); |
| 50 | inputStream = new ByteArrayInputStream(bytes); | 52 | inputStream = new ByteArrayInputStream(bytes); |
| 51 | bufferedImage = ImageIO.read(inputStream); | 53 | bufferedImage = ImageIO.read(inputStream); |
| @@ -93,6 +95,7 @@ public class UploadUtil { | @@ -93,6 +95,7 @@ public class UploadUtil { | ||
| 93 | 95 | ||
| 94 | FileOutputStream outputStream = null; | 96 | FileOutputStream outputStream = null; |
| 95 | try { | 97 | try { |
| 98 | + content = FileUploadUtils.choosePrictureContent(content); | ||
| 96 | byte[] bytes = Base64.decode(content); | 99 | byte[] bytes = Base64.decode(content); |
| 97 | 100 | ||
| 98 | StringBuilder filePath = new StringBuilder(); | 101 | StringBuilder filePath = new StringBuilder(); |
Bsth-admin/src/main/resources/mapper/driver/NewDriverMapper.xml
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | <result column="fleet_name" jdbcType="VARCHAR" property="fleetName"/> | 26 | <result column="fleet_name" jdbcType="VARCHAR" property="fleetName"/> |
| 27 | <result column="face_Feature" jdbcType="VARCHAR" property="faceFeature"/> | 27 | <result column="face_Feature" jdbcType="VARCHAR" property="faceFeature"/> |
| 28 | <result column="blue_Tooth" jdbcType="VARCHAR" property="blueTooth"/> | 28 | <result column="blue_Tooth" jdbcType="VARCHAR" property="blueTooth"/> |
| 29 | - <result column="integer" jdbcType="INTEGER" property="integer"/> | 29 | + <result column="driver_integer" jdbcType="INTEGER" property="integer"/> |
| 30 | <result column="synContent" jdbcType="VARCHAR" property="syncontent"/> | 30 | <result column="synContent" jdbcType="VARCHAR" property="syncontent"/> |
| 31 | <result column="csn" jdbcType="VARCHAR" property="csn"/> | 31 | <result column="csn" jdbcType="VARCHAR" property="csn"/> |
| 32 | <result column="image_version" jdbcType="VARCHAR" property="imageVersion"/> | 32 | <result column="image_version" jdbcType="VARCHAR" property="imageVersion"/> |
| @@ -41,12 +41,12 @@ | @@ -41,12 +41,12 @@ | ||
| 41 | 41 | ||
| 42 | <sql id="columns"> | 42 | <sql id="columns"> |
| 43 | id | 43 | id |
| 44 | - , job_code , company_code , branche_company_code , personnel_name , papers_code , ic_card_code , personnel_type , posts , card , telphone , ic_rfid , id_rfid , tag_rfid , remark , line_name , line_code , face_sign_in , image , update_time , sign_in_equipment , fleet_name , face_Feature , blue_Tooth , integer , synContent , csn , image_version | 44 | + , job_code , company_code , branche_company_code , personnel_name , papers_code , ic_card_code , personnel_type , posts , card , telphone , ic_rfid , id_rfid , tag_rfid , remark , line_name , line_code , face_sign_in , image , update_time , sign_in_equipment , fleet_name , face_Feature , blue_Tooth , driver_integer , synContent , csn , image_version |
| 45 | </sql> | 45 | </sql> |
| 46 | 46 | ||
| 47 | <sql id="insert_columns"> | 47 | <sql id="insert_columns"> |
| 48 | id | 48 | id |
| 49 | - , job_code , company_code , branche_company_code , personnel_name , papers_code , ic_card_code , personnel_type , posts , card , telphone , ic_rfid , id_rfid , tag_rfid , remark , line_name , line_code , face_sign_in , image , update_time , sign_in_equipment , fleet_name , face_Feature , blue_Tooth , integer , synContent , csn , image_version | 49 | + , job_code , company_code , branche_company_code , personnel_name , papers_code , ic_card_code , personnel_type , posts , card , telphone , ic_rfid , id_rfid , tag_rfid , remark , line_name , line_code , face_sign_in , image , update_time , sign_in_equipment , fleet_name , face_Feature , blue_Tooth , driver_integer , synContent , csn , image_version |
| 50 | </sql> | 50 | </sql> |
| 51 | 51 | ||
| 52 | <sql id="insert_values"> | 52 | <sql id="insert_values"> |
| @@ -107,7 +107,7 @@ | @@ -107,7 +107,7 @@ | ||
| 107 | <if test="null!=fleetName">fleet_name,</if> | 107 | <if test="null!=fleetName">fleet_name,</if> |
| 108 | <if test="null!=faceFeature">face_Feature,</if> | 108 | <if test="null!=faceFeature">face_Feature,</if> |
| 109 | <if test="null!=blueTooth">blue_Tooth,</if> | 109 | <if test="null!=blueTooth">blue_Tooth,</if> |
| 110 | - <if test="null!=integer">integer,</if> | 110 | + <if test="null!=integer">driver_integer,</if> |
| 111 | <if test="null!=syncontent">synContent,</if> | 111 | <if test="null!=syncontent">synContent,</if> |
| 112 | <if test="null!=csn">csn,</if> | 112 | <if test="null!=csn">csn,</if> |
| 113 | <if test="null!=imageVersion">image_version,</if> | 113 | <if test="null!=imageVersion">image_version,</if> |
| @@ -173,7 +173,7 @@ | @@ -173,7 +173,7 @@ | ||
| 173 | <if test="null!=fleetName">fleet_name = #{fleetName,jdbcType=VARCHAR},</if> | 173 | <if test="null!=fleetName">fleet_name = #{fleetName,jdbcType=VARCHAR},</if> |
| 174 | <if test="null!=faceFeature">face_Feature = #{faceFeature,jdbcType=VARCHAR},</if> | 174 | <if test="null!=faceFeature">face_Feature = #{faceFeature,jdbcType=VARCHAR},</if> |
| 175 | <if test="null!=blueTooth">blue_Tooth = #{blueTooth,jdbcType=VARCHAR},</if> | 175 | <if test="null!=blueTooth">blue_Tooth = #{blueTooth,jdbcType=VARCHAR},</if> |
| 176 | - <if test="null!=integer">integer = #{integer,jdbcType=INTEGER},</if> | 176 | + <if test="null!=integer">driver_integer = #{integer,jdbcType=INTEGER},</if> |
| 177 | <if test="null!=syncontent">synContent = #{syncontent,jdbcType=VARCHAR},</if> | 177 | <if test="null!=syncontent">synContent = #{syncontent,jdbcType=VARCHAR},</if> |
| 178 | <if test="null!=csn">csn = #{csn,jdbcType=VARCHAR},</if> | 178 | <if test="null!=csn">csn = #{csn,jdbcType=VARCHAR},</if> |
| 179 | <if test="null!=imageVersion">image_version = #{imageVersion,jdbcType=VARCHAR},</if> | 179 | <if test="null!=imageVersion">image_version = #{imageVersion,jdbcType=VARCHAR},</if> |
| @@ -205,7 +205,7 @@ | @@ -205,7 +205,7 @@ | ||
| 205 | <if test="null!=fleetName">AND fleet_name = #{fleetName,jdbcType=VARCHAR},</if> | 205 | <if test="null!=fleetName">AND fleet_name = #{fleetName,jdbcType=VARCHAR},</if> |
| 206 | <if test="null!=faceFeature">AND face_Feature = #{faceFeature,jdbcType=VARCHAR},</if> | 206 | <if test="null!=faceFeature">AND face_Feature = #{faceFeature,jdbcType=VARCHAR},</if> |
| 207 | <if test="null!=blueTooth">AND blue_Tooth = #{blueTooth,jdbcType=VARCHAR},</if> | 207 | <if test="null!=blueTooth">AND blue_Tooth = #{blueTooth,jdbcType=VARCHAR},</if> |
| 208 | - <if test="null!=integer">AND integer = #{integer,jdbcType=INTEGER},</if> | 208 | + <if test="null!=integer">AND driver_integer = #{integer,jdbcType=INTEGER},</if> |
| 209 | <if test="null!=syncontent">AND synContent = #{syncontent,jdbcType=VARCHAR},</if> | 209 | <if test="null!=syncontent">AND synContent = #{syncontent,jdbcType=VARCHAR},</if> |
| 210 | <if test="null!=csn">AND csn = #{csn,jdbcType=VARCHAR},</if> | 210 | <if test="null!=csn">AND csn = #{csn,jdbcType=VARCHAR},</if> |
| 211 | <if test="null!=imageVersion">AND image_version = #{imageVersion,jdbcType=VARCHAR},</if> | 211 | <if test="null!=imageVersion">AND image_version = #{imageVersion,jdbcType=VARCHAR},</if> |
Bsth-admin/src/main/resources/mapper/equipment/LingangEquimentSelfCheckMapper.xml
| @@ -10,8 +10,8 @@ | @@ -10,8 +10,8 @@ | ||
| 10 | <result column="therm" jdbcType="INTEGER" property="therm"/> | 10 | <result column="therm" jdbcType="INTEGER" property="therm"/> |
| 11 | <result column="horn" jdbcType="INTEGER" property="horn"/> | 11 | <result column="horn" jdbcType="INTEGER" property="horn"/> |
| 12 | <result column="mike" jdbcType="INTEGER" property="mike"/> | 12 | <result column="mike" jdbcType="INTEGER" property="mike"/> |
| 13 | - <result column="lock" jdbcType="INTEGER" property="lock"/> | ||
| 14 | - <result column="time" jdbcType="TIMESTAMP" property="time"/> | 13 | + <result column="equiment_self_lock" jdbcType="INTEGER" property="lock"/> |
| 14 | + <result column="equiment_self_time" jdbcType="TIMESTAMP" property="time"/> | ||
| 15 | <result column="deviceType" jdbcType="VARCHAR" property="devicetype"/> | 15 | <result column="deviceType" jdbcType="VARCHAR" property="devicetype"/> |
| 16 | <result column="isKeybox" jdbcType="BIT" property="iskeybox"/> | 16 | <result column="isKeybox" jdbcType="BIT" property="iskeybox"/> |
| 17 | <result column="quipment_exception_id" jdbcType="INTEGER" property="quipmentExceptionId"/> | 17 | <result column="quipment_exception_id" jdbcType="INTEGER" property="quipmentExceptionId"/> |
| @@ -30,12 +30,12 @@ | @@ -30,12 +30,12 @@ | ||
| 30 | 30 | ||
| 31 | <sql id="columns"> | 31 | <sql id="columns"> |
| 32 | id | 32 | id |
| 33 | - , device , app_version , wine , cameras , therm , horn , mike , lock , ·time · , deviceType , isKeybox , quipment_exception_id , create_by , create_time , update_by , update_time | 33 | + , device , app_version , wine , cameras , therm , horn , mike , equiment_self_lock , equiment_self_time , deviceType , isKeybox , quipment_exception_id , create_by , create_time , update_by , update_time |
| 34 | </sql> | 34 | </sql> |
| 35 | 35 | ||
| 36 | <sql id="insert_columns"> | 36 | <sql id="insert_columns"> |
| 37 | id | 37 | id |
| 38 | - , device , app_version , wine , cameras , therm , horn , mike , lock , ·time · , deviceType , isKeybox , quipment_exception_id , create_by , create_time , update_by , update_time | 38 | + , device , app_version , wine , cameras , therm , horn , mike , equiment_self_lock , equiment_self_time , deviceType , isKeybox , quipment_exception_id , create_by , create_time , update_by , update_time |
| 39 | </sql> | 39 | </sql> |
| 40 | 40 | ||
| 41 | <sql id="insert_values"> | 41 | <sql id="insert_values"> |
| @@ -69,8 +69,8 @@ | @@ -69,8 +69,8 @@ | ||
| 69 | <if test="null!=therm">therm,</if> | 69 | <if test="null!=therm">therm,</if> |
| 70 | <if test="null!=horn">horn,</if> | 70 | <if test="null!=horn">horn,</if> |
| 71 | <if test="null!=mike">mike,</if> | 71 | <if test="null!=mike">mike,</if> |
| 72 | - <if test="null!=lock">lock,</if> | ||
| 73 | - <if test="null!=time">·time·,</if> | 72 | + <if test="null!=lock">equiment_self_lock,</if> |
| 73 | + <if test="null!=time">equiment_self_time,</if> | ||
| 74 | <if test="null!=devicetype">deviceType,</if> | 74 | <if test="null!=devicetype">deviceType,</if> |
| 75 | <if test="null!=iskeybox">isKeybox,</if> | 75 | <if test="null!=iskeybox">isKeybox,</if> |
| 76 | <if test="null!=quipmentExceptionId">quipment_exception_id,</if> | 76 | <if test="null!=quipmentExceptionId">quipment_exception_id,</if> |
| @@ -113,8 +113,8 @@ | @@ -113,8 +113,8 @@ | ||
| 113 | <if test="null!=therm">therm = #{therm,jdbcType=INTEGER},</if> | 113 | <if test="null!=therm">therm = #{therm,jdbcType=INTEGER},</if> |
| 114 | <if test="null!=horn">horn = #{horn,jdbcType=INTEGER},</if> | 114 | <if test="null!=horn">horn = #{horn,jdbcType=INTEGER},</if> |
| 115 | <if test="null!=mike">mike = #{mike,jdbcType=INTEGER},</if> | 115 | <if test="null!=mike">mike = #{mike,jdbcType=INTEGER},</if> |
| 116 | - <if test="null!=lock">lock = #{lock,jdbcType=INTEGER},</if> | ||
| 117 | - <if test="null!=time">·time· = #{time,jdbcType=TIMESTAMP},</if> | 116 | + <if test="null!=lock">equiment_self_lock = #{lock,jdbcType=INTEGER},</if> |
| 117 | + <if test="null!=time">equiment_self_time = #{time,jdbcType=TIMESTAMP},</if> | ||
| 118 | <if test="null!=devicetype">deviceType = #{devicetype,jdbcType=VARCHAR},</if> | 118 | <if test="null!=devicetype">deviceType = #{devicetype,jdbcType=VARCHAR},</if> |
| 119 | <if test="null!=iskeybox">isKeybox = #{iskeybox,jdbcType=BIT},</if> | 119 | <if test="null!=iskeybox">isKeybox = #{iskeybox,jdbcType=BIT},</if> |
| 120 | <if test="null!=quipmentExceptionId">quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if> | 120 | <if test="null!=quipmentExceptionId">quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if> |
| @@ -134,8 +134,8 @@ | @@ -134,8 +134,8 @@ | ||
| 134 | <if test="null!=therm">AND therm = #{therm,jdbcType=INTEGER},</if> | 134 | <if test="null!=therm">AND therm = #{therm,jdbcType=INTEGER},</if> |
| 135 | <if test="null!=horn">AND horn = #{horn,jdbcType=INTEGER},</if> | 135 | <if test="null!=horn">AND horn = #{horn,jdbcType=INTEGER},</if> |
| 136 | <if test="null!=mike">AND mike = #{mike,jdbcType=INTEGER},</if> | 136 | <if test="null!=mike">AND mike = #{mike,jdbcType=INTEGER},</if> |
| 137 | - <if test="null!=lock">AND lock = #{lock,jdbcType=INTEGER},</if> | ||
| 138 | - <if test="null!=time">AND ·time· = #{time,jdbcType=TIMESTAMP},</if> | 137 | + <if test="null!=lock">AND equiment_self_lock = #{lock,jdbcType=INTEGER},</if> |
| 138 | + <if test="null!=time">AND equiment_self_time = #{time,jdbcType=TIMESTAMP},</if> | ||
| 139 | <if test="null!=devicetype">AND deviceType = #{devicetype,jdbcType=VARCHAR},</if> | 139 | <if test="null!=devicetype">AND deviceType = #{devicetype,jdbcType=VARCHAR},</if> |
| 140 | <if test="null!=iskeybox">AND isKeybox = #{iskeybox,jdbcType=BIT},</if> | 140 | <if test="null!=iskeybox">AND isKeybox = #{iskeybox,jdbcType=BIT},</if> |
| 141 | <if test="null!=quipmentExceptionId">AND quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if> | 141 | <if test="null!=quipmentExceptionId">AND quipment_exception_id = #{quipmentExceptionId,jdbcType=INTEGER},</if> |
Bsth-admin/src/main/resources/mapper/sign/in/resourc/LinggangSignInResourceMapper.xml
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <resultMap id="BaseResultMap" type="com.ruoyi.domain.sign.in.resource.LinggangSignInResource"> | 4 | <resultMap id="BaseResultMap" type="com.ruoyi.domain.sign.in.resource.LinggangSignInResource"> |
| 5 | <id column="id" jdbcType="BIGINT" property="id"/> | 5 | <id column="id" jdbcType="BIGINT" property="id"/> |
| 6 | <result column="sign_id" jdbcType="BIGINT" property="signId"/> | 6 | <result column="sign_id" jdbcType="BIGINT" property="signId"/> |
| 7 | - <result column="index" jdbcType="INTEGER" property="index"/> | 7 | + <result column="sign_in_resource_index" jdbcType="INTEGER" property="index"/> |
| 8 | <result column="Resource_type" jdbcType="INTEGER" property="resourceType"/> | 8 | <result column="Resource_type" jdbcType="INTEGER" property="resourceType"/> |
| 9 | <result column="time" jdbcType="TIMESTAMP" property="time"/> | 9 | <result column="time" jdbcType="TIMESTAMP" property="time"/> |
| 10 | <result column="create_by" jdbcType="BIGINT" property="createBy"/> | 10 | <result column="create_by" jdbcType="BIGINT" property="createBy"/> |
| @@ -22,12 +22,12 @@ | @@ -22,12 +22,12 @@ | ||
| 22 | 22 | ||
| 23 | <sql id="columns"> | 23 | <sql id="columns"> |
| 24 | id | 24 | id |
| 25 | - , sign_id , index , Resource_type , time , create_by , create_time , update_by , update_time , path | 25 | + , sign_id , sign_in_resource_index , Resource_type , time , create_by , create_time , update_by , update_time , path |
| 26 | </sql> | 26 | </sql> |
| 27 | 27 | ||
| 28 | <sql id="insert_columns"> | 28 | <sql id="insert_columns"> |
| 29 | id | 29 | id |
| 30 | - , sign_id , index , Resource_type , time , create_by , create_time , update_by , update_time , path | 30 | + , sign_id , sign_in_resource_index , Resource_type , time , create_by , create_time , update_by , update_time , path |
| 31 | </sql> | 31 | </sql> |
| 32 | 32 | ||
| 33 | <sql id="insert_values"> | 33 | <sql id="insert_values"> |
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | <trim prefix="(" suffix=")" suffixOverrides=","> | 48 | <trim prefix="(" suffix=")" suffixOverrides=","> |
| 49 | <if test="null!=id">id,</if> | 49 | <if test="null!=id">id,</if> |
| 50 | <if test="null!=signId">sign_id,</if> | 50 | <if test="null!=signId">sign_id,</if> |
| 51 | - <if test="null!=index">index,</if> | 51 | + <if test="null!=index">sign_in_resource_index,</if> |
| 52 | <if test="null!=resourceType">Resource_type,</if> | 52 | <if test="null!=resourceType">Resource_type,</if> |
| 53 | <if test="null!=time">time,</if> | 53 | <if test="null!=time">time,</if> |
| 54 | <if test="null!=createBy">create_by,</if> | 54 | <if test="null!=createBy">create_by,</if> |
| @@ -78,7 +78,7 @@ | @@ -78,7 +78,7 @@ | ||
| 78 | <set> | 78 | <set> |
| 79 | <if test="null!=id">id = #{id,jdbcType=BIGINT},</if> | 79 | <if test="null!=id">id = #{id,jdbcType=BIGINT},</if> |
| 80 | <if test="null!=signId">sign_id = #{signId,jdbcType=BIGINT},</if> | 80 | <if test="null!=signId">sign_id = #{signId,jdbcType=BIGINT},</if> |
| 81 | - <if test="null!=index">index = #{index,jdbcType=INTEGER},</if> | 81 | + <if test="null!=index">sign_in_resource_index = #{index,jdbcType=INTEGER},</if> |
| 82 | <if test="null!=resourceType">Resource_type = #{resourceType,jdbcType=INTEGER},</if> | 82 | <if test="null!=resourceType">Resource_type = #{resourceType,jdbcType=INTEGER},</if> |
| 83 | <if test="null!=time">time = #{time,jdbcType=TIMESTAMP},</if> | 83 | <if test="null!=time">time = #{time,jdbcType=TIMESTAMP},</if> |
| 84 | <if test="null!=createBy">create_by = #{createBy,jdbcType=BIGINT},</if> | 84 | <if test="null!=createBy">create_by = #{createBy,jdbcType=BIGINT},</if> |
| @@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
| 92 | <sql id="where"> | 92 | <sql id="where"> |
| 93 | <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if> | 93 | <if test="null!=id">AND id = #{id,jdbcType=BIGINT},</if> |
| 94 | <if test="null!=signId">AND sign_id = #{signId,jdbcType=BIGINT},</if> | 94 | <if test="null!=signId">AND sign_id = #{signId,jdbcType=BIGINT},</if> |
| 95 | - <if test="null!=index">AND index = #{index,jdbcType=INTEGER},</if> | 95 | + <if test="null!=index">AND sign_in_resource_index = #{index,jdbcType=INTEGER},</if> |
| 96 | <if test="null!=resourceType">AND Resource_type = #{resourceType,jdbcType=INTEGER},</if> | 96 | <if test="null!=resourceType">AND Resource_type = #{resourceType,jdbcType=INTEGER},</if> |
| 97 | <if test="null!=time">AND time = #{time,jdbcType=TIMESTAMP},</if> | 97 | <if test="null!=time">AND time = #{time,jdbcType=TIMESTAMP},</if> |
| 98 | <if test="null!=createBy">AND create_by = #{createBy,jdbcType=BIGINT},</if> | 98 | <if test="null!=createBy">AND create_by = #{createBy,jdbcType=BIGINT},</if> |