|  |  | 
 |  |  | package com.doumee.service.business.impl.hksync; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
 |  |  | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; | 
 |  |  | import com.doumee.config.DataSyncConfig; | 
 |  |  | import com.doumee.core.constants.ResponseStatus; | 
 |  |  | 
 |  |  | import com.doumee.core.haikang.model.param.BaseListPageResponse; | 
 |  |  | import com.doumee.core.haikang.model.param.BaseResponse; | 
 |  |  | import com.doumee.core.haikang.model.param.request.*; | 
 |  |  | import com.doumee.core.haikang.model.param.respose.AppointmentInfoResponse; | 
 |  |  | import com.doumee.core.haikang.model.param.respose.ParkCrossRecordInfoResponse; | 
 |  |  | import com.doumee.core.haikang.model.param.respose.ParkListResponse; | 
 |  |  | import com.doumee.core.haikang.service.HKService; | 
 |  |  | import com.doumee.core.utils.Constants; | 
 |  |  | import com.doumee.core.utils.DESUtil; | 
 |  |  | import com.doumee.core.utils.DateUtil; | 
 |  |  | import com.doumee.core.utils.Utils; | 
 |  |  | import com.doumee.dao.business.CarEventMapper; | 
 |  |  | 
 |  |  |         }finally { | 
 |  |  |             Constants.DEALING_HK_PARKBOOK =false; | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private void dealParkBookBiz(ParkBook c,Date date) { | 
 |  |  |         try { | 
 |  |  |             if(Constants.equalsObject(c.getIsdeleted(),Constants.ONE)) { | 
 |  |  |             if(Constants.equalsInteger(c.getIsdeleted(),Constants.ONE)) { | 
 |  |  |                 //如果取消预约,则进行取消包期 | 
 |  |  |                 if(StringUtils.isNotBlank(c.getParkHkId()) | 
 |  |  |                         && StringUtils.isNotBlank(c.getCarCode())){ | 
 |  |  | 
 |  |  |         }catch (Exception e){ | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public  void syncParkBookBySingleModel(ParkBook c) { | 
 |  |  |                 if(Constants.equalsObject(c.getIsdeleted(),Constants.ONE)){ | 
 |  |  |                 if(Constants.equalsInteger(c.getIsdeleted(),Constants.ONE)){ | 
 |  |  |                     //如果取消预约,则进行取消包期 | 
 |  |  |                     if(StringUtils.isNotBlank(c.getParkHkId()) | 
 |  |  |                             && StringUtils.isNotBlank(c.getCarCode())){ | 
 |  |  | 
 |  |  |                     parkBookMapper.updateById(c); | 
 |  |  |                 } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private boolean addParkBookHk(ParkBook c) { | 
 |  |  |         CarChargeAddRequest param = new CarChargeAddRequest(); | 
 |  |  |         param.setPlateNo(c.getCarCode()); | 
 |  |  | 
 |  |  |             return  false; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |     private boolean cancelParkBookHk(ParkBook c) { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public static boolean cancelParkBookHk(ParkBook c) { | 
 |  |  |         CarChargeDelRequest param = new CarChargeDelRequest(); | 
 |  |  |         param.setPlateNo(c.getCarCode()); | 
 |  |  |         param.setParkSyscode(c.getParkHkId()); | 
 |  |  |         BaseResponse response = HKService.carChargeDeletion(param); | 
 |  |  |         if(response!=null | 
 |  |  |                 && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE)){ | 
 |  |  |                 && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ | 
 |  |  |             return true; | 
 |  |  |         }else{ | 
 |  |  |             return  false; | 
 |  |  | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             if(addList.size()>0){ | 
 |  |  |                 parksMapper.insertBatchSomeColumn(addList); | 
 |  |  |                 parksMapper.insert(addList); | 
 |  |  |             } | 
 |  |  |             if(editList.size()>0){ | 
 |  |  |                 for(Parks d : editList){ | 
 |  |  | 
 |  |  |  | 
 |  |  |                     List<CarEvent> sublist = allHkList.subList(startIndex, endIndex); | 
 |  |  |                     if(sublist.size()>0){ | 
 |  |  |                         carEventMapper.insertBatchSomeColumn(sublist);//插入新数据 | 
 |  |  |                         carEventMapper.insert(sublist);//插入新数据 | 
 |  |  |                     } | 
 |  |  |                     startIndex = endIndex; | 
 |  |  |                     endIndex += sublistSize; |