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
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
...
@@ -410,6 +410,7 @@ public class SjDjjcController extends BaseController
...
@@ -410,6 +410,7 @@ public class SjDjjcController extends BaseController
SjDjjc
sjDjjc1
=
sjDjjcService
.
selectSjDjjcById
(
sjDjjc
.
getId
());
SjDjjc
sjDjjc1
=
sjDjjcService
.
selectSjDjjcById
(
sjDjjc
.
getId
());
XSSFWorkbook
workbook
=
null
;
XSSFWorkbook
workbook
=
null
;
try
{
try
{
//装载流
//装载流
workbook
=
new
XSSFWorkbook
(
file
.
getInputStream
());
workbook
=
new
XSSFWorkbook
(
file
.
getInputStream
());
...
@@ -418,6 +419,12 @@ public class SjDjjcController extends BaseController
...
@@ -418,6 +419,12 @@ public class SjDjjcController extends BaseController
int
lastRowNum
=
sheet
.
getLastRowNum
();
int
lastRowNum
=
sheet
.
getLastRowNum
();
String
jh
=
sjDjjc
.
getJh
();
String
jh
=
sjDjjc
.
getJh
();
Long
id
=
sjDjjc
.
getId
();
Long
id
=
sjDjjc
.
getId
();
Double
jkhzbB
=
0.0
;
Double
jkzzbB
=
0.0
;
Double
jdhzbB
=
0.0
;
Double
jdzzbB
=
0.0
;
// 通过循环,逐行取出表中每行数据
// 通过循环,逐行取出表中每行数据
for
(
int
i
=
0
;
i
<=
lastRowNum
;
i
++){
for
(
int
i
=
0
;
i
<=
lastRowNum
;
i
++){
//跳过第一行
//跳过第一行
...
@@ -457,18 +464,20 @@ public class SjDjjcController extends BaseController
...
@@ -457,18 +464,20 @@ public class SjDjjcController extends BaseController
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井口横坐标不能为空"
);
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井口横坐标不能为空"
);
}
}
info
.
setJkhzb
(
Double
.
parseDouble
(
jkhzb
));
info
.
setJkhzb
(
Double
.
parseDouble
(
jkhzb
));
jkhzbB
=
jkhzbB
+
Double
.
parseDouble
(
jkhzb
);
String
jkzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
));
String
jkzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
));
if
(
StringUtils
.
isEmpty
(
jkzzb
)){
if
(
StringUtils
.
isEmpty
(
jkzzb
)){
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井口纵坐标不能为空"
);
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井口纵坐标不能为空"
);
}
}
info
.
setJkzzb
(
Double
.
parseDouble
(
jkzzb
));
info
.
setJkzzb
(
Double
.
parseDouble
(
jkzzb
));
jkzzbB
=
jkzzbB
+
Double
.
parseDouble
(
jkzzb
);
String
jdhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
6
));
String
jdhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
6
));
if
(
StringUtils
.
isEmpty
(
jdhzb
)){
if
(
StringUtils
.
isEmpty
(
jdhzb
)){
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井底横坐标不能为空"
);
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井底横坐标不能为空"
);
}
}
info
.
setJdhzb
(
Double
.
parseDouble
(
jdhzb
));
info
.
setJdhzb
(
Double
.
parseDouble
(
jdhzb
));
jdhzbB
=
jdhzbB
+
Double
.
parseDouble
(
jdhzb
);
String
jdzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
7
));
String
jdzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
7
));
...
@@ -476,6 +485,7 @@ public class SjDjjcController extends BaseController
...
@@ -476,6 +485,7 @@ public class SjDjjcController extends BaseController
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井底纵坐标不能为空"
);
return
AjaxResult
.
error
(
"井基础信息中第"
+(
i
+
1
)+
"行井底纵坐标不能为空"
);
}
}
info
.
setJdzzb
(
Double
.
parseDouble
(
jdzzb
));
info
.
setJdzzb
(
Double
.
parseDouble
(
jdzzb
));
jdzzbB
=
jdzzbB
+
Double
.
parseDouble
(
jdzzb
);
String
gzwz
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
8
));
String
gzwz
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
8
));
info
.
setGzwz
(
gzwz
);
info
.
setGzwz
(
gzwz
);
...
@@ -687,28 +697,40 @@ public class SjDjjcController extends BaseController
...
@@ -687,28 +697,40 @@ public class SjDjjcController extends BaseController
String
jkhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
3
));
String
jkhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
3
));
if
(
StringUtils
.
isEmpty
(
jkhzb
)){
if
(
StringUtils
.
isEmpty
(
jkhzb
)){
return
AjaxResult
.
error
(
"井眼轨迹表第"
+(
1
)+
"行井口横坐标不能为空"
);
info
.
setJkhzb
(
jkhzbB
);
// return AjaxResult.error("井眼轨迹表第"+(1)+"行井口横坐标不能为空");
}
else
{
info
.
setJkhzb
(
Double
.
parseDouble
(
jkhzb
));
}
}
info
.
setJkhzb
(
Double
.
parseDouble
(
jkhzb
));
String
jkzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
));
String
jkzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
));
if
(
StringUtils
.
isEmpty
(
jkzzb
)){
if
(
StringUtils
.
isEmpty
(
jkzzb
)){
return
AjaxResult
.
error
(
"井眼轨迹表第"
+(
1
)+
"行井口纵坐标不能为空"
);
info
.
setJkzzb
(
jkzzbB
);
// return AjaxResult.error("井眼轨迹表第"+(1)+"行井口纵坐标不能为空");
}
else
{
info
.
setJkzzb
(
Double
.
parseDouble
(
jkzzb
));
}
}
info
.
setJkzzb
(
Double
.
parseDouble
(
jkzzb
));
String
bdhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
7
));
String
bdhzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
7
));
if
(
StringUtils
.
isEmpty
(
bdhzb
)){
if
(
StringUtils
.
isEmpty
(
bdhzb
)){
return
AjaxResult
.
error
(
"井眼轨迹表第"
+(
1
)+
"行靶点横坐标不能为空"
);
info
.
setBdhzb
(
jdhzbB
);
// return AjaxResult.error("井眼轨迹表第"+(1)+"行靶点横坐标不能为空");
}
else
{
info
.
setBdhzb
(
Double
.
parseDouble
(
bdhzb
));
}
}
info
.
setBdhzb
(
Double
.
parseDouble
(
bdhzb
));
String
bdzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
9
));
String
bdzzb
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
9
));
if
(
StringUtils
.
isEmpty
(
bdzzb
)){
if
(
StringUtils
.
isEmpty
(
bdzzb
)){
return
AjaxResult
.
error
(
"井眼轨迹表第"
+(
1
)+
"行靶点纵坐标不能为空"
);
info
.
setBdzzb
(
jdzzbB
);
// return AjaxResult.error("井眼轨迹表第"+(1)+"行靶点纵坐标不能为空");
}
else
{
info
.
setBdzzb
(
Double
.
parseDouble
(
bdzzb
));
}
}
info
.
setBdzzb
(
Double
.
parseDouble
(
bdzzb
));
row
=
sheet
.
getRow
(
1
);
row
=
sheet
.
getRow
(
1
);
String
cs
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
1
));
String
cs
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
1
));
...
@@ -2313,9 +2335,20 @@ public class SjDjjcController extends BaseController
...
@@ -2313,9 +2335,20 @@ public class SjDjjcController extends BaseController
dataModel
.
put
(
"jb"
,
sjDjjc
.
getJb
());
dataModel
.
put
(
"jb"
,
sjDjjc
.
getJb
());
dataModel
.
put
(
"jx"
,
sjDjjc
.
getJx
());
dataModel
.
put
(
"jx"
,
sjDjjc
.
getJx
());
DecimalFormat
df
=
new
DecimalFormat
(
"0"
);
// 或使用"#,###"等格式
DecimalFormat
df
=
new
DecimalFormat
(
"0"
);
// 或使用"#,###"等格式
String
str
=
df
.
format
(
sjDjjc
.
getJkhzb
());
if
(
sjDjjc
.
getJkhzb
()!=
null
){
dataModel
.
put
(
"jkhzb"
,
df
.
format
(
sjDjjc
.
getJkhzb
()));
dataModel
.
put
(
"jkhzb"
,
df
.
format
(
sjDjjc
.
getJkhzb
()));
dataModel
.
put
(
"jkzzb"
,
df
.
format
(
sjDjjc
.
getJkzzb
()));
}
else
{
dataModel
.
put
(
"jkhzb"
,
""
);
}
if
(
sjDjjc
.
getJkzzb
()!=
null
){
dataModel
.
put
(
"jkzzb"
,
df
.
format
(
sjDjjc
.
getJkzzb
()));
}
else
{
dataModel
.
put
(
"jkzzb"
,
""
);
}
dataModel
.
put
(
"gzwz"
,
sjDjjc
.
getGzwz
());
dataModel
.
put
(
"gzwz"
,
sjDjjc
.
getGzwz
());
dataModel
.
put
(
"wzcw"
,
sjDjjc
.
getWzcw
());
dataModel
.
put
(
"wzcw"
,
sjDjjc
.
getWzcw
());
dataModel
.
put
(
"ztmd"
,
sjDjjc
.
getZtmd
());
dataModel
.
put
(
"ztmd"
,
sjDjjc
.
getZtmd
());
...
@@ -2375,7 +2408,15 @@ public class SjDjjcController extends BaseController
...
@@ -2375,7 +2408,15 @@ public class SjDjjcController extends BaseController
SjZjyFdxnb
sjZjyFdxnb
=
new
SjZjyFdxnb
();
SjZjyFdxnb
sjZjyFdxnb
=
new
SjZjyFdxnb
();
sjZjyFdxnb
.
setJh
(
jh
);
sjZjyFdxnb
.
setJh
(
jh
);
List
<
SjZjyFdxnb
>
sjZjyFdxnbList
=
sjZjyFdxnbMapper
.
selectSjZjyFdxnbList
(
sjZjyFdxnb
);
List
<
SjZjyFdxnb
>
sjZjyFdxnbList
=
sjZjyFdxnbMapper
.
selectSjZjyFdxnbList
(
sjZjyFdxnb
);
dataModel
.
put
(
"sjZjyFdxnbList"
,
sjZjyFdxnbList
);
if
(
sjZjyFdxnbList
.
size
()>
0
){
dataModel
.
put
(
"sjZjyFdxnbList"
,
sjZjyFdxnbList
);
}
else
{
sjZjyFdxnbList
.
add
(
new
SjZjyFdxnb
());
dataModel
.
put
(
"sjZjyFdxnbList"
,
sjZjyFdxnbList
);
}
//套管柱
//套管柱
SjTgTgz
sjTgTgz
=
new
SjTgTgz
();
SjTgTgz
sjTgTgz
=
new
SjTgTgz
();
sjTgTgz
.
setJh
(
jh
);
sjTgTgz
.
setJh
(
jh
);
...
@@ -2708,36 +2749,45 @@ public class SjDjjcController extends BaseController
...
@@ -2708,36 +2749,45 @@ public class SjDjjcController extends BaseController
sjFdsgcs
.
setJh
(
jh
);
sjFdsgcs
.
setJh
(
jh
);
sjFdsgcs
.
setKc
(
kc
);
sjFdsgcs
.
setKc
(
kc
);
List
<
SjFdsgcs
>
sjFdsgcsList
=
sjFdsgcsMapper
.
selectSjFdsgcsList
(
sjFdsgcs
);
List
<
SjFdsgcs
>
sjFdsgcsList
=
sjFdsgcsMapper
.
selectSjFdsgcsList
(
sjFdsgcs
);
SjFdsgcs
sjFdsgcs1
=
sjFdsgcsList
.
get
(
0
);
SjFdsgcs
sjFdsgcs1
=
new
SjFdsgcs
();
if
(
sjFdsgcsList
.
size
()>
0
){
sjFdsgcs1
=
sjFdsgcsList
.
get
(
0
);
}
map
.
put
(
"tzqk"
,
sjFdsgcs1
.
getTzqk
());
map
.
put
(
"tzqk"
,
sjFdsgcs1
.
getTzqk
());
map
.
put
(
"jdqk"
,
sjFdsgcs1
.
getJdqk
());
map
.
put
(
"jdqk"
,
sjFdsgcs1
.
getJdqk
());
map
.
put
(
"gjfx"
,
sjFdsgcs1
.
getGjfx
());
map
.
put
(
"gjfx"
,
sjFdsgcs1
.
getGjfx
());
map
.
put
(
"gjyh"
,
sjFdsgcs1
.
getGjyh
());
map
.
put
(
"gjyh"
,
sjFdsgcs1
.
getGjyh
());
map
.
put
(
"dcyl"
,
sjFdsgcs1
.
getDcyl
());
map
.
put
(
"dcyl"
,
sjFdsgcs1
.
getDcyl
());
SjFdsgcsDcyxt
sjFdsgcsDcyxt
=
new
SjFdsgcsDcyxt
();
SjFdsgcsDcyxt
sjFdsgcsDcyxt
=
new
SjFdsgcsDcyxt
();
sjFdsgcsDcyxt
.
setZbid
(
sjFdsgcs1
.
getId
().
toString
());
if
(
sjFdsgcs1
.
getId
()!=
null
){
List
<
SjFdsgcsDcyxt
>
sjFdsgcsDcyxts
=
sjFdsgcsDcyxtMapper
.
selectSjFdsgcsDcyxtList
(
sjFdsgcsDcyxt
);
sjFdsgcsDcyxt
.
setZbid
(
sjFdsgcs1
.
getId
().
toString
());
if
(
sjFdsgcsDcyxts
.
size
()>
0
){
List
<
SjFdsgcsDcyxt
>
sjFdsgcsDcyxts
=
sjFdsgcsDcyxtMapper
.
selectSjFdsgcsDcyxtList
(
sjFdsgcsDcyxt
);
SjFdsgcsDcyxt
sjFdsgcsDcyxt1
=
sjFdsgcsDcyxts
.
get
(
0
);
if
(
sjFdsgcsDcyxts
.
size
()>
0
){
if
(
sjFdsgcsDcyxt1
!=
null
){
SjFdsgcsDcyxt
sjFdsgcsDcyxt1
=
sjFdsgcsDcyxts
.
get
(
0
);
String
base64Prefix
=
"data:image/png;base64,"
;
if
(
sjFdsgcsDcyxt1
!=
null
){
if
(!
sjFdsgcsDcyxt1
.
getJsjgt
().
startsWith
(
base64Prefix
))
{
String
base64Prefix
=
"data:image/png;base64,"
;
map
.
put
(
"dcylt"
,
null
);
if
(!
sjFdsgcsDcyxt1
.
getJsjgt
().
startsWith
(
base64Prefix
))
{
map
.
put
(
"dcylt"
,
null
);
}
else
{
InputStream
pngStream
=
ImageProcessUtil
.
convertBase64ToPngInputStream
(
sjFdsgcsDcyxt1
.
getJsjgt
());
PictureRenderData
image
=
Pictures
.
ofStream
(
pngStream
,
PictureType
.
PNG
)
.
size
(
400
,
450
)
.
create
();
map
.
put
(
"dcylt"
,
image
);
}
}
else
{
}
else
{
InputStream
pngStream
=
ImageProcessUtil
.
convertBase64ToPngInputStream
(
sjFdsgcsDcyxt1
.
getJsjgt
());
map
.
put
(
"dcylt"
,
null
);
PictureRenderData
image
=
Pictures
.
ofStream
(
pngStream
,
PictureType
.
PNG
)
.
size
(
400
,
450
)
.
create
();
map
.
put
(
"dcylt"
,
image
);
}
}
}
else
{
}
else
{
map
.
put
(
"dcylt"
,
null
);
map
.
put
(
"dcylt"
,
null
);
}
}
}
else
{
}
else
{
map
.
put
(
"dcylt"
,
null
);
map
.
put
(
"dcylt"
,
null
);
}
}
map
.
put
(
"zyfx"
,
sjFdsgcs1
.
getZyfx
());
map
.
put
(
"zyfx"
,
sjFdsgcs1
.
getZyfx
());
map
.
put
(
"fxgkcs"
,
sjFdsgcs1
.
getFxgkcs
());
map
.
put
(
"fxgkcs"
,
sjFdsgcs1
.
getFxgkcs
());
map
.
put
(
"zjzh"
,
sjFdsgcs1
.
getZjzh
());
map
.
put
(
"zjzh"
,
sjFdsgcs1
.
getZjzh
());
...
@@ -2795,10 +2845,17 @@ public class SjDjjcController extends BaseController
...
@@ -2795,10 +2845,17 @@ public class SjDjjcController extends BaseController
sjZjcsxx
.
setJh
(
jh
);
sjZjcsxx
.
setJh
(
jh
);
sjZjcsxx
.
setKc
(
kc
);
sjZjcsxx
.
setKc
(
kc
);
List
<
SjZjcsxx
>
sjZjcsxxList
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZjcsxx
);
List
<
SjZjcsxx
>
sjZjcsxxList
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZjcsxx
);
SjZjcsxx
sjZjcsxx1
=
sjZjcsxxList
.
get
(
0
);
if
(
sjZjcsxxList
.
size
()>
0
){
map
.
put
(
"zjpl"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjplsx
())?
sjZjcsxx1
.
getZjpl
()+
"-"
+
sjZjcsxx1
.
getZjplsx
():
sjZjcsxx1
.
getZjpl
()
);
SjZjcsxx
sjZjcsxx1
=
sjZjcsxxList
.
get
(
0
);
map
.
put
(
"zjzy"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjzysx
())?
sjZjcsxx1
.
getZjzy
()+
"-"
+
sjZjcsxx1
.
getZjzysx
():
sjZjcsxx1
.
getZjzy
());
map
.
put
(
"zjpl"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjplsx
())?
sjZjcsxx1
.
getZjpl
()+
"-"
+
sjZjcsxx1
.
getZjplsx
():
sjZjcsxx1
.
getZjpl
()
);
map
.
put
(
"zjzs"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjzssx
())?
sjZjcsxx1
.
getZjzs
()+
"-"
+
sjZjcsxx1
.
getZjzssx
():
sjZjcsxx1
.
getZjzs
());
map
.
put
(
"zjzy"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjzysx
())?
sjZjcsxx1
.
getZjzy
()+
"-"
+
sjZjcsxx1
.
getZjzysx
():
sjZjcsxx1
.
getZjzy
());
map
.
put
(
"zjzs"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjzssx
())?
sjZjcsxx1
.
getZjzs
()+
"-"
+
sjZjcsxx1
.
getZjzssx
():
sjZjcsxx1
.
getZjzs
());
}
else
{
map
.
put
(
"zjpl"
,
""
);
map
.
put
(
"zjzy"
,
""
);
map
.
put
(
"zjzs"
,
""
);
}
SjFdsgcsZjyFdxnb
sjFdsgcsZjyFdxnb
=
new
SjFdsgcsZjyFdxnb
();
SjFdsgcsZjyFdxnb
sjFdsgcsZjyFdxnb
=
new
SjFdsgcsZjyFdxnb
();
sjFdsgcsZjyFdxnb
.
setJh
(
jh
);
sjFdsgcsZjyFdxnb
.
setJh
(
jh
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
ec30edfe
...
@@ -689,12 +689,8 @@ public class SjDjjcServiceImpl implements ISjDjjcService
...
@@ -689,12 +689,8 @@ public class SjDjjcServiceImpl implements ISjDjjcService
@Override
@Override
public
int
deleteSjDjjcByIds
(
Long
[]
ids
)
public
int
deleteSjDjjcByIds
(
Long
[]
ids
)
{
{
int
i
=
sjDjjcMapper
.
deleteSjDjjcByIds
(
ids
);
int
i
=
sjDjjcMapper
.
deleteSjDjjcByIds
(
ids
);
return
i
;
return
i
;
}
}
...
@@ -1125,7 +1121,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
...
@@ -1125,7 +1121,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
sjJygjGdsjgdcs
.
setJh
(
jh
);
sjJygjGdsjgdcs
.
setJh
(
jh
);
List
<
SjJygjGdsjgdcs
>
sjJygjGdsjgdcsList
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
//
List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList = sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
if
(
sjDjjc1
!=
null
){
if
(
sjDjjc1
!=
null
){
if
(
sjDjjc1
.
getJdhzb
()!=
null
&&
sjDjjc1
.
getJdzzb
()!=
null
){
if
(
sjDjjc1
.
getJdhzb
()!=
null
&&
sjDjjc1
.
getJdzzb
()!=
null
){
CommonParam
param
=
new
CommonParam
();
CommonParam
param
=
new
CommonParam
();
...
@@ -1186,43 +1182,47 @@ public class SjDjjcServiceImpl implements ISjDjjcService
...
@@ -1186,43 +1182,47 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
}
//查询复杂井
//查询复杂井
List
<
Jsqa
>
jsqaList
=
djdcService
.
getJsqaList
(
param2
);
// List<Jsqa> jsqaList = djdcService.getJsqaList(param2);
if
(
jsqaList
.
size
()>
0
){
// if(jsqaList.size()>0){
List
<
String
>
collect1
=
jsqaList
.
stream
().
map
(
Jsqa:
:
getJh
).
collect
(
Collectors
.
toList
());
// List<String> collect1 = jsqaList.stream().map(Jsqa::getJh).collect(Collectors.toList());
String
[]
collect3Array
=
collect1
.
stream
().
distinct
().
limit
(
5
).
toArray
(
String
[]::
new
);
// String[] collect3Array = collect1.stream().distinct().limit(5).toArray(String[]::new);
param
.
setJhs
(
collect3Array
);
// param.setJhs(collect3Array);
List
<
Ljjw
>
ljjwList3
=
djdcService
.
getLjjwList3
(
param
);
// List<Ljjw> ljjwList3=djdcService.getLjjwList3(param);
map
.
put
(
"fzsgjhList"
,
ljjwList3
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
()));
// map.put("fzsgjhList",ljjwList3.stream().map(Ljjw::getJh).collect(Collectors.toList()));
map
.
put
(
"fzsgjhJson"
,
ljjwList3
);
// map.put("fzsgjhJson",ljjwList3);
}
else
{
// }else {
map
.
put
(
"fzsgjhList"
,
new
ArrayList
<>());
// map.put("fzsgjhList",new ArrayList<>());
map
.
put
(
"fzsgjhJson"
,
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
);
//
String[] strings = ljjwList.stream().map(Ljjw::getJh).toArray(String[]::new);
CommonParam
commonParam
=
new
CommonParam
();
//
CommonParam commonParam = new CommonParam();
commonParam
.
setJhs
(
strings
);
//
commonParam.setJhs(strings);
if
(
sjJygjGdsjgdcsList
.
size
()>
0
){
//
if(sjJygjGdsjgdcsList.size()>0){
commonParam
.
setFw
(
sjJygjGdsjgdcsList
.
get
(
0
).
getFw
());
//
commonParam.setFw(sjJygjGdsjgdcsList.get(0).getFw());
List
<
DjZqsjfx
>
djZqsjfxList
=
djdcInfoMapper
.
getjskd
(
commonParam
);
//
List<DjZqsjfx> djZqsjfxList = djdcInfoMapper.getjskd(commonParam);
List
<
DjZqsjfx
>
collect1
=
djZqsjfxList
.
stream
().
filter
(
it
->
it
.
getFw
()
!=
null
).
limit
(
10
).
collect
(
Collectors
.
toList
());
//
List<DjZqsjfx> collect1 = djZqsjfxList.stream().filter(it -> it.getFw() != null).limit(10).collect(Collectors.toList());
if
(
collect1
.
size
()>
0
){
//
if(collect1.size()>0){
String
[]
collect2Array
=
collect1
.
stream
().
map
(
DjZqsjfx:
:
getJh
).
toArray
(
String
[]::
new
);
//
String[] collect2Array = collect1.stream().map(DjZqsjfx::getJh).toArray(String[]::new);
param
.
setJhs
(
collect2Array
);
//
param.setJhs(collect2Array);
param
.
setJdhzb
(
sjDjjc1
.
getJkhzb
());
//
param.setJdhzb(sjDjjc1.getJkhzb());
param
.
setJdzzb
(
sjDjjc1
.
getJkzzb
());
//
param.setJdzzb(sjDjjc1.getJkzzb());
List
<
Ljjw
>
ljjwList2
=
djdcService
.
getLjjwList3
(
param
);
//
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
map
.
put
(
"fwjhList"
,
ljjwList2
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
()));
//
map.put("fwjhList",ljjwList2.stream().map(Ljjw::getJh).collect(Collectors.toList()));
map
.
put
(
"fwJson"
,
ljjwList2
);
//
map.put("fwJson",ljjwList2);
}
else
{
//
}else {
map
.
put
(
"fwjhList"
,
new
ArrayList
<>());
//
map.put("fwjhList",new ArrayList<>());
map
.
put
(
"fwJson"
,
new
ArrayList
<>());
//
map.put("fwJson",new ArrayList<>());
}
//
}
}
else
{
//
}else {
map
.
put
(
"fwjhList"
,
new
ArrayList
<>());
//
map.put("fwjhList",new ArrayList<>());
map
.
put
(
"fwJson"
,
new
ArrayList
<>());
//
map.put("fwJson",new ArrayList<>());
}
//
}
return
AjaxResult
.
success
(
map
);
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 {
...
@@ -407,8 +407,11 @@ public class DjdcServiceImpl implements DjdcService {
item
.
setZjsczq
(
Double
.
parseDouble
(
df
.
format
(
item
.
getZjzq
()-
item
.
getZjycsl
())));
item
.
setZjsczq
(
Double
.
parseDouble
(
df
.
format
(
item
.
getZjzq
()-
item
.
getZjycsl
())));
//钻进速率
//钻进速率
if
(
item
.
getZjzq
()>
0
){
if
(
item
.
getZjzq
()>
0
){
Double
zjsl
=
item
.
getJc
()/
item
.
getZjzq
();
if
(
item
.
getJc
()!=
null
&&
item
.
getZjzq
()!=
null
){
item
.
setZjsl
(
Double
.
parseDouble
(
df
.
format
(
zjsl
)));
Double
zjsl
=
item
.
getJc
()/
item
.
getZjzq
();
item
.
setZjsl
(
Double
.
parseDouble
(
df
.
format
(
zjsl
)));
}
}
}
if
(
zjycsl
>
0
){
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"
...
@@ -254,7 +254,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JS,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
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
order by jh) c on a.jh=c.jh
left join (
left join (
SELECT
SELECT
...
@@ -438,7 +438,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -438,7 +438,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
left join (select jh, count(*) as kc
from jsdb
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
group by jh) kc
on a.jh = kc.jh
on a.jh = kc.jh
...
@@ -528,7 +528,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -528,7 +528,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
left join (select jh, count(*) as kc
from jsdb
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
group by jh) kc
on a.jh = kc.jh
on a.jh = kc.jh
...
@@ -627,14 +627,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -627,14 +627,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select jh, count(*) as kc
left join (select jh, count(*) as kc
from jsdb
from jsdb
where tgcc not like '%导管%'
where tgcc not like '%导管%'
and tgcc not like '%其它%'
group by jh) kc
group by jh) kc
on a.jh = kc.jh
on a.jh = kc.jh
WHERE 1 = 1
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb}
<
#{jl}
AND a.jdzzb - #{jdzzb}
<
#{jl}
<if
test=
"wjsjks!=null and wjsjks!=''"
>
<if
test=
"wjsjks!=null and wjsjks!=''"
>
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
...
@@ -670,8 +668,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -670,8 +668,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
order by WJRQ desc NULLS LAST) where ROWNUM
<
= 100
order by WJRQ desc NULLS LAST) where
jkjl
<
=#{jl} and
ROWNUM
<
= 100
</select>
</select>
<!-- and a.jdhzb - #{jdhzb} < #{jl}-->
<!-- AND a.jdzzb - #{jdzzb} < #{jl}-->
<!-- select ss.kc,ss.ztxh,ss.cc,-->
<!-- select ss.kc,ss.ztxh,ss.cc,-->
<!-- count( *) as ztsl,-->
<!-- count( *) as ztsl,-->
<!-- round( sum(case when ss.kc=1 and tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,-->
<!-- 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"
...
@@ -723,7 +723,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from JSDB
from JSDB
where
where
1=1
1=1
and tgcc not like '%导管%'
and tgcc not like '%导管%'
and tgcc not like '%其它%'
<if
test=
"qk != null and qk !=''"
>
<if
test=
"qk != null and qk !=''"
>
and jh in(
and jh in(
select jh from jsaa where qk like CONCAT(CONCAT('%', #{qk}), '%') and wjrq >sysdate-365*2
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"
...
@@ -797,14 +797,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
JS,
JS,
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
FROM JSDB jsdb
where jsdb.tgcc like '%导管%'
where jsdb.tgcc like '%导管%'
and jsdb.tgcc not like '%其它%'
UNION all
UNION all
SELECT jh,
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 ksjs
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS ksjs
FROM JSDB jsdb
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'
order by jh)) c on a.jh=c.jh where kc='1'
<if
test=
"jh!=null and jh!=''"
>
<if
test=
"jh!=null and jh!=''"
>
and a. jh =#{jh}
and a. jh =#{jh}
...
@@ -1146,6 +1146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -1146,6 +1146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM max_value_cte, guantao_value_cte
FROM max_value_cte, guantao_value_cte
</select>
</select>
<select
id=
"getLjjwList2"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
<select
id=
"getLjjwList2"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
select * from (
SELECT a.*, round(power(power(a.jkhzb - ${jkhzb}
SELECT a.*, round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl
FROM JSBA a
FROM JSBA a
...
@@ -1153,13 +1154,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -1153,13 +1154,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE 1 = 1
WHERE 1 = 1
and a.jh not like '%侧%'
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}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if
test=
"qk!=null and qk!=''"
>
<if
test=
"qk!=null and qk!=''"
>
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
</if>
</if>
order by jkjl asc
order by jkjl asc
)where 1=1 and jkjl
<
= #{jl}
</select>
</select>
<select
id=
"getJswaSum"
resultType=
"com.zjsgfa.project.zt.domain.vo.JswaVo"
>
<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,
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"
...
@@ -1184,68 +1183,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) a
) a
</select>
</select>
<select
id=
"getLjjwList3"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
<select
id=
"getLjjwList3"
resultType=
"com.zjsgfa.project.zt.domain.Ljjw"
>
select * from (
SELECT a.jh,
SELECT a.jh,
a.jkhzb,
a.jkhzb,
a.jkzzb,
a.jkzzb,
a.jdhzb,
a.jdhzb,
a.jdzzb,
a.jdzzb,
a.jx,
a.jx,
a.jb,
a.jb,
b.wjjs,
b.wjjs,
b.wjczjs,
b.wjczjs,
b.wzcw,
b.wzcw,
kc.kc,
kc.kc,
zjzq.wjzq,
zjzq.wjzq,
zjzq.zjzq,
zjzq.zjzq,
round(power(power(a.jkhzb - ${jkhzb}
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
round(power(power(a.jdhzb - ${jdhzb}
round(power(power(a.jdhzb - ${jdhzb}
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl,
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.sjjs,
b.wjczjs wzczjs,
b.wjczjs wzczjs,
b.zjy,
b.zjy,
b.jjzq1,
b.jjzq1,
fm.zjbh dh
fm.zjbh dh
FROM JSBA a
FROM JSBA a
left join jsaa b
left join jsaa b
on a.jh = b.jh
on a.jh = b.jh
left join jsfm fm
left join jsfm fm
on a.jh = fm.jh
on a.jh = fm.jh
left join
left join
(select jsta.jh,
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
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
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
FROM JSTA jsta
where jsta.jd1 is not null
where jsta.jd1 is not null
or jsta.jd2 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
group by jsta.jh) zjzq
on zjzq.jh = a.jh
on zjzq.jh = a.jh
left join (select jh, count(*) as kc
left join (select jh, count(*) as kc
from jsdb
from jsdb
where tgcc not like '%导管
%'
where tgcc not like '%导管%' and tgcc not like '%其它
%'
group by jh) kc
group by jh) kc
on a.jh = kc.jh
on a.jh = kc.jh
WHERE 1 = 1
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb}
<
#{jl}
AND a.jdzzb - #{jdzzb}
<
#{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if
test=
"jhs!=null"
>
<if
test=
"jhs!=null"
>
and a.jh in
and a.jh in
<foreach
item=
"jh"
collection=
"jhs"
<foreach
item=
"jh"
collection=
"jhs"
open=
"("
separator=
","
close=
")"
>
open=
"("
separator=
","
close=
")"
>
#{jh}
#{jh}
</foreach>
</foreach>
</if>
</if>
order by jkjl asc
order by jkjl asc
) where jkjl
<
= #{jl}
</select>
</select>
<select
id=
"getJhKcList"
resultType=
"com.zjsgfa.project.zt.domain.Djjc"
>
<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