|
|
@@ -1071,62 +1071,63 @@ public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> imp
|
|
|
JSONArray scenes = res.getJSONArray("scenes");
|
|
|
for (int i = 0; i < scenes.size(); i++) {
|
|
|
JSONObject parse = JSON.parseObject(scenes.get(i).toString());
|
|
|
+ if (parse.getString("type").equalsIgnoreCase("pano")) {
|
|
|
if (res.containsKey("customMask")) {
|
|
|
JSONObject customMask = res.getJSONObject("customMask");
|
|
|
JSONObject earth = customMask.getJSONObject("earth");
|
|
|
JSONObject sky = customMask.getJSONObject("sky");
|
|
|
JSONObject customMaskJson = new JSONObject();
|
|
|
- if (StrUtil.isNotEmpty(earth.getString("icon"))&&i==0){
|
|
|
- earth.put("antidistorted",true);
|
|
|
- earth.put("scale",1);
|
|
|
- customMaskJson.put("earth",earth);
|
|
|
- }else {
|
|
|
- earth =new JSONObject();
|
|
|
- earth.put("fodderId","");
|
|
|
- earth.put("icon","");
|
|
|
- earth.put("antidistorted",true);
|
|
|
- earth.put("scale",1);
|
|
|
- earth.put("isShow",0);
|
|
|
- customMaskJson.put("earth",earth);
|
|
|
+ if (StrUtil.isNotEmpty(earth.getString("icon")) && i == 0) {
|
|
|
+ earth.put("antidistorted", true);
|
|
|
+ earth.put("scale", 1);
|
|
|
+ customMaskJson.put("earth", earth);
|
|
|
+ } else {
|
|
|
+ earth = new JSONObject();
|
|
|
+ earth.put("fodderId", "");
|
|
|
+ earth.put("icon", "");
|
|
|
+ earth.put("antidistorted", true);
|
|
|
+ earth.put("scale", 1);
|
|
|
+ earth.put("isShow", 0);
|
|
|
+ customMaskJson.put("earth", earth);
|
|
|
}
|
|
|
|
|
|
- if (StrUtil.isNotEmpty(sky.getString("icon"))&&i==0){
|
|
|
- sky.put("antidistorted",true);
|
|
|
- sky.put("scale",1);
|
|
|
- customMaskJson.put("sky",sky);
|
|
|
- }else {
|
|
|
- sky =new JSONObject();
|
|
|
- sky.put("fodderId","");
|
|
|
- sky.put("icon","");
|
|
|
- sky.put("antidistorted",true);
|
|
|
- sky.put("scale",1);
|
|
|
- sky.put("isShow",0);
|
|
|
- customMaskJson.put("sky",sky);
|
|
|
+ if (StrUtil.isNotEmpty(sky.getString("icon")) && i == 0) {
|
|
|
+ sky.put("antidistorted", true);
|
|
|
+ sky.put("scale", 1);
|
|
|
+ customMaskJson.put("sky", sky);
|
|
|
+ } else {
|
|
|
+ sky = new JSONObject();
|
|
|
+ sky.put("fodderId", "");
|
|
|
+ sky.put("icon", "");
|
|
|
+ sky.put("antidistorted", true);
|
|
|
+ sky.put("scale", 1);
|
|
|
+ sky.put("isShow", 0);
|
|
|
+ customMaskJson.put("sky", sky);
|
|
|
}
|
|
|
- parse.put("customMask",customMaskJson);
|
|
|
+ parse.put("customMask", customMaskJson);
|
|
|
}
|
|
|
|
|
|
- if (parse.containsKey("initVisual")&&i==0) {
|
|
|
+ if (parse.containsKey("initVisual") && i == 0) {
|
|
|
JSONObject initVisual = parse.getJSONObject("initVisual");
|
|
|
- initVisual.put("vlookatmin",90);
|
|
|
- initVisual.put("vlookatmax",-90);
|
|
|
- parse.put("initVisual",initVisual);
|
|
|
- }else {
|
|
|
+ initVisual.put("vlookatmin", 90);
|
|
|
+ initVisual.put("vlookatmax", -90);
|
|
|
+ parse.put("initVisual", initVisual);
|
|
|
+ } else {
|
|
|
JSONObject initVisual = new JSONObject();
|
|
|
- initVisual.put("vlookat",0);
|
|
|
- initVisual.put("hlookat",0);
|
|
|
- initVisual.put("vlookatmin",90);
|
|
|
- initVisual.put("vlookatmax",-90);
|
|
|
- parse.put("initVisual",initVisual);
|
|
|
+ initVisual.put("vlookat", 0);
|
|
|
+ initVisual.put("hlookat", 0);
|
|
|
+ initVisual.put("vlookatmin", 90);
|
|
|
+ initVisual.put("vlookatmax", -90);
|
|
|
+ parse.put("initVisual", initVisual);
|
|
|
}
|
|
|
- scenes.set(i,parse);
|
|
|
- res.put("scenes",scenes);
|
|
|
- String str = JSON.toJSONString(res,
|
|
|
- SerializerFeature.DisableCircularReferenceDetect);
|
|
|
- log.info("修改完成--{}",str);
|
|
|
- editSomeData(JSONObject.parseObject(str), workId);
|
|
|
+ scenes.set(i, parse);
|
|
|
+ res.put("scenes", scenes);
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
+ String str = JSON.toJSONString(res,
|
|
|
+ SerializerFeature.DisableCircularReferenceDetect);
|
|
|
+ log.info("修改完成--{}",str);
|
|
|
+ editSomeData(JSONObject.parseObject(str), workId);
|
|
|
}
|
|
|
|
|
|
}
|