Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjsgfa_mysql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
zjsgfa_mysql
Commits
c18e41b9
Commit
c18e41b9
authored
Jul 04, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
52706ea7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
32 deletions
+68
-32
src/main/java/com/ruoyi/project/zt/controller/DjdcController.java
+23
-0
src/main/java/com/ruoyi/project/zt/service/impl/DjdcServiceImpl.java
+27
-15
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
+18
-17
No files found.
src/main/java/com/ruoyi/project/zt/controller/DjdcController.java
View file @
c18e41b9
...
...
@@ -132,6 +132,29 @@ public class DjdcController {
String
md
=
listToMarkdownTable
(
ljjwList
);
return
md
;
// 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"
:
//获取复杂情况
map
.
put
(
"jh"
,
"井号"
);
...
...
src/main/java/com/ruoyi/project/zt/service/impl/DjdcServiceImpl.java
View file @
c18e41b9
...
...
@@ -1417,15 +1417,15 @@ public class DjdcServiceImpl implements DjdcService {
//查询钻具组合
LjZjzhfx
ljZjzhfx
=
new
LjZjzhfx
();
ljZjzhfx
.
setJh
(
item
.
getJh
());
ljZjzhfx
.
setKc
(
item
.
getKc
());
List
<
LjZjzhfx
>
zjzhfxList
=
ljZjzhfxMapper
.
selectLjZjzhfxList
(
ljZjzhfx
);
if
(
zjzhfxList
.
size
()>
0
){
LjZjzhfx
ljZjzhfx1
=
zjzhfxList
.
get
(
0
);
item
.
setTsgj
(
ljZjzhfx1
.
getTsgj
());
item
.
setZjzhmx
(
ljZjzhfx1
.
getZjzhmx
());
}
//
LjZjzhfx ljZjzhfx =new LjZjzhfx();
//
ljZjzhfx.setJh(item.getJh());
//
ljZjzhfx.setKc(item.getKc());
//
List<LjZjzhfx> zjzhfxList = ljZjzhfxMapper.selectLjZjzhfxList(ljZjzhfx);
//
if(zjzhfxList.size()>0){
//
LjZjzhfx ljZjzhfx1 = zjzhfxList.get(0);
//
item.setTsgj(ljZjzhfx1.getTsgj());
//
item.setZjzhmx(ljZjzhfx1.getZjzhmx());
//
}
//查询进尺和时效
DjZjzhfx
djZjzhfx
=
djdcInfoMapper
.
getJshaJc
(
item
.
getJh
(),
item
.
getKsjs
(),
item
.
getJs
());
...
...
@@ -1708,11 +1708,10 @@ public class DjdcServiceImpl implements DjdcService {
if
(
ljZtzhdf
.
getZhdf
()>
0
){
ljZtzhdfList
.
add
(
ljZtzhdf
);
}
}
}
List
<
LjZtdfzh
>
ljZtdfzhList
=
new
ArrayList
<>();
//去重
if
(
ljZtzhdfList
.
size
()>
0
){
ljZtzhdfList
=
ljZtzhdfList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1728,6 +1727,7 @@ public class DjdcServiceImpl implements DjdcService {
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
))));
ljZtdfzhMapper
.
insertLjZtdfzh
(
ljZtdfzh
);
ljZtdfzhList
.
add
(
ljZtdfzh
);
}
}
...
...
@@ -1735,9 +1735,12 @@ public class DjdcServiceImpl implements DjdcService {
int
i
=
ljSzfxjgMapper
.
batchLjSzfxjg
(
ljSzfxjgList
);
}
//钻头综合得分
map
.
put
(
"ztzhdf"
,
ljZtzhdfList
);
//实钻分析结果
map
.
put
(
"szfxjg"
,
ljSzfxjgList
);
//钻头最终得分
map
.
put
(
"zjzhdf"
,
ljZtdfzhList
);
return
map
;
}
...
...
@@ -1833,9 +1836,18 @@ public class DjdcServiceImpl implements DjdcService {
// 遍历数据数组
for
(
JsonElement
element
:
dataArray
)
{
JsonObject
it
=
element
.
getAsJsonObject
();
String
zjmc
=
it
.
get
(
"zjmc"
).
getAsString
();
String
xh
=
it
.
get
(
"xh"
).
getAsString
();
String
cd
=
it
.
get
(
"cd"
).
getAsString
();
String
zjmc
=
""
;
System
.
out
.
println
(
it
.
get
(
"zjmc"
));
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
(
"钻杆"
))
{
...
...
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
View file @
c18e41b9
...
...
@@ -291,24 +291,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"getZjzhfxList"
resultType=
"com.ruoyi.project.zt.domain.DjZjzhfx"
>
select a.jh,
c.kc,
c.jd,
ksjs,
c.JS,
d.ZJZH,d.ZJJD
c.kc,
c.jd,
ksjs,
c.JS,
d.ZJZH,d.ZJJD,zj.zjzhmx,zj.tsgj
from JSBA a
left join jsaa b on a.jh = b.jh
left join (SELECT jh,
kc,
(CASE WHEN kc = 1 THEN 0 ELSE LAG_JS END) ksjs,
js,
CONCAT(CASE WHEN kc = 1 THEN '0-' ELSE LAG_JS || '-' END, JS) AS jd
FROM (SELECT jh,
ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
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 jsaa b on a.jh = b.jh
left join (SELECT jh,
kc,
(CASE WHEN kc = 1 THEN 0 ELSE LAG_JS END) ksjs,
js,
CONCAT(CASE WHEN kc = 1 THEN '0-' ELSE LAG_JS || '-' END, JS) AS jd
FROM (SELECT jh,
ROW_NUMBER() OVER (PARTITION BY jh ORDER BY js) AS kc,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
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 lj_zjzhfx zj on a.JH=zj.JH and c.kc=zj.kc
where 1 = 1
<if
test=
"jdhzb!=null"
>
and ABS(#{jdhzb} - a.jdhzb)
<
#{jl}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment