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
ec30edfe
Commit
ec30edfe
authored
Jan 22, 2026
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e4ee25ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
201 additions
and
143 deletions
+201
-143
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
+89
-32
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
+41
-41
src/main/java/com/zjsgfa/project/zt/service/impl/DjdcServiceImpl.java
+5
-2
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
+66
-68
No files found.
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
View file @
ec30edfe
This diff is collapsed.
Click to expand it.
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
ec30edfe
...
...
@@ -689,12 +689,8 @@ public class SjDjjcServiceImpl implements ISjDjjcService
@Override
public
int
deleteSjDjjcByIds
(
Long
[]
ids
)
{
int
i
=
sjDjjcMapper
.
deleteSjDjjcByIds
(
ids
);
return
i
;
}
...
...
@@ -1125,7 +1121,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
sjJygjGdsjgdcs
.
setJh
(
jh
);
List
<
SjJygjGdsjgdcs
>
sjJygjGdsjgdcsList
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
//
List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList = sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
if
(
sjDjjc1
!=
null
){
if
(
sjDjjc1
.
getJdhzb
()!=
null
&&
sjDjjc1
.
getJdzzb
()!=
null
){
CommonParam
param
=
new
CommonParam
();
...
...
@@ -1186,43 +1182,47 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
//查询复杂井
List
<
Jsqa
>
jsqaList
=
djdcService
.
getJsqaList
(
param2
);
if
(
jsqaList
.
size
()>
0
){
List
<
String
>
collect1
=
jsqaList
.
stream
().
map
(
Jsqa:
:
getJh
).
collect
(
Collectors
.
toList
());
String
[]
collect3Array
=
collect1
.
stream
().
distinct
().
limit
(
5
).
toArray
(
String
[]::
new
);
param
.
setJhs
(
collect3Array
);
List
<
Ljjw
>
ljjwList3
=
djdcService
.
getLjjwList3
(
param
);
map
.
put
(
"fzsgjhList"
,
ljjwList3
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
()));
map
.
put
(
"fzsgjhJson"
,
ljjwList3
);
}
else
{
map
.
put
(
"fzsgjhList"
,
new
ArrayList
<>());
map
.
put
(
"fzsgjhJson"
,
new
ArrayList
<>());
}
// List<Jsqa> jsqaList = djdcService.getJsqaList(param2);
// if(jsqaList.size()>0){
// List<String> collect1 = jsqaList.stream().map(Jsqa::getJh).collect(Collectors.toList());
// String[] collect3Array = collect1.stream().distinct().limit(5).toArray(String[]::new);
// param.setJhs(collect3Array);
// List<Ljjw> ljjwList3=djdcService.getLjjwList3(param);
// map.put("fzsgjhList",ljjwList3.stream().map(Ljjw::getJh).collect(Collectors.toList()));
// map.put("fzsgjhJson",ljjwList3);
// }else {
// map.put("fzsgjhList",new ArrayList<>());
// map.put("fzsgjhJson",new ArrayList<>());
// }
map
.
put
(
"fzsgjhList"
,
new
ArrayList
<>());
map
.
put
(
"fzsgjhJson"
,
new
ArrayList
<>());
map
.
put
(
"fwjhList"
,
new
ArrayList
<>());
map
.
put
(
"fwJson"
,
new
ArrayList
<>());
//附近方位井
String
[]
strings
=
ljjwList
.
stream
().
map
(
Ljjw:
:
getJh
).
toArray
(
String
[]::
new
);
CommonParam
commonParam
=
new
CommonParam
();
commonParam
.
setJhs
(
strings
);
if
(
sjJygjGdsjgdcsList
.
size
()>
0
){
commonParam
.
setFw
(
sjJygjGdsjgdcsList
.
get
(
0
).
getFw
());
List
<
DjZqsjfx
>
djZqsjfxList
=
djdcInfoMapper
.
getjskd
(
commonParam
);
List
<
DjZqsjfx
>
collect1
=
djZqsjfxList
.
stream
().
filter
(
it
->
it
.
getFw
()
!=
null
).
limit
(
10
).
collect
(
Collectors
.
toList
());
if
(
collect1
.
size
()>
0
){
String
[]
collect2Array
=
collect1
.
stream
().
map
(
DjZqsjfx:
:
getJh
).
toArray
(
String
[]::
new
);
param
.
setJhs
(
collect2Array
);
param
.
setJdhzb
(
sjDjjc1
.
getJkhzb
());
param
.
setJdzzb
(
sjDjjc1
.
getJkzzb
());
List
<
Ljjw
>
ljjwList2
=
djdcService
.
getLjjwList3
(
param
);
map
.
put
(
"fwjhList"
,
ljjwList2
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
()));
map
.
put
(
"fwJson"
,
ljjwList2
);
}
else
{
map
.
put
(
"fwjhList"
,
new
ArrayList
<>());
map
.
put
(
"fwJson"
,
new
ArrayList
<>());
}
}
else
{
map
.
put
(
"fwjhList"
,
new
ArrayList
<>());
map
.
put
(
"fwJson"
,
new
ArrayList
<>());
}
//
String[] strings = ljjwList.stream().map(Ljjw::getJh).toArray(String[]::new);
//
CommonParam commonParam = new CommonParam();
//
commonParam.setJhs(strings);
//
if(sjJygjGdsjgdcsList.size()>0){
//
commonParam.setFw(sjJygjGdsjgdcsList.get(0).getFw());
//
List<DjZqsjfx> djZqsjfxList = djdcInfoMapper.getjskd(commonParam);
//
List<DjZqsjfx> collect1 = djZqsjfxList.stream().filter(it -> it.getFw() != null).limit(10).collect(Collectors.toList());
//
if(collect1.size()>0){
//
String[] collect2Array = collect1.stream().map(DjZqsjfx::getJh).toArray(String[]::new);
//
param.setJhs(collect2Array);
//
param.setJdhzb(sjDjjc1.getJkhzb());
//
param.setJdzzb(sjDjjc1.getJkzzb());
//
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
//
map.put("fwjhList",ljjwList2.stream().map(Ljjw::getJh).collect(Collectors.toList()));
//
map.put("fwJson",ljjwList2);
//
}else {
//
map.put("fwjhList",new ArrayList<>());
//
map.put("fwJson",new ArrayList<>());
//
}
//
}else {
//
map.put("fwjhList",new ArrayList<>());
//
map.put("fwJson",new ArrayList<>());
//
}
return
AjaxResult
.
success
(
map
);
...
...
src/main/java/com/zjsgfa/project/zt/service/impl/DjdcServiceImpl.java
View file @
ec30edfe
...
...
@@ -407,8 +407,11 @@ public class DjdcServiceImpl implements DjdcService {
item
.
setZjsczq
(
Double
.
parseDouble
(
df
.
format
(
item
.
getZjzq
()-
item
.
getZjycsl
())));
//钻进速率
if
(
item
.
getZjzq
()>
0
){
Double
zjsl
=
item
.
getJc
()/
item
.
getZjzq
();
item
.
setZjsl
(
Double
.
parseDouble
(
df
.
format
(
zjsl
)));
if
(
item
.
getJc
()!=
null
&&
item
.
getZjzq
()!=
null
){
Double
zjsl
=
item
.
getJc
()/
item
.
getZjzq
();
item
.
setZjsl
(
Double
.
parseDouble
(
df
.
format
(
zjsl
)));
}
}
if
(
zjycsl
>
0
){
//钻进异常描述
...
...
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
View file @
ec30edfe
...
...
@@ -254,7 +254,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
where
jsdb.tgcc not like '%导管%'
where
(jsdb.tgcc not like '%导管%' and jsdb.tgcc not like '%其它%')
order by jh) c on a.jh=c.jh
left join (
SELECT
...
...
@@ -438,7 +438,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
on a.jh = kc.jh
...
...
@@ -528,7 +528,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
on a.jh = kc.jh
...
...
@@ -627,14 +627,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
on a.jh = kc.jh
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb}
<
#{jl}
AND a.jdzzb - #{jdzzb}
<
#{jl}
<if
test=
"wjsjks!=null and wjsjks!=''"
>
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
...
...
@@ -670,8 +668,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
order by WJRQ desc NULLS LAST) where ROWNUM
<
= 100
order by WJRQ desc NULLS LAST) where
jkjl
<
=#{jl} and
ROWNUM
<
= 100
</select>
<!-- and a.jdhzb - #{jdhzb} < #{jl}-->
<!-- AND a.jdzzb - #{jdzzb} < #{jl}-->
<!-- select ss.kc,ss.ztxh,ss.cc,-->
<!-- count( *) as ztsl,-->
<!-- round( sum(case when ss.kc=1 and tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,-->
...
...
@@ -723,7 +723,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from JSDB
where
1=1
and tgcc not like '%导管%'
and tgcc not like '%导管%'
and tgcc not like '%其它%'
<if
test=
"qk != null and qk !=''"
>
and jh in(
select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2
...
...
@@ -797,14 +797,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
where jsdb.tgcc like '%导管%'
where jsdb.tgcc like '%导管%'
and jsdb.tgcc not like '%其它%'
UNION all
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 ksjs
FROM JSDB jsdb
where jsdb.tgcc not like '%导管%'
where jsdb.tgcc not like '%导管%'
and jsdb.tgcc not like '%其它%'
order by jh)) c on a.jh=c.jh where kc='1'
<if
test=
"jh!=null and jh!=''"
>
and a. jh =#{jh}
...
...
@@ -1146,6 +1146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM max_value_cte, guantao_value_cte
</select>
<select
id=
"getLjjwList2"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
select * from (
SELECT a.*, round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl
FROM JSBA a
...
...
@@ -1153,13 +1154,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jkhzb - #{jkhzb}
<
#{jl}
AND a.jkzzb - #{jkzzb}
<
#{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if
test=
"qk!=null and qk!=''"
>
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
</if>
order by jkjl asc
order by jkjl asc
)where 1=1 and jkjl
<
= #{jl}
</select>
<select
id=
"getJswaSum"
resultType=
"com.zjsgfa.project.zt.domain.vo.JswaVo"
>
select a.*,(sgsum+zztgsum+zrtgsum+xlsum+fzqksum) zhj from (SELECT SUM(CASE WHEN sg > 0 THEN 1 ELSE 0 END) AS sg,
...
...
@@ -1184,68 +1183,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) a
</select>
<select
id=
"getLjjwList3"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
select * from (
SELECT a.jh,
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs,
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
round(power(power(a.jdhzb - ${jdhzb}
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs,
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
round(power(power(a.jdhzb - ${jdhzb}
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
FROM JSBA a
left join jsaa b
on a.jh = b.jh
left join jsaa b
on a.jh = b.jh
left join jsfm fm
on a.jh = fm.jh
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管
%'
group by jh) kc
on a.jh = kc.jh
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%' and tgcc not like '%其它
%'
group by jh) kc
on a.jh = kc.jh
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb}
<
#{jl}
AND a.jdzzb - #{jdzzb}
<
#{jl}
and a.jh not like '%侧%'
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if
test=
"jhs!=null"
>
and a.jh in
<foreach
item=
"jh"
collection=
"jhs"
open=
"("
separator=
","
close=
")"
>
#{jh}
</foreach>
</if>
order by jkjl asc
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if
test=
"jhs!=null"
>
and a.jh in
<foreach
item=
"jh"
collection=
"jhs"
open=
"("
separator=
","
close=
")"
>
#{jh}
</foreach>
</if>
order by jkjl asc
) where jkjl
<
= #{jl}
</select>
<select
id=
"getJhKcList"
resultType=
"com.zjsgfa.project.zt.domain.Djjc"
>
...
...
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