|
|
@@ -644,6 +644,7 @@ public class SubsidyQueueServiceImpl implements ISubsidyQueueService {
|
|
|
.last("limit 1"));
|
|
|
}
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void move(SubsidyQueueMoveBo bo) {
|
|
|
Business originalBusiness = businessService.loadById(bo.getOriginalBusinessId(), true);
|
|
|
@@ -666,9 +667,11 @@ public class SubsidyQueueServiceImpl implements ISubsidyQueueService {
|
|
|
for (Long queueId : bo.getIds()) {
|
|
|
queueCount = queueCount + 1;
|
|
|
SubsidyQueue firstQueue = this.loadById(queueId, false);
|
|
|
- if (ObjectUtil.isNotNull(firstQueue)
|
|
|
- && firstQueue.getCurrentBusinessId().equals(originalBusiness.getBusinessId())
|
|
|
- && SubsidyStatus.WAITING.equals(firstQueue.getSubsidyStatus())) {
|
|
|
+ if (ObjectUtil.isNotNull(firstQueue) && firstQueue.getCurrentBusinessId().equals(originalBusiness.getBusinessId())) {
|
|
|
+ if(SubsidyStatus.COMPLETE.equals(firstQueue.getSubsidyStatus()))
|
|
|
+ {
|
|
|
+ throw new ServiceException(String.format("订单编号:%s,%s", firstQueue.getOrderNo(),BusinessExceptionEnum.QUEUE_COMPLETE.getMsg()),BusinessExceptionEnum.QUEUE_COMPLETE.getCode());
|
|
|
+ }
|
|
|
firstQueue.setCurrentBusinessId(targetBusiness.getBusinessId());
|
|
|
firstQueue.setCurrentBusinessName(targetBusiness.getBusinessName());
|
|
|
firstQueue.setMoveTime(new Date());
|