| | |
| | | private JkKeysMapper jkKeysMapper; |
| | | |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Autowired |
| | |
| | | ); |
| | | log.error("钥匙柜信息推送实际钥匙变化:"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | |
| | | ); |
| | | log.error("钥匙柜信息推送实际钥匙变化:"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | |
| | | cabinetLog.setIsdeleted(Constants.ZERO); |
| | | cabinetLog.setCreateDate(new Date()); |
| | | jkCabinetLogMapper.insert(cabinetLog); |
| | | |
| | | jkCabinetLogMapper.update(null,new UpdateWrapper<JkCabinetLog>().lambda() |
| | | .set(JkCabinetLog::getCloseLogId,cabinetLog.getId()) |
| | | .eq(JkCabinetLog::getKeyId,cabinetLog.getKeyId()) |
| | | .eq(JkCabinetLog::getType,Constants.ONE) |
| | | .eq(JkCabinetLog::getKeyStatus,Constants.TWO) |
| | | .isNull(JkCabinetLog::getCloseLogId)); |
| | | |
| | | } |
| | | } |
| | | // if(StringUtils.isBlank(jkCabinetGrid.getKeyCode()) |