| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.CarChargeAddRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import com.doumee.service.system.NoticesService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | |
| | | @Autowired |
| | | private PlatformReasonMapper platformReasonMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private ParksMapper parksMapper; |
| | | |
| | | @Autowired |
| | | private ParkBookMapper parkBookMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | return memberNames; |
| | | } |
| | | |
| | | |
| | | |
| | | public void dealBusinessData(ApproveDTO approveDTO,Approve approve){ |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.unConstructionVisit) |
| | | ||approveDTO.getObjType().equals(Constants.approveObjectType.constructionVisit) |
| | |
| | | visits.setStatus(approveDTO.getStatus()); |
| | | visits.setEditDate(new Date()); |
| | | visits.setEditor(approveDTO.getLoginUserInfo().getMemberId()); |
| | | visitsMapper.updateById(visits); |
| | | //下发访客报备车辆信息 |
| | | |
| | | if(approveDTO.getObjType().equals(Constants.approveObjectType.visitReporting)){ |
| | | Boolean sendStatus = true; |
| | | //查询当前启用的停车场 |
| | | List<Parks> parksList = parksMapper.selectList(new QueryWrapper<Parks>() |
| | | .lambda() |
| | | .isNotNull(Parks::getHkId) |
| | | .eq(Parks::getIsdeleted,Constants.ZERO)); |
| | | List<ParkBook> parkBookList = new ArrayList<>(); |
| | | if(CollectionUtils.isNotEmpty(parksList)){ |
| | | for (Parks parks:parksList) { |
| | | ParkBook parkBook = new ParkBook(); |
| | | parkBook.setIsdeleted(Constants.ZERO); |
| | | parkBook.setCreateDate(new Date()); |
| | | parkBook.setVisitId(visits.getId()); |
| | | parkBook.setCarCode(visits.getCarNos()); |
| | | parkBook.setParkId(parks.getId()); |
| | | parkBook.setOrigin(Constants.TWO); |
| | | parkBook.setStartTime(visits.getStarttime()); |
| | | parkBook.setEndTime(visits.getEndtime()); |
| | | parkBook.setMemberId( visits.getMemberId()); |
| | | parkBook.setTimeType(Constants.ONE); |
| | | parkBook.setParkHkId(parks.getHkId()); |
| | | |
| | | CarChargeAddRequest param = new CarChargeAddRequest(); |
| | | param.setPlateNo(parkBook.getCarCode()); |
| | | param.setParkSyscode(parkBook.getParkHkId()); |
| | | param.setStartTime(Objects.isNull(parkBook.getStartTime())?DateUtil.getDate(new Date(),"yyyy-MM-dd"):DateUtil.getShortTimeToNull(parkBook.getStartTime())); |
| | | param.setEndTime(Objects.isNull(parkBook.getEndTime())?"2999-12-31":DateUtil.getShortTimeToNull(parkBook.getEndTime())); |
| | | BaseResponse response = HKService.carChargeAddtion(param); |
| | | parkBook.setHkDate(new Date()); |
| | | if(response!=null |
| | | && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | parkBook.setHkStatus(Constants.ONE); |
| | | parkBook.setRemark("包期成功"); |
| | | }else{ |
| | | parkBook.setHkStatus(Constants.TWO); |
| | | parkBook.setRemark("包期失败~"); |
| | | //下发失败 标记主业务状态为下发失败 |
| | | sendStatus = false; |
| | | } |
| | | parkBookList.add(parkBook); |
| | | } |
| | | parkBookMapper.insert(parkBookList); |
| | | } |
| | | if(sendStatus){ |
| | | visits.setStatus(Constants.VisitStatus.xfFail); |
| | | }else{ |
| | | visits.setStatus(Constants.VisitStatus.xfSuccess); |
| | | } |
| | | } |
| | | |
| | | visitsMapper.updateById(visits); |
| | | }else if(approveDTO.getObjType().equals(Constants.approveObjectType.cityUseCar)||approveDTO.getObjType().equals( |
| | | Constants.approveObjectType.unCityUseCar)){ |
| | | this.updDriver(approveDTO,approve,true); |