소스 검색

调整

master
zouhantao 3 주 전
부모
커밋
b3afbca1c6
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14
    0
      zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/ass/ActiveManagerImpl.java

+ 14
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/ass/ActiveManagerImpl.java 파일 보기

@@ -8,6 +8,8 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.core.entity.basic.QtkObuInfo;
import cn.com.taiji.core.entity.dict.basic.CardStatus;
import cn.com.taiji.core.entity.dict.basic.ObuStatus;
import cn.com.taiji.core.entity.user.Staff;
import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -60,6 +62,8 @@ public class ActiveManagerImpl extends AbstractCommManager implements ActiveMana
private QtkCardInfoRepo cardInfoRepo;
@Autowired
private QtkObuInfoRepo obuInfoRepo;
@Autowired
private StaffRepo staffRepo;

/**
* 新增激活记录
@@ -142,11 +146,21 @@ public class ActiveManagerImpl extends AbstractCommManager implements ActiveMana
if(info == null){
throw new ManagerException("未查到车辆信息!");
}
QtkCardInfo cardInfo = cardInfoRepo.findByVehicleIdAndCardStatus(requestDTO.getVehicleId(), CardStatus.ZC);
QtkObuInfo obuInfo = obuInfoRepo.findByVehicleIdAndObuStatus(requestDTO.getVehicleId(), ObuStatus.ZC);
Staff staff = staffRepo.findByOpenId(findOpenIdByToken(requestDTO.getAccessToken()));
if (staff != null){
if (staff.getAgencyId() != cardInfo.getAgencyId()){
return null;
}
}
DeviceReactivateModel model = new DeviceReactivateModel();
BeanTools.copyProperties(info, model);
model.setVehicleType(info.getType());
model.setMobile(customerInfo.getCustomerTel());
model.setActiveType(2);
model.setCardId(cardInfo.getCardId());
model.setObuId(obuInfo.getObuId());
list.add(model);
}
QueryVehicleResponseDTO resDTO = new QueryVehicleResponseDTO();

Loading…
취소
저장