Commit 40031266 by jiang'yun

修改

parent aba00f44
......@@ -119,4 +119,17 @@ public class SjJygjGdsjgdcsController extends BaseController
return jsonString;
}
/**
* 查询井眼轨迹三维图
*/
@GetMapping("/jygjSw")
public String jygjSw(SjJygjGdsjgdcs sjJygjGdsjgdcs)
{
Map jsjgt = sjJygjGdsjgdcsService.jygjSw(sjJygjGdsjgdcs);
JSONObject jsonObject = new JSONObject(jsjgt);
String jsonString = jsonObject.toJSONString();
return jsonString;
}
}
......@@ -63,4 +63,6 @@ public interface ISjJygjGdsjgdcsService
Map jygjEw(SjJygjGdsjgdcs sjJygjGdsjgdcs);
Map jygjSw(SjJygjGdsjgdcs sjJygjGdsjgdcs);
}
......@@ -171,6 +171,62 @@ public class SjJygjGdsjgdcsServiceImpl implements ISjJygjGdsjgdcsService
return map;
}
@Override
public Map jygjSw(SjJygjGdsjgdcs sjJygjGdsjgdcs) {
List<SjJygjGdsjgdcs> gjlist = sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
// 三维坐标
Map swmap =new HashMap();
List swList = new ArrayList<>();
swmap.put("lineData",swList);
Double maxcs =gjlist.stream().map(SjJygjGdsjgdcs::getCs).max(Double::compare).get();;
Double maxnb = 0.0;
Double minnb = 0.0;
Double maxdx = 0.0;
Double mindx = 0.0;
maxcs= gjlist.stream().map(SjJygjGdsjgdcs::getCs).max(Double::compare).get();
maxnb= gjlist.stream().map(SjJygjGdsjgdcs::getNbwy).max(Double::compare).get();
minnb= gjlist.stream().map(SjJygjGdsjgdcs::getNbwy).min(Double::compare).get();
maxdx= gjlist.stream().map(SjJygjGdsjgdcs::getDxwy).max(Double::compare).get();
mindx= gjlist.stream().map(SjJygjGdsjgdcs::getDxwy).min(Double::compare).get();
for(int i=0;i<gjlist.size();i++){
SjJygjGdsjgdcs dw = gjlist.get(i);
if (dw.getCs()==null||dw.getNbwy()==null||dw.getDxwy()==null) {
return back("数据存在空值");
}
Double cs = dw.getCs(); // 垂深
Double nb = dw.getNbwy(); // 南北
Double dx = dw.getDxwy(); // 东西
Double gtd = dw.getQjbhl(); // 狗腿度
Map swd =new HashMap(); // 三维的点
swd.put("value",new String[] {dx.toString(),nb.toString(),cs.toString()});
swd.put("params",gtd); // 狗腿度
swList.add(swd);
}
swmap.put("xmax",maxdx+100); // +100
swmap.put("xmin",mindx-100); // -100
swmap.put("ymax",maxnb+100); // +100
swmap.put("ymin",minnb-100); // -100
swmap.put("zmax", new BigDecimal(0) ); // +100
swmap.put("zmin",maxcs+1000); // +1000
Map map =new HashMap();
map.put("code",200);
map.put("msg","成功");
map.put("swmap",swmap);
return map;
}
public static Map back(String msg) {
Map map =new HashMap();
map.put("code",500);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment