|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
import com.fdkankan.common.constant.SceneVersionType;
|
|
import com.fdkankan.common.constant.SceneVersionType;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
|
+import com.fdkankan.common.util.JwtUtil;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.manage_jp.common.OssPath;
|
|
import com.fdkankan.manage_jp.common.OssPath;
|
|
import com.fdkankan.manage_jp.common.PageInfo;
|
|
import com.fdkankan.manage_jp.common.PageInfo;
|
|
@@ -36,10 +37,7 @@ import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
-import java.util.Date;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.HashSet;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.*;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -76,6 +74,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
ITmContractorService tmContractorService;
|
|
ITmContractorService tmContractorService;
|
|
@Autowired
|
|
@Autowired
|
|
ITmContractorNumService tmContractorNumService;
|
|
ITmContractorNumService tmContractorNumService;
|
|
|
|
+ @Autowired
|
|
|
|
+ IUserRoleService userRoleService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Long getCountByUserIds(List<Long> userIds) {
|
|
public Long getCountByUserIds(List<Long> userIds) {
|
|
@@ -106,11 +106,20 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
@Override
|
|
@Override
|
|
public Object pageList(SceneParam param, User user) {
|
|
public Object pageList(SceneParam param, User user) {
|
|
|
|
|
|
|
|
+ Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
|
+ if(!roleIds.contains(5L)){ //平台管理员
|
|
|
|
+ param.setCompanyId(user.getCompanyId());
|
|
|
|
+ if(!roleIds.contains(6L)){
|
|
|
|
+ //param.setUserId(user.getId());
|
|
|
|
+ param.setIsDel(false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
List<String> numList = tmContractorNumService.getNumListByUserId(user.getId());
|
|
List<String> numList = tmContractorNumService.getNumListByUserId(user.getId());
|
|
param.setCooperateSceneCodes(numList);
|
|
param.setCooperateSceneCodes(numList);
|
|
if(param.getType() == 2 || param.getType() == 6){ //深时
|
|
if(param.getType() == 2 || param.getType() == 6){ //深时
|
|
return laserService.pageList(param);
|
|
return laserService.pageList(param);
|
|
}
|
|
}
|
|
|
|
+
|
|
Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
for (SceneVo record : page.getRecords()) {
|
|
for (SceneVo record : page.getRecords()) {
|
|
Company company = companyService.getByCameraId(record.getCameraId());
|
|
Company company = companyService.getByCameraId(record.getCameraId());
|
|
@@ -120,8 +129,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
if(record.getSceneVersion().equals("v3")){
|
|
if(record.getSceneVersion().equals("v3")){
|
|
record.setIsUpgrade(0);
|
|
record.setIsUpgrade(0);
|
|
}
|
|
}
|
|
|
|
+ record.setIsDel(param.getIsDel());
|
|
if(numList != null && numList.contains(record.getNum())){
|
|
if(numList != null && numList.contains(record.getNum())){
|
|
record.setIsMain(false);
|
|
record.setIsMain(false);
|
|
|
|
+ record.setIsDel(false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return PageInfo.PageInfo(page);
|
|
return PageInfo.PageInfo(page);
|