if (StringUtils.isEmpty(request.getOrgCode())) { | if (StringUtils.isEmpty(request.getOrgCode())) { | ||||
throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("请求参数orgCode必填!"); | throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("请求参数orgCode必填!"); | ||||
} | } | ||||
QtkCardInfo cardInfo = cardInfoRepo.findByCardId(request.getCardId()); | |||||
if (cardInfo == null) { | |||||
throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("未查询到该卡号信息!"); | |||||
} | |||||
if (cardInfo.getCardStatus() != CardStatus.ZC){ | |||||
throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("正常状态的卡号才能进行下黑!"); | |||||
} | |||||
QtkBlackCard blackCard = null; | QtkBlackCard blackCard = null; | ||||
//发送,调部中心接口 | //发送,调部中心接口 | ||||
YgzCardBlackUploadResponse uploadResponse = cardBlackUpload(request.getCardId(), 1, request.getType()); | YgzCardBlackUploadResponse uploadResponse = cardBlackUpload(request.getCardId(), 1, request.getType()); |
import cn.com.taiji.bls.manager.AbstractCommManager; | import cn.com.taiji.bls.manager.AbstractCommManager; | ||||
import cn.com.taiji.bls.manager.globe.GlobalTransactionManager; | import cn.com.taiji.bls.manager.globe.GlobalTransactionManager; | ||||
import cn.com.taiji.common.manager.ManagerException; | |||||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | import cn.com.taiji.common.manager.net.http.ServiceHandleException; | ||||
import cn.com.taiji.common.pub.CollectionTools; | import cn.com.taiji.common.pub.CollectionTools; | ||||
import cn.com.taiji.core.entity.basic.QtkBlackCard; | import cn.com.taiji.core.entity.basic.QtkBlackCard; | ||||
public AbstractBlsResponse serviceHandle(CardOutRequest req) throws ServiceHandleException { | public AbstractBlsResponse serviceHandle(CardOutRequest req) throws ServiceHandleException { | ||||
try { | try { | ||||
long begin = System.currentTimeMillis(); | long begin = System.currentTimeMillis(); | ||||
LocalDateTime outDate = LocalDateTime.now(); | |||||
QtkCardInfo cardInfo = cardInfoRepo.findByCardId(req.getCardId()); | |||||
if (cardInfo == null) { | |||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该卡号信息!"); | |||||
} | |||||
List<QtkBlackCard> blackCardList = blackCardRepo.queryByCardIdAndType(req.getCardId(), CardBlackType.fromCode(req.getType())); | List<QtkBlackCard> blackCardList = blackCardRepo.queryByCardIdAndType(req.getCardId(), CardBlackType.fromCode(req.getType())); | ||||
if (CollectionTools.isEmpty(blackCardList)){ | if (CollectionTools.isEmpty(blackCardList)){ | ||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该类型卡号黑名单!"); | throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该类型卡号黑名单!"); | ||||
} | } | ||||
LocalDateTime outDate = LocalDateTime.now(); | |||||
QtkBlackCardHis blackCardHis = null; | QtkBlackCardHis blackCardHis = null; | ||||
//发送,调部中心接口 | //发送,调部中心接口 | ||||
YgzCardBlackUploadResponse uploadResponse = blackCardInManager.cardBlackUpload(req.getCardId(), 2, req.getType()); | YgzCardBlackUploadResponse uploadResponse = blackCardInManager.cardBlackUpload(req.getCardId(), 2, req.getType()); |
if (StringUtils.isEmpty(req.getOrgCode())) { | if (StringUtils.isEmpty(req.getOrgCode())) { | ||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("请求参数orgCode必填!"); | throw GlyServiceError.NO_DATA_ERR.toHandleException("请求参数orgCode必填!"); | ||||
} | } | ||||
QtkObuInfo obuInfo = obuInfoRepo.findByObuId(req.getObuId()); | |||||
if (obuInfo == null) { | |||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该签号信息!"); | |||||
} | |||||
if (obuInfo.getObuStatus() != ObuStatus.ZC){ | |||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("正常状态的签号才能进行下黑!"); | |||||
} | |||||
QtkBlackObu blackObu = null; | QtkBlackObu blackObu = null; | ||||
//发送,调部中心接口 | //发送,调部中心接口 | ||||
YgzObuBlackUploadResponse uploadResponse = obuBlackUpload(req.getObuId(), 1, req.getType()); | YgzObuBlackUploadResponse uploadResponse = obuBlackUpload(req.getObuId(), 1, req.getType()); |
import cn.com.taiji.bls.manager.AbstractCommManager; | import cn.com.taiji.bls.manager.AbstractCommManager; | ||||
import cn.com.taiji.bls.manager.globe.GlobalTransactionManager; | import cn.com.taiji.bls.manager.globe.GlobalTransactionManager; | ||||
import cn.com.taiji.common.manager.ManagerException; | |||||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | import cn.com.taiji.common.manager.net.http.ServiceHandleException; | ||||
import cn.com.taiji.common.pub.CollectionTools; | import cn.com.taiji.common.pub.CollectionTools; | ||||
import cn.com.taiji.core.entity.basic.QtkBlackObu; | import cn.com.taiji.core.entity.basic.QtkBlackObu; | ||||
try { | try { | ||||
long begin = System.currentTimeMillis(); | long begin = System.currentTimeMillis(); | ||||
LocalDateTime outDate = LocalDateTime.now(); | LocalDateTime outDate = LocalDateTime.now(); | ||||
QtkObuInfo obuInfo = obuInfoRepo.findByObuId(req.getObuId()); | |||||
if (obuInfo == null) { | |||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该签号信息!"); | |||||
} | |||||
List<QtkBlackObu> blackObuList = blackObuRepo.queryByObuIdAndType(req.getObuId(), ObuBlackType.fromCode(req.getType())); | List<QtkBlackObu> blackObuList = blackObuRepo.queryByObuIdAndType(req.getObuId(), ObuBlackType.fromCode(req.getType())); | ||||
if (CollectionTools.isEmpty(blackObuList)){ | if (CollectionTools.isEmpty(blackObuList)){ | ||||
throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该类型签号黑名单!"); | throw GlyServiceError.NO_DATA_ERR.toHandleException("未查询到该类型签号黑名单!"); |