Commit c18e41b9 by jiang'yun

修改

parent 52706ea7
...@@ -132,6 +132,29 @@ public class DjdcController { ...@@ -132,6 +132,29 @@ public class DjdcController {
String md = listToMarkdownTable(ljjwList); String md = listToMarkdownTable(ljjwList);
return md; return md;
// return AjaxResult.success("",md,map); // return AjaxResult.success("",md,map);
case "getLjjwList2":
//获取邻近井位
map.put("jh","井号");
map.put("jx","井型");
map.put("jb","井别");
map.put("wjjs","井深");
map.put("wjczjs","垂深");
map.put("wzcw","完钻层位");
map.put("kc","总开次");
map.put("zjzq","钻井周期");
map.put("wjzq","完井周期");
map.put("jkhzb","井口横坐标");
map.put("jkzzb","井口纵坐标");
map.put("jkhjl","井口横距离");
map.put("jkzjl","井口纵距离");
map.put("jdhzb","井底横坐标");
map.put("jdzzb","井底纵坐标");
map.put("jkjl","井口距离");
map.put("jdjl","井底距离");
map.put("jdzjl","井底纵距离");
map.put("jdhjl","井底横距离");
List<Ljjw> ljjwList2= djdcService.getLjjwList(param);
return AjaxResult.success(ljjwList2);
case "getJsqaList": case "getJsqaList":
//获取复杂情况 //获取复杂情况
map.put("jh","井号"); map.put("jh","井号");
......
...@@ -1417,15 +1417,15 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -1417,15 +1417,15 @@ public class DjdcServiceImpl implements DjdcService {
//查询钻具组合 //查询钻具组合
LjZjzhfx ljZjzhfx =new LjZjzhfx(); // LjZjzhfx ljZjzhfx =new LjZjzhfx();
ljZjzhfx.setJh(item.getJh()); // ljZjzhfx.setJh(item.getJh());
ljZjzhfx.setKc(item.getKc()); // ljZjzhfx.setKc(item.getKc());
List<LjZjzhfx> zjzhfxList = ljZjzhfxMapper.selectLjZjzhfxList(ljZjzhfx); // List<LjZjzhfx> zjzhfxList = ljZjzhfxMapper.selectLjZjzhfxList(ljZjzhfx);
if(zjzhfxList.size()>0){ // if(zjzhfxList.size()>0){
LjZjzhfx ljZjzhfx1 = zjzhfxList.get(0); // LjZjzhfx ljZjzhfx1 = zjzhfxList.get(0);
item.setTsgj(ljZjzhfx1.getTsgj()); // item.setTsgj(ljZjzhfx1.getTsgj());
item.setZjzhmx(ljZjzhfx1.getZjzhmx()); // item.setZjzhmx(ljZjzhfx1.getZjzhmx());
} // }
//查询进尺和时效 //查询进尺和时效
DjZjzhfx djZjzhfx=djdcInfoMapper.getJshaJc(item.getJh(),item.getKsjs(),item.getJs()); DjZjzhfx djZjzhfx=djdcInfoMapper.getJshaJc(item.getJh(),item.getKsjs(),item.getJs());
...@@ -1708,11 +1708,10 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -1708,11 +1708,10 @@ public class DjdcServiceImpl implements DjdcService {
if(ljZtzhdf.getZhdf()>0){ if(ljZtzhdf.getZhdf()>0){
ljZtzhdfList.add(ljZtzhdf); ljZtzhdfList.add(ljZtzhdf);
} }
} }
} }
List<LjZtdfzh> ljZtdfzhList= new ArrayList<>();
//去重 //去重
if(ljZtzhdfList.size()>0){ if(ljZtzhdfList.size()>0){
ljZtzhdfList=ljZtzhdfList.stream().distinct().collect(Collectors.toList()); ljZtzhdfList=ljZtzhdfList.stream().distinct().collect(Collectors.toList());
...@@ -1728,6 +1727,7 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -1728,6 +1727,7 @@ public class DjdcServiceImpl implements DjdcService {
ljZtdfzh.setJsdf(Double.parseDouble(df.format(item.getJsdf()+(item.getJcdf()*0.25)))); ljZtdfzh.setJsdf(Double.parseDouble(df.format(item.getJsdf()+(item.getJcdf()*0.25))));
ljZtdfzh.setZhdf(Double.parseDouble(df.format((item.getJcdf()*0.5)+(item.getJcdf()*5)))); ljZtdfzh.setZhdf(Double.parseDouble(df.format((item.getJcdf()*0.5)+(item.getJcdf()*5))));
ljZtdfzhMapper.insertLjZtdfzh(ljZtdfzh); ljZtdfzhMapper.insertLjZtdfzh(ljZtdfzh);
ljZtdfzhList.add(ljZtdfzh);
} }
} }
...@@ -1735,9 +1735,12 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -1735,9 +1735,12 @@ public class DjdcServiceImpl implements DjdcService {
int i=ljSzfxjgMapper.batchLjSzfxjg(ljSzfxjgList); int i=ljSzfxjgMapper.batchLjSzfxjg(ljSzfxjgList);
} }
//钻头综合得分
map.put("ztzhdf",ljZtzhdfList); map.put("ztzhdf",ljZtzhdfList);
//实钻分析结果
map.put("szfxjg",ljSzfxjgList); map.put("szfxjg",ljSzfxjgList);
//钻头最终得分
map.put("zjzhdf",ljZtdfzhList);
return map ; return map ;
} }
...@@ -1833,9 +1836,18 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -1833,9 +1836,18 @@ public class DjdcServiceImpl implements DjdcService {
// 遍历数据数组 // 遍历数据数组
for (JsonElement element : dataArray) { for (JsonElement element : dataArray) {
JsonObject it = element.getAsJsonObject(); JsonObject it = element.getAsJsonObject();
String zjmc = it.get("zjmc").getAsString(); String zjmc="";
String xh = it.get("xh").getAsString(); System.out.println(it.get("zjmc"));
String cd = it.get("cd").getAsString(); if(it.get("zjmc")!=null){
zjmc=it.get("zjmc")+"";
}
String xh ="";
System.out.println(it.get("xh"));
if(it.get("xh")!=null){
xh = it.get("xh")+"";
}
// String
// String cd = it.get("cd").getAsString();
//判断钻具组合模型 //判断钻具组合模型
if (zjmc.contains("单弯螺杆") || zjmc.contains("无磁钻铤") || zjmc.contains("加重钻杆") || zjmc.contains("钻杆")) { if (zjmc.contains("单弯螺杆") || zjmc.contains("无磁钻铤") || zjmc.contains("加重钻杆") || zjmc.contains("钻杆")) {
......
...@@ -291,24 +291,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -291,24 +291,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getZjzhfxList" resultType="com.ruoyi.project.zt.domain.DjZjzhfx"> <select id="getZjzhfxList" resultType="com.ruoyi.project.zt.domain.DjZjzhfx">
select a.jh, select a.jh,
c.kc, c.kc,
c.jd, c.jd,
ksjs, ksjs,
c.JS, c.JS,
d.ZJZH,d.ZJJD d.ZJZH,d.ZJJD,zj.zjzhmx,zj.tsgj
from JSBA a from JSBA a
left join jsaa b on a.jh = b.jh left join jsaa b on a.jh = b.jh
left join (SELECT jh, left join (SELECT jh,
kc, kc,
(CASE WHEN kc = 1 THEN 0 ELSE LAG_JS END) ksjs, (CASE WHEN kc = 1 THEN 0 ELSE LAG_JS END) ksjs,
js, js,
CONCAT(CASE WHEN kc = 1 THEN '0-' ELSE LAG_JS || '-' END, JS) AS jd CONCAT(CASE WHEN kc = 1 THEN '0-' ELSE LAG_JS || '-' END, JS) AS jd
FROM (SELECT jh, FROM (SELECT jh,
ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc, ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
JS, JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
FROM JSDB) t) c on a.jh = c.jh FROM JSDB) t) c on a.jh = c.jh
left join JSFA d on a.JH=d.JH and c.kc=d.XH left join JSFA d on a.JH=d.JH and c.kc=d.XH
left join lj_zjzhfx zj on a.JH=zj.JH and c.kc=zj.kc
where 1 = 1 where 1 = 1
<if test="jdhzb!=null"> <if test="jdhzb!=null">
and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl} and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl}
......
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