|
@@ -331,7 +331,7 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int getPayStatus(Long cameraId, Long space){
|
|
|
+ public int getPayStatus(Long cameraId, Long space, JSONObject dataFdageJson){
|
|
|
//查询权益统计容量的方式
|
|
|
String unit = SpaceType.GB.code();
|
|
|
CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
|
|
@@ -347,8 +347,10 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
//更新相机使用用量,非激光相机或者是空间个数计算方式的,需要叠加相机容量
|
|
|
cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
|
|
|
|
|
|
- //无限容量或者激光相机,直接返回已支付
|
|
|
- if(limit == -1 || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))){
|
|
|
+ //无限容量或者激光相机或者文保vr,直接返回已支付
|
|
|
+ if(limit == -1
|
|
|
+ || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))
|
|
|
+ || this.checkIsSpVr(dataFdageJson, cameraDetail)){
|
|
|
return PayStatus.PAY.code();
|
|
|
}
|
|
|
|
|
@@ -787,4 +789,20 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
return map;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean checkIsSpVr(JSONObject dataFdageJson, CameraDetail cameraDetail) {
|
|
|
+ if(Objects.isNull(cameraDetail)
|
|
|
+ || Objects.isNull(cameraDetail.getCompanyId())
|
|
|
+ || Objects.isNull(dataFdageJson)
|
|
|
+ || Objects.isNull(dataFdageJson.getInteger("location"))){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ Integer location = dataFdageJson.getInteger("location");
|
|
|
+ Long companyId = cameraDetail.getCompanyId();
|
|
|
+ if(companyId == 26 && location == 7){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|