|
|
|
@ -34,6 +34,7 @@ import com.zznode.itms.api.NBIManager; |
|
|
|
|
import com.zznode.itms.api.Utils; |
|
|
|
|
import com.zznode.itms.idl.resourcedefinition.*; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
@ -51,6 +52,7 @@ import java.util.Map; |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
@Slf4j |
|
|
|
|
public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
|
|
|
|
|
private final OrderInfoMapper orderInfoMapper; |
|
|
|
@ -227,19 +229,21 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
!ouiFlag && |
|
|
|
|
!OrderServiceTypeEnum.EQUIPMENT_REPLACEMENT.getValue().equals(orderInfo.getOrderServiceType()) |
|
|
|
|
) { |
|
|
|
|
bo = deviceStaticMapper.orderByDevSnoOui(null, null, uniqueUserId); |
|
|
|
|
if (bo != null) { |
|
|
|
|
DeviceDetailBO deviceDetailBO = deviceStaticMapper.orderByDevSnoOui(null, null, uniqueUserId); |
|
|
|
|
if (deviceDetailBO != null) { |
|
|
|
|
bo = deviceDetailBO; |
|
|
|
|
uniqueUserIdFlag = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
String pppoeAccount = obj.getPppoeAccount(); |
|
|
|
|
if (pppoeAccount != null && !pppoeAccount.isEmpty() && !ouiFlag && uniqueUserIdFlag) { |
|
|
|
|
bo = deviceStaticMapper.orderByPppoeAccount(DevStatusEnum.NORMAL.getValue(), pppoeAccount); |
|
|
|
|
if (bo == null) { |
|
|
|
|
throw new BusinessException(ResultCode.NOT_GET_DEVICE); |
|
|
|
|
} |
|
|
|
|
DeviceDetailBO deviceDetailBO = deviceStaticMapper.orderByPppoeAccount(DevStatusEnum.NORMAL.getValue(), pppoeAccount); |
|
|
|
|
if (deviceDetailBO != null) { |
|
|
|
|
bo = deviceDetailBO; |
|
|
|
|
pppoeFlag = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if (!pppoeFlag && !ouiFlag && !uniqueUserIdFlag) { |
|
|
|
|
throw new BusinessException(ResultCode.NOT_GET_DEVICE); |
|
|
|
|
} |
|
|
|
@ -253,15 +257,14 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
|
|
|
|
|
private RDeviceDetailStruct conversionStruct(DeviceDetailBO bo) { |
|
|
|
|
RDeviceDetailStruct struct = new RDeviceDetailStruct(); |
|
|
|
|
RDeviceDynamicStruct devDynamic = struct.devDynamic; |
|
|
|
|
RDeviceStaticStruct devStatic = struct.devStatic; |
|
|
|
|
RDeviceStaticDetailStruct devStaticDetail = struct.devStaticDetail; |
|
|
|
|
|
|
|
|
|
RDeviceDynamicStruct devDynamic = new RDeviceDynamicStruct(); |
|
|
|
|
RDeviceStaticStruct devStatic = new RDeviceStaticStruct(); |
|
|
|
|
RDeviceStaticDetailStruct devStaticDetail = new RDeviceStaticDetailStruct(); |
|
|
|
|
devStatic.devId = bo.getDevId(); |
|
|
|
|
devStatic.typeAndVerId = bo.getTypeAndVerId(); |
|
|
|
|
devStatic.custId = bo.getCustId(); |
|
|
|
|
devStatic.regionAreaId = bo.getRegionAreaId(); |
|
|
|
|
devStatic.corpAreaId = bo.getCorpAreaId(); |
|
|
|
|
devStatic.corpAreaId = bo.getCorpAreaId()==null?0L:bo.getCorpAreaId(); |
|
|
|
|
devStatic.devSNo = bo.getDevSno(); |
|
|
|
|
devStatic.devMac = bo.getDevMac(); |
|
|
|
|
devStatic.devPPPoE = bo.getDevPppoe(); |
|
|
|
@ -301,6 +304,10 @@ public class OrderInfoServiceImpl implements OrderInfoService { |
|
|
|
|
devStaticDetail.userSnNo = bo.getUserSnNo(); |
|
|
|
|
devStaticDetail.iptvAccess = bo.getIptvAccess(); |
|
|
|
|
devStaticDetail.bandAccess = bo.getBandAccess(); |
|
|
|
|
|
|
|
|
|
struct.devDynamic = devDynamic; |
|
|
|
|
struct.devStatic = devStatic; |
|
|
|
|
struct.devStaticDetail = devStaticDetail; |
|
|
|
|
return struct; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|