|
|
@@ -101,20 +101,39 @@ public class SceneDrawServiceImpl implements ISceneDrawService {
|
|
|
new LambdaUpdateWrapper<SceneEditInfoExt>()
|
|
|
.set(SceneEditInfoExt::getSceneDraw, hasSceneDraw ? CommonStatus.YES.code().intValue() : CommonStatus.NO.code().intValue())
|
|
|
.eq(SceneEditInfoExt::getScenePlusId,scenePlusId));
|
|
|
+
|
|
|
+ ResultData<List<JSONObject>> listResultData = shapesHttpClient.shapesSegList(fdServiceHost, ListSegParamDTO.builder().num(num).shapeType(ShapeType.SEG_PANO.getCode()).build(), new CommonSuccessCallback(), new CommonErrorCallback());
|
|
|
+ Integer hasSegAi = CollUtil.isEmpty(listResultData.getData()) ? CommonStatus.NO.code().intValue() : CommonStatus.YES.code();
|
|
|
+ scenePlusExtService.update(new LambdaUpdateWrapper<ScenePlusExt>().eq(ScenePlusExt::getPlusId, scenePlusId).set(ScenePlusExt::getHasSegAi, hasSegAi));
|
|
|
}
|
|
|
|
|
|
private void addOrUpdate(String num, List<JSONObject> data) throws Exception{
|
|
|
+ List<JSONObject> aiList = new ArrayList<>();
|
|
|
Map<String, String> addOrUpdateMap = new HashMap<>();
|
|
|
int i = 0;
|
|
|
for (JSONObject jsonObject : data) {
|
|
|
jsonObject.put("createTime", Calendar.getInstance().getTimeInMillis() + i++);
|
|
|
- addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
|
|
|
+ String type = jsonObject.getString("type");
|
|
|
+ if(StrUtil.isNotEmpty(type) && type.equalsIgnoreCase("ai")){
|
|
|
+ aiList.add(jsonObject);
|
|
|
+ }else{
|
|
|
+ addOrUpdateMap.put(jsonObject.getString("sid"), JSON.toJSONString(jsonObject));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ //处理画笔数据开始--------start
|
|
|
this.syncFileToRedis(num);
|
|
|
-
|
|
|
//处理新增和修改数据
|
|
|
this.addOrUpdateHandler(num, addOrUpdateMap);
|
|
|
+ //处理画笔数据开始--------end
|
|
|
+
|
|
|
+ //处理ai识别数据-----------start
|
|
|
+ JSONObject param = new JSONObject();
|
|
|
+ param.put("num", num);
|
|
|
+ param.put("list", aiList);
|
|
|
+ shapesHttpClient.shapesUpdateByIds(fdServiceHost, param,new CommonSuccessCallback(), new CommonErrorCallback());
|
|
|
+ //处理ai识别数据-----------end
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void addOrUpdateHandler(String num, Map<String, String> addOrUpdateMap){
|