| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | } |
| | | hkSyncParkService.syncParkBookBySingleModel(model); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public String batchAuth(Cars cars) { |
| | |
| | | model.setAuthTimeType(cars.getAuthTimeType()); |
| | | model.setStartTime(startTime); |
| | | model.setEndTime(endTime); |
| | | dealCarAuthByModel(model,cars.getLoginUserInfo(),parksList,date); |
| | | dealCarAuthByModel(model,cars.getLoginUserInfo().getId(),parksList,date,parkBookMapper); |
| | | model.setAuthStatus(Constants.ONE);//已授权 |
| | | carsMapper.update(null,new UpdateWrapper<Cars>().lambda() |
| | | .eq(Cars::getId,model.getId()) |
| | |
| | | |
| | | } |
| | | |
| | | private int dealCarAuthByModel(Cars model, LoginUserInfo loginUserInfo, List<Parks> parksList,Date date) { |
| | | public static int dealCarAuthByModel(Cars model, Integer userId, List<Parks> parksList,Date date,ParkBookMapper parkBookMapper) { |
| | | //删除车量库记录数据 |
| | | parkBookMapper.update(null,new UpdateWrapper<ParkBook>().lambda() |
| | | .eq(ParkBook::getCarCode,model.getCode()) |
| | |
| | | ParkBook parkBook = new ParkBook(); |
| | | parkBook.setIsdeleted(Constants.ZERO); |
| | | parkBook.setCreateDate(date); |
| | | parkBook.setCreator(loginUserInfo.getId()); |
| | | parkBook.setEditor(loginUserInfo.getId()); |
| | | parkBook.setCreator(userId); |
| | | parkBook.setEditor(userId); |
| | | parkBook.setEditDate(date); |
| | | parkBook.setCarCode(model.getCode()); |
| | | parkBook.setParkId(parks.getId()); |