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
ec004008
Commit
ec004008
authored
Nov 28, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ed08fcdd
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
622 additions
and
525 deletions
+622
-525
pom.xml
+6
-0
src/main/java/com/zjsgfa/project/zjsgfa/controller/CxtjController.java
+1
-1
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
+17
-2
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsTsgj.java
+3
-10
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjLjjw.java
+5
-0
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjQkztfx.java
+4
-0
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjZjcsxx.java
+15
-0
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjZtgjsj.java
+4
-194
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
+368
-249
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
+51
-30
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjJsjgServiceImpl.java
+10
-9
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjLjjwServiceImpl.java
+1
-1
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjZjcsxxServiceImpl.java
+43
-15
src/main/java/com/zjsgfa/project/zt/domain/DjZqsjfx.java
+2
-0
src/main/java/com/zjsgfa/project/zt/domain/Djjc.java
+1
-1
src/main/java/com/zjsgfa/project/zt/domain/TimePointPair.java
+2
-1
src/main/java/com/zjsgfa/project/zt/service/impl/DjdcServiceImpl.java
+46
-1
src/main/resources/mybatis/zjsgfa/SjLjjwMapper.xml
+13
-3
src/main/resources/mybatis/zjsgfa/SjQkztfxMapper.xml
+10
-3
src/main/resources/mybatis/zjsgfa/SjZjcsxxMapper.xml
+14
-2
src/main/resources/mybatis/zjsgfa/SjZtcsxxMapper.xml
+1
-1
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
+5
-2
src/main/resources/static/excel/sgfamb.docx
+0
-0
No files found.
pom.xml
View file @
ec004008
...
...
@@ -311,6 +311,12 @@
</dependency>
<dependency>
<groupId>
org.jsoup
</groupId>
<artifactId>
jsoup
</artifactId>
<version>
1.15.3
</version>
<!-- 最新版本 -->
</dependency>
</dependencies>
<build>
...
...
src/main/java/com/zjsgfa/project/zjsgfa/controller/CxtjController.java
View file @
ec004008
...
...
@@ -43,7 +43,7 @@ public class CxtjController extends BaseController
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
Cxtj
cxtj
)
{
startPage
();
//
startPage();
cxtj
.
setCreatedBy
(
SecurityUtils
.
getUsername
());
List
<
Cxtj
>
list
=
cxtjService
.
selectCxtjList
(
cxtj
);
return
getDataTable
(
list
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
View file @
ec004008
...
...
@@ -2322,8 +2322,10 @@ public class SjDjjcController extends BaseController
dataModel
.
put
(
"jh"
,
jh
);
dataModel
.
put
(
"jb"
,
sjDjjc
.
getJb
());
dataModel
.
put
(
"jx"
,
sjDjjc
.
getJx
());
dataModel
.
put
(
"jkhzb"
,
sjDjjc
.
getJkhzb
());
dataModel
.
put
(
"jkzzb"
,
sjDjjc
.
getJkzzb
());
DecimalFormat
df
=
new
DecimalFormat
(
"0"
);
// 或使用"#,###"等格式
String
str
=
df
.
format
(
sjDjjc
.
getJkhzb
());
dataModel
.
put
(
"jkhzb"
,
df
.
format
(
sjDjjc
.
getJkhzb
()));
dataModel
.
put
(
"jkzzb"
,
df
.
format
(
sjDjjc
.
getJkzzb
()));
dataModel
.
put
(
"gzwz"
,
sjDjjc
.
getGzwz
());
dataModel
.
put
(
"wzcw"
,
sjDjjc
.
getWzcw
());
dataModel
.
put
(
"ztmd"
,
sjDjjc
.
getZtmd
());
...
...
@@ -2702,6 +2704,19 @@ public class SjDjjcController extends BaseController
sjFdsgcsTsgj
.
setJh
(
jh
);
sjFdsgcsTsgj
.
setKc
(
kc
);
List
<
SjFdsgcsTsgj
>
sjFdsgcsTsgjList
=
sjFdsgcsTsgjMapper
.
selectSjFdsgcsTsgjList
(
sjFdsgcsTsgj
);
if
(
sjFdsgcsTsgjList
.
size
()==
0
){
SjFdsgcsTsgj
sjFdsgcsTsgj1
=
new
SjFdsgcsTsgj
();
sjFdsgcsTsgj1
.
setJh
(
"-"
);
sjFdsgcsTsgj1
.
setKc
(
"-"
);
sjFdsgcsTsgj1
.
setGgxh
(
"-"
);
sjFdsgcsTsgj1
.
setGjmc
(
"-"
);
sjFdsgcsTsgj1
.
setGgxh
(
"-"
);
sjFdsgcsTsgj1
.
setSl
(
"-"
);
sjFdsgcsTsgj1
.
setYqxg
(
"-"
);
sjFdsgcsTsgj1
.
setYjazwz
(
"-"
);
sjFdsgcsTsgj1
.
setXnzb
(
"-"
);
sjFdsgcsTsgj1
.
setRemark
(
"-"
);
}
map
.
put
(
"sjFdsgcsTsgjList"
,
sjFdsgcsTsgjList
);
SjZtxx
sjZtxx
=
new
SjZtxx
();
sjZtxx
.
setJh
(
jh
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjFdsgcsTsgj.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
...
...
@@ -11,6 +12,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-08-06
*/
@Data
public
class
SjFdsgcsTsgj
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -36,7 +38,7 @@ public class SjFdsgcsTsgj extends BaseEntity
/** 数量 */
@Excel
(
name
=
"数量"
)
private
Double
sl
;
private
String
sl
;
/** 性能指标 */
@Excel
(
name
=
"性能指标"
)
...
...
@@ -100,15 +102,7 @@ public class SjFdsgcsTsgj extends BaseEntity
return
ggxh
;
}
public
void
setSl
(
Double
sl
)
{
this
.
sl
=
sl
;
}
public
Double
getSl
()
{
return
sl
;
}
public
void
setXnzb
(
String
xnzb
)
{
...
...
@@ -148,7 +142,6 @@ public class SjFdsgcsTsgj extends BaseEntity
.
append
(
"kc"
,
getKc
())
.
append
(
"gjmc"
,
getGjmc
())
.
append
(
"ggxh"
,
getGgxh
())
.
append
(
"sl"
,
getSl
())
.
append
(
"xnzb"
,
getXnzb
())
.
append
(
"yjazwz"
,
getYjazwz
())
.
append
(
"yqxg"
,
getYqxg
())
...
...
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjLjjw.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
...
...
@@ -11,6 +12,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-07-22
*/
@Data
public
class
SjLjjw
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -94,6 +96,9 @@ public class SjLjjw extends BaseEntity
@Excel
(
name
=
"井底纵距离"
)
private
Double
jdzjl
;
private
String
lb1
;
private
String
lb2
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjQkztfx.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
...
...
@@ -11,6 +12,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-07-22
*/
@Data
public
class
SjQkztfx
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -82,6 +84,8 @@ public class SjQkztfx extends BaseEntity
@Excel
(
name
=
"起出井深中位数"
)
private
Double
qsjsZw
;
private
String
lb
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjZjcsxx.java
View file @
ec004008
...
...
@@ -83,6 +83,21 @@ public class SjZjcsxx extends BaseEntity
@Excel
(
name
=
"缸套直径"
)
private
String
gtzj
;
/** 刀翼 */
@Excel
(
name
=
"刀翼"
)
private
String
dy
;
/** 复合片 */
@Excel
(
name
=
"复合片"
)
private
String
ffp
;
/** 复合片齿形 */
@Excel
(
name
=
"复合片齿形"
)
private
String
ffpcx
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
src/main/java/com/zjsgfa/project/zjsgfa/domain/SjZtgjsj.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zjsgfa.framework.aspectj.lang.annotation.Excel
;
...
...
@@ -11,6 +12,7 @@ import com.zjsgfa.framework.web.domain.BaseEntity;
* @author
* @date 2025-07-22
*/
@Data
public
class
SjZtgjsj
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -60,11 +62,11 @@ public class SjZtgjsj extends BaseEntity
/** 钻井液密度 */
@Excel
(
name
=
"钻井液密度"
)
private
Double
zjymd
;
private
String
zjymd
;
/** 排量 */
@Excel
(
name
=
"排量"
)
private
Double
pl
;
private
String
pl
;
/** 泵压 */
@Excel
(
name
=
"泵压"
)
...
...
@@ -82,196 +84,4 @@ public class SjZtgjsj extends BaseEntity
@Excel
(
name
=
"指标"
)
private
Double
zb
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setJh
(
String
jh
)
{
this
.
jh
=
jh
;
}
public
String
getJh
()
{
return
jh
;
}
public
void
setLjjh
(
String
ljjh
)
{
this
.
ljjh
=
ljjh
;
}
public
String
getLjjh
()
{
return
ljjh
;
}
public
void
setKc
(
String
kc
)
{
this
.
kc
=
kc
;
}
public
String
getKc
()
{
return
kc
;
}
public
void
setJd
(
String
jd
)
{
this
.
jd
=
jd
;
}
public
String
getJd
()
{
return
jd
;
}
public
void
setZtcc
(
Double
ztcc
)
{
this
.
ztcc
=
ztcc
;
}
public
Double
getZtcc
()
{
return
ztcc
;
}
public
void
setZtxh
(
String
ztxh
)
{
this
.
ztxh
=
ztxh
;
}
public
String
getZtxh
()
{
return
ztxh
;
}
public
void
setPz
(
String
pz
)
{
this
.
pz
=
pz
;
}
public
String
getPz
()
{
return
pz
;
}
public
void
setMxqk
(
String
mxqk
)
{
this
.
mxqk
=
mxqk
;
}
public
String
getMxqk
()
{
return
mxqk
;
}
public
void
setQzyy
(
String
qzyy
)
{
this
.
qzyy
=
qzyy
;
}
public
String
getQzyy
()
{
return
qzyy
;
}
public
void
setCw
(
String
cw
)
{
this
.
cw
=
cw
;
}
public
String
getCw
()
{
return
cw
;
}
public
void
setZjymd
(
Double
zjymd
)
{
this
.
zjymd
=
zjymd
;
}
public
Double
getZjymd
()
{
return
zjymd
;
}
public
void
setPl
(
Double
pl
)
{
this
.
pl
=
pl
;
}
public
Double
getPl
()
{
return
pl
;
}
public
void
setLgby
(
Double
lgby
)
{
this
.
lgby
=
lgby
;
}
public
Double
getLgby
()
{
return
lgby
;
}
public
void
setJc
(
Double
jc
)
{
this
.
jc
=
jc
;
}
public
Double
getJc
()
{
return
jc
;
}
public
void
setJxzs
(
Double
jxzs
)
{
this
.
jxzs
=
jxzs
;
}
public
Double
getJxzs
()
{
return
jxzs
;
}
public
void
setZb
(
Double
zb
)
{
this
.
zb
=
zb
;
}
public
Double
getZb
()
{
return
zb
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"jh"
,
getJh
())
.
append
(
"ljjh"
,
getLjjh
())
.
append
(
"kc"
,
getKc
())
.
append
(
"jd"
,
getJd
())
.
append
(
"ztcc"
,
getZtcc
())
.
append
(
"ztxh"
,
getZtxh
())
.
append
(
"pz"
,
getPz
())
.
append
(
"mxqk"
,
getMxqk
())
.
append
(
"qzyy"
,
getQzyy
())
.
append
(
"cw"
,
getCw
())
.
append
(
"zjymd"
,
getZjymd
())
.
append
(
"pl"
,
getPl
())
.
append
(
"lgby"
,
getLgby
())
.
append
(
"jc"
,
getJc
())
.
append
(
"jxzs"
,
getJxzs
())
.
append
(
"zb"
,
getZb
())
.
toString
();
}
}
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
.
impl
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -18,8 +20,11 @@ import com.zjsgfa.project.zjsgfa.domain.*;
import
com.zjsgfa.project.zjsgfa.mapper.*
;
import
com.zjsgfa.project.zt.domain.*
;
import
com.zjsgfa.project.zt.domain.vo.SjInfo
;
import
com.zjsgfa.project.zt.mapper.DjdcInfoMapper
;
import
com.zjsgfa.project.zt.mapper.JsaaMapper
;
import
com.zjsgfa.project.zt.mapper.JsqaMapper
;
import
com.zjsgfa.project.zt.service.DjdcService
;
import
org.jsoup.Jsoup
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zjsgfa.project.zjsgfa.service.ISjDjjcService
;
...
...
@@ -168,14 +173,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
//根据方案id查询
List
<
SgfambKcSggy
>
sgfambKcSggyList
=
sgfambKcSggyMapper
.
selectSgfambKcSggyListByQk
(
new
SgfambKcSggy
());
List
<
SgfambKcSggy
>
collect
=
sgfambKcSggyList
.
stream
().
filter
(
sgfambKcSggy
->
sgfambKcSggy
.
getZbid
().
toString
().
equals
(
sjDjjc
.
getFaid
().
toString
())).
collect
(
Collectors
.
toList
());
// if(collect.size()==0){
// Map<String, List<SgfambKcSggy>> groupedByQk = sgfambKcSggyList.stream()
// .collect(Collectors.groupingBy(SgfambKcSggy::getQk));
// for(String s:groupedByQk.keySet()){
// collect=groupedByQk.get(s);
// break;
// }
// }
for
(
SgfambKcSggy
sgfambKcSggy
:
collect
)
{
if
(
sgfambKcSggy
!=
null
)
{
...
...
@@ -216,6 +213,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
else
{
zjzh
=
sgfambKcSggy
.
getZjzh
();
}
zjzh
=
removeHtmlTags
(
zjzh
);
}
String
fxts
=
""
;
...
...
@@ -268,6 +266,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjFdsgcs1
.
setZjycs
(
sgfambKcSggy
.
getZjycs
());
sjFdsgcs1
.
setZjgccs
(
sgfambKcSggy
.
getZjgccs
());
sjFdsgcs1
.
setZyfx
(
fxts
);
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcsMapper
.
updateSjFdsgcs
(
sjFdsgcs1
);
}
else
{
sjFdsgcs1
=
new
SjFdsgcs
();
...
...
@@ -280,6 +279,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjFdsgcs1
.
setZjycs
(
sgfambKcSggy
.
getZjycs
());
sjFdsgcs1
.
setZjgccs
(
sgfambKcSggy
.
getZjgccs
());
sjFdsgcs1
.
setZyfx
(
fxts
);
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcsMapper
.
insertSjFdsgcs
(
sjFdsgcs1
);
}
SjZtxx
sjZtxx
=
new
SjZtxx
();
...
...
@@ -316,6 +316,9 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZjcsxx1
.
setYj
(
sgfambKcSggy
.
getYj
());
sjZjcsxx1
.
setZjymd
(
sgfambKcSggy
.
getZjymd
());
sjZjcsxx1
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZjcsxx1
.
setDy
(
sgfambKcSggy
.
getDy
());
sjZjcsxx1
.
setFfp
(
sgfambKcSggy
.
getFfp
());
sjZjcsxx1
.
setFfpcx
(
sgfambKcSggy
.
getFfpcx
());
sjZjcsxxMapper
.
updateSjZjcsxx
(
sjZjcsxx1
);
}
else
{
sjZjcsxx
.
setZjzy
(
sgfambKcSggy
.
getZjzy
());
...
...
@@ -332,22 +335,46 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZjcsxx
.
setYj
(
sgfambKcSggy
.
getYj
());
sjZjcsxx
.
setZjymd
(
sgfambKcSggy
.
getZjymd
());
sjZjcsxx
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZjcsxx
.
setDy
(
sgfambKcSggy
.
getDy
());
sjZjcsxx
.
setFfp
(
sgfambKcSggy
.
getFfp
());
sjZjcsxx
.
setFfpcx
(
sgfambKcSggy
.
getFfpcx
());
sjZjcsxxMapper
.
insertSjZjcsxx
(
sjZjcsxx
);
}
//钻头参数信息
SjZtcsxx
sjZtcsxx
=
new
SjZtcsxx
();
sjZtcsxx
.
setJh
(
sjDjjc
.
getJh
());
sjZtcsxx
.
setKc
(
sgfambKcSggy
.
getKc
());
sjZtcsxx
.
setLb
(
"高指标井推荐"
);
sjZtcsxx
.
setDy
(
sgfambKcSggy
.
getDy
());
sjZtcsxx
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZtcsxx
.
setSy
(
sgfambKcSggy
.
getSy
());
sjZtcsxx
.
setFfp
(
sgfambKcSggy
.
getFfp
());
sjZtcsxx
.
setFfpcx
(
sgfambKcSggy
.
getFfpcx
());
sjZtcsxxMapper
.
insertSjZtcsxx
(
sjZtcsxx
);
//保存施工概要钻具组合
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs
.
setJh
(
sjDjjc
.
getJh
());
sjSggyZjzhcs
.
setKc
(
sgfambKcSggy
.
getKc
());
SjSggyZjzhcs
sjSggyZjzhcs1
=
sjSggyZjzhcsMapper
.
selectSjSggyZjzhcsByZjzhcs
(
sjSggyZjzhcs
);
if
(
sjSggyZjzhcs1
!=
null
){
sjSggyZjzhcs1
.
setZjjg
(
zjzh
);
sjSggyZjzhcs1
.
setZtxh
(
sjZjcsxx
.
getZtxh
());
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
());
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
());
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
());
sjSggyZjzhcs1
.
setCj
(
sjZjcsxx
.
getCj
());
sjSggyZjzhcs1
.
setYj
(
sjZjcsxx
.
getYj
());
sjSggyZjzhcs1
.
setZjzy
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzysx
())?
sjZjcsxx
.
getZjzy
()+
"-"
+
sjZjcsxx
.
getZjzysx
():
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzssx
())?
sjZjcsxx
.
getZjzs
()+
"-"
+
sjZjcsxx
.
getZjzssx
():
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjbysx
())?
sjZjcsxx
.
getZjby
()+
"-"
+
sjZjcsxx
.
getZjbysx
():
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjpl
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjplsx
()
)?
sjZjcsxx
.
getZjpl
()+
"-"
+
sjZjcsxx
.
getZjplsx
()
:
sjZjcsxx
.
getZjpl
());
sjSggyZjzhcsMapper
.
updateSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
else
{
sjSggyZjzhcs1
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs1
.
setJh
(
sjZjcsxx
.
getJh
());
sjSggyZjzhcs1
.
setKc
(
sjZjcsxx
.
getKc
());
sjSggyZjzhcs1
.
setZjjg
(
zjzh
);
sjSggyZjzhcs1
.
setZtxh
(
sjZjcsxx
.
getZtxh
());
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
());
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
());
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
());
sjSggyZjzhcs1
.
setCj
(
sjZjcsxx
.
getCj
());
sjSggyZjzhcs1
.
setYj
(
sjZjcsxx
.
getYj
());
sjSggyZjzhcs1
.
setZjzy
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzysx
())?
sjZjcsxx
.
getZjzy
()+
"-"
+
sjZjcsxx
.
getZjzysx
():
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzssx
())?
sjZjcsxx
.
getZjzs
()+
"-"
+
sjZjcsxx
.
getZjzssx
():
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjbysx
())?
sjZjcsxx
.
getZjby
()+
"-"
+
sjZjcsxx
.
getZjbysx
():
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjpl
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjplsx
()
)?
sjZjcsxx
.
getZjpl
()+
"-"
+
sjZjcsxx
.
getZjplsx
()
:
sjZjcsxx
.
getZjpl
());
sjSggyZjzhcsMapper
.
insertSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
}
}
...
...
@@ -380,6 +407,18 @@ public class SjDjjcServiceImpl implements ISjDjjcService
return
i
;
}
public
static
String
removeHtmlTags
(
String
htmlContent
)
{
if
(
htmlContent
==
null
||
htmlContent
.
isEmpty
())
{
return
""
;
}
// 方式1:直接提取纯文本(保留换行)
String
plainText
=
Jsoup
.
parse
(
htmlContent
).
text
();
// 方式2:清理HTML(可自定义保留标签/属性)
// String cleanHtml = Jsoup.clean(htmlContent, Safelist.none()); // 无标签
return
plainText
;
}
/**
* 提取字符串中第一个{{}}包裹的内容
...
...
@@ -410,69 +449,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
{
sjDjjc
.
setUpdateTime
(
DateUtils
.
getNowDate
());
sjDjjc
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
// if(sjDjjc.getFaid()!=null){
// List<SgfambKcSggy> sgfambKcSggyList = sgfambKcSggyMapper.selectSgfambKcSggyByZbid(sjDjjc.getFaid());
// if (sgfambKcSggy != null) {
// //查询分段施工
// SjFdsgcs sjFdsgcs = new SjFdsgcs();
// sjFdsgcs.setKc(sgfambKcSggy.getKc());
// sjFdsgcs.setJh(sjDjjc.getJh());
// SjFdsgcs sjFdsgcs1 = sjFdsgcsMapper.selectSjFdsgcsByJhAndKc(sjFdsgcs);
// if (sjFdsgcs1 != null) {
// sjFdsgcs1.setJh(sjDjjc.getJh());
// sjFdsgcs1.setKc(sgfambKcSggy.getKc());
// sjFdsgcs1.setZjzh(sgfambKcSggy.getZjzh());
// sjFdsgcs1.setZjzhzysx(sgfambKcSggy.getZjzhzysx());
// sjFdsgcs1.setGjfx(sgfambKcSggy.getGjfx());
// sjFdsgcs1.setGjyh(sgfambKcSggy.getGjyh());
// sjFdsgcs1.setZjycs(sgfambKcSggy.getZjycs());
// sjFdsgcs1.setZjgccs(sgfambKcSggy.getZjgccs());
// sjFdsgcsMapper.updateSjFdsgcs(sjFdsgcs);
// } else {
// sjFdsgcs1 = new SjFdsgcs();
// sjFdsgcs1.setJh(sjDjjc.getJh());
// sjFdsgcs1.setKc(sgfambKcSggy.getKc());
// sjFdsgcs1.setZjzh(sgfambKcSggy.getZjzh());
// sjFdsgcs1.setZjzhzysx(sgfambKcSggy.getZjzhzysx());
// sjFdsgcs1.setGjfx(sgfambKcSggy.getGjfx());
// sjFdsgcs1.setGjyh(sgfambKcSggy.getGjyh());
// sjFdsgcs1.setZjycs(sgfambKcSggy.getZjycs());
// sjFdsgcs1.setZjgccs(sgfambKcSggy.getZjgccs());
// sjFdsgcsMapper.insertSjFdsgcs(sjFdsgcs1);
// }
// SjZtxx sjZtxx = new SjZtxx();
// sjZtxx.setJh(sjDjjc.getJh());
// sjZtxx.setKc(sgfambKcSggy.getKc());
// List<SjZtxx> sjZtxxes = sjZtxxMapper.selectSjZtxxList(sjZtxx);
// if (sjZtxxes.size() > 0) {
// SjZtxx sjZtxx1 = sjZtxxes.get(0);
// sjZtxx1.setZtxh(sgfambKcSggy.getZtxh());
// sjZtxxMapper.updateSjZtxx(sjZtxx1);
// } else {
// sjZtxx.setZtxh(sgfambKcSggy.getZtxh());
// sjZtxx.setLb("邻井推荐");
// sjZtxxMapper.insertSjZtxx(sjZtxx);
// }
// SjZjcsxx sjZjcsxx = new SjZjcsxx();
// sjZjcsxx.setJh(sjDjjc.getJh());
// sjZjcsxx.setKc(sgfambKcSggy.getKc());
// List<SjZjcsxx> sjZjcsxxes = sjZjcsxxMapper.selectSjZjcsxxList(sjZjcsxx);
// if (sjZjcsxxes.size() > 0) {
// SjZjcsxx sjZjcsxx1 = sjZjcsxxes.get(0);
// sjZjcsxx1.setZjzy(sgfambKcSggy.getZjzy());
// sjZjcsxx1.setZjzs(sgfambKcSggy.getZjzs());
// sjZjcsxx1.setZjpl(sgfambKcSggy.getZjpl());
// sjZjcsxx1.setZjby(sgfambKcSggy.getZjby());
// sjZjcsxxMapper.updateSjZjcsxx(sjZjcsxx1);
// } else {
// sjZjcsxx.setZjzy(sgfambKcSggy.getZjzy());
// sjZjcsxx.setZjzs(sgfambKcSggy.getZjzs());
// sjZjcsxx.setZjpl(sgfambKcSggy.getZjpl());
// sjZjcsxx.setZjby(sgfambKcSggy.getZjby());
// sjZjcsxxMapper.insertSjZjcsxx(sjZjcsxx);
// }
// }
// }
//施工概要
SjSggyGjsbxnyq
sjSggyGjsbxnyq
=
new
SjSggyGjsbxnyq
();
sjSggyGjsbxnyq
.
setJh
(
sjDjjc
.
getJh
());
...
...
@@ -528,6 +504,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
else
{
zjzh
=
sgfambKcSggy
.
getZjzh
();
}
zjzh
=
removeHtmlTags
(
zjzh
);
}
String
fxts
=
"区块风险:<p>"
;
...
...
@@ -584,6 +561,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcs1
.
setZjgccs
(
sgfambKcSggy
.
getZjgccs
());
sjFdsgcs1
.
setZyfx
(
fxts
);
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcsMapper
.
updateSjFdsgcs
(
sjFdsgcs1
);
}
else
{
sjFdsgcs1
=
new
SjFdsgcs
();
...
...
@@ -597,6 +575,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjFdsgcs1
.
setZjgccs
(
sgfambKcSggy
.
getZjgccs
());
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcs1
.
setZyfx
(
fxts
);
sjFdsgcs1
.
setFxgkcs
(
sgfambKcSggy
.
getFxgkcs
());
sjFdsgcsMapper
.
insertSjFdsgcs
(
sjFdsgcs1
);
}
SjZtxx
sjZtxx
=
new
SjZtxx
();
...
...
@@ -616,56 +595,62 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZtxx
.
setLb
(
"高指标井推荐"
);
sjZtxxMapper
.
insertSjZtxx
(
sjZtxx
);
}
SjZjcsxx
sjZjcsxx
=
new
SjZjcsxx
();
sjZjcsxx
.
setJh
(
sjDjjc
.
getJh
());
sjZjcsxx
.
setKc
(
sgfambKcSggy
.
getKc
());
List
<
SjZjcsxx
>
sjZjcsxxes
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZjcsxx
);
if
(
sjZjcsxxes
.
size
()
>
0
)
{
SjZjcsxx
sjZjcsxx1
=
sjZjcsxxes
.
get
(
0
);
sjZjcsxx1
.
setZjzy
(
sgfambKcSggy
.
getZjzy
());
sjZjcsxx1
.
setZjzs
(
sgfambKcSggy
.
getZjzs
());
sjZjcsxx1
.
setZjpl
(
sgfambKcSggy
.
getZjpl
());
sjZjcsxx1
.
setZjby
(
sgfambKcSggy
.
getZjby
());
sjZjcsxx1
.
setZjzysx
(
sgfambKcSggy
.
getZjzysx
());
sjZjcsxx1
.
setZjbysx
(
sgfambKcSggy
.
getZjbysx
());
sjZjcsxx1
.
setZjzssx
(
sgfambKcSggy
.
getZjzssx
());
sjZjcsxx1
.
setZjplsx
(
sgfambKcSggy
.
getZjplsx
());
sjZjcsxx1
.
setCj
(
sgfambKcSggy
.
getCj
());
sjZjcsxx1
.
setCc
(
sgfambKcSggy
.
getCc
());
sjZjcsxx1
.
setSy
(
sgfambKcSggy
.
getSy
());
sjZjcsxx1
.
setYj
(
sgfambKcSggy
.
getYj
());
sjZjcsxx1
.
setZjymd
(
sgfambKcSggy
.
getZjymd
());
sjZjcsxx1
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZjcsxxMapper
.
updateSjZjcsxx
(
sjZjcsxx1
);
}
else
{
sjZjcsxx
.
setZjzy
(
sgfambKcSggy
.
getZjzy
());
sjZjcsxx
.
setZjzs
(
sgfambKcSggy
.
getZjzs
());
sjZjcsxx
.
setZjpl
(
sgfambKcSggy
.
getZjpl
());
sjZjcsxx
.
setZjby
(
sgfambKcSggy
.
getZjby
());
sjZjcsxx
.
setZjzysx
(
sgfambKcSggy
.
getZjzysx
());
sjZjcsxx
.
setZjbysx
(
sgfambKcSggy
.
getZjbysx
());
sjZjcsxx
.
setZjzssx
(
sgfambKcSggy
.
getZjzssx
());
sjZjcsxx
.
setZjplsx
(
sgfambKcSggy
.
getZjplsx
());
sjZjcsxx
.
setCj
(
sgfambKcSggy
.
getCj
());
sjZjcsxx
.
setCc
(
sgfambKcSggy
.
getCc
());
sjZjcsxx
.
setSy
(
sgfambKcSggy
.
getSy
());
sjZjcsxx
.
setYj
(
sgfambKcSggy
.
getYj
());
sjZjcsxx
.
setZjymd
(
sgfambKcSggy
.
getZjymd
());
sjZjcsxx
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZjcsxxMapper
.
insertSjZjcsxx
(
sjZjcsxx
);
}
//钻头参数信息
SjZtcsxx
sjZtcsxx
=
new
SjZtcsxx
();
sjZtcsxx
.
setJh
(
sjDjjc
.
getJh
());
sjZtcsxx
.
setKc
(
sgfambKcSggy
.
getKc
());
sjZtcsxx
.
setLb
(
"高指标井推荐"
);
sjZtcsxx
.
setDy
(
sgfambKcSggy
.
getDy
());
sjZtcsxx
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjZtcsxx
.
setSy
(
sgfambKcSggy
.
getSy
());
sjZtcsxx
.
setFfp
(
sgfambKcSggy
.
getFfp
());
sjZtcsxx
.
setFfpcx
(
sgfambKcSggy
.
getFfpcx
());
sjZtcsxxMapper
.
deleteSjZtcsxxByJhAndKcAndlb
(
sjZtcsxx
);
sjZtcsxxMapper
.
insertSjZtcsxx
(
sjZtcsxx
);
// SjZjcsxx sjZjcsxx = new SjZjcsxx();
// sjZjcsxx.setJh(sjDjjc.getJh());
// sjZjcsxx.setKc(sgfambKcSggy.getKc());
// List<SjZjcsxx> sjZjcsxxes = sjZjcsxxMapper.selectSjZjcsxxList(sjZjcsxx);
// if (sjZjcsxxes.size() > 0) {
// SjZjcsxx sjZjcsxx1 = sjZjcsxxes.get(0);
// sjZjcsxx1.setZjzy(sgfambKcSggy.getZjzy());
// sjZjcsxx1.setZjzs(sgfambKcSggy.getZjzs());
// sjZjcsxx1.setZjpl(sgfambKcSggy.getZjpl());
// sjZjcsxx1.setZjby(sgfambKcSggy.getZjby());
// sjZjcsxx1.setZjzysx(sgfambKcSggy.getZjzysx());
// sjZjcsxx1.setZjbysx(sgfambKcSggy.getZjbysx());
// sjZjcsxx1.setZjzssx(sgfambKcSggy.getZjzssx());
// sjZjcsxx1.setZjplsx(sgfambKcSggy.getZjplsx());
// sjZjcsxx1.setCj(sgfambKcSggy.getCj());
// sjZjcsxx1.setCc(sgfambKcSggy.getCc());
// sjZjcsxx1.setSy(sgfambKcSggy.getSy());
// sjZjcsxx1.setYj(sgfambKcSggy.getYj());
// sjZjcsxx1.setZjymd(sgfambKcSggy.getZjymd());
// sjZjcsxx1.setZtxh(sgfambKcSggy.getZtxh());
// sjZjcsxx.setDy(sgfambKcSggy.getDy());
// sjZjcsxx.setFfp(sgfambKcSggy.getFfp());
// sjZjcsxx.setFfpcx(sgfambKcSggy.getFfpcx());
// sjZjcsxxMapper.updateSjZjcsxx(sjZjcsxx1);
// } else {
// sjZjcsxx.setZjzy(sgfambKcSggy.getZjzy());
// sjZjcsxx.setZjzs(sgfambKcSggy.getZjzs());
// sjZjcsxx.setZjpl(sgfambKcSggy.getZjpl());
// sjZjcsxx.setZjby(sgfambKcSggy.getZjby());
// sjZjcsxx.setZjzysx(sgfambKcSggy.getZjzysx());
// sjZjcsxx.setZjbysx(sgfambKcSggy.getZjbysx());
// sjZjcsxx.setZjzssx(sgfambKcSggy.getZjzssx());
// sjZjcsxx.setZjplsx(sgfambKcSggy.getZjplsx());
// sjZjcsxx.setCj(sgfambKcSggy.getCj());
// sjZjcsxx.setCc(sgfambKcSggy.getCc());
// sjZjcsxx.setSy(sgfambKcSggy.getSy());
// sjZjcsxx.setYj(sgfambKcSggy.getYj());
// sjZjcsxx.setZjymd(sgfambKcSggy.getZjymd());
// sjZjcsxx.setZtxh(sgfambKcSggy.getZtxh());
// sjZjcsxx.setDy(sgfambKcSggy.getDy());
// sjZjcsxx.setFfp(sgfambKcSggy.getFfp());
// sjZjcsxx.setFfpcx(sgfambKcSggy.getFfpcx());
// sjZjcsxxMapper.insertSjZjcsxx(sjZjcsxx);
// }
// //钻头参数信息
// SjZtcsxx sjZtcsxx = new SjZtcsxx();
// sjZtcsxx.setJh(sjDjjc.getJh());
// sjZtcsxx.setKc(sgfambKcSggy.getKc());
// sjZtcsxx.setLb("高指标井推荐");
// sjZtcsxx.setDy(sgfambKcSggy.getDy());
// sjZtcsxx.setZtxh(sgfambKcSggy.getZtxh());
// sjZtcsxx.setSy(sgfambKcSggy.getSy());
// sjZtcsxx.setFfp(sgfambKcSggy.getFfp());
// sjZtcsxx.setFfpcx(sgfambKcSggy.getFfpcx());
// sjZtcsxxMapper.deleteSjZtcsxxByJhAndKcAndlb(sjZtcsxx);
// sjZtcsxxMapper.insertSjZtcsxx(sjZtcsxx);
}
}
...
...
@@ -727,21 +712,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
param
.
setJdzzb
(
sjDjjc
.
getJdzzb
());
param
.
setJh
(
null
);
//保存邻井
// List<Ljjw> ljjwList = djdcService.getLjjwList(param);
// List<SjLjjw> sjLjjwList=new ArrayList<>();
// ljjwList.forEach(item->{
// SjLjjw sjLjjw=new SjLjjw();
// BeanUtils.copyProperties(item,sjLjjw);
// sjLjjw.setJh(jh);
// sjLjjw.setLjjh(item.getJh());
// sjLjjwList.add(sjLjjw);
// });
// if(sjLjjwList.size()>0){
// sjLjjwMapper.deleteSjLjjwByJh(jh);
// sjLjjwMapper.insertSjLjjwBatch(sjLjjwList);
//
// }
CommonParam
param1
=
new
CommonParam
();
param1
.
setJh
(
ljjh
);
param1
.
setQk
(
sjDjjc
.
getQk
());
...
...
@@ -749,9 +719,22 @@ public class SjDjjcServiceImpl implements ISjDjjcService
List
<
DjZqsjfx
>
zqshfxList
=
djdcService
.
getZqshfxList
(
param1
);
List
<
SjZqfx
>
sjZqfxList
=
new
ArrayList
<>();
zqshfxList
.
forEach
(
item
->{
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
SjZqfx
sjZqfx
=
new
SjZqfx
();
BeanUtils
.
copyProperties
(
item
,
sjZqfx
);
sjZqfx
.
setJh
(
jh
);
sjZqfx
.
setKc
(
kc
);
sjZqfx
.
setLjjh
(
item
.
getJh
());
sjZqfx
.
setCw
(
item
.
getCw
());
sjZqfx
.
setZjzq
(
item
.
getZjzq
());
...
...
@@ -763,6 +746,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZqfx
.
setWjsczq
(
item
.
getWjsczq
());
sjZqfx
.
setZjycms
(
item
.
getZjycms
());
sjZqfx
.
setWjycms
(
item
.
getWjycms
());
sjZqfxList
.
add
(
sjZqfx
);
});
if
(
sjZqfxList
.
size
()>
0
){
...
...
@@ -778,6 +762,19 @@ public class SjDjjcServiceImpl implements ISjDjjcService
BeanUtils
.
copyProperties
(
item
,
sjZtgjsj
);
sjZtgjsj
.
setJh
(
jh
);
sjZtgjsj
.
setLjjh
(
item
.
getJh
());
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
sjZtgjsj
.
setKc
(
kc
);
sjZtgjsjList
.
add
(
sjZtgjsj
);
});
if
(
sjZtgjsjList
.
size
()>
0
){
...
...
@@ -785,21 +782,65 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZtgjsjMapper
.
insertSjZtgjsjBatch
(
sjZtgjsjList
);
}
//区块钻头分析
List
<
SjQkztfx
>
sjQkztfxList
=
new
ArrayList
<>();
CommonParam
commonParam
=
new
CommonParam
();
commonParam
.
setQk
(
sjDjjc
.
getQk
());
List
<
DjZtfx
>
djZtfxList
=
djdcService
.
getDjZtfxList
(
commonParam
);
List
<
SjQkztfx
>
sjQkztfxList
=
new
ArrayList
<>();
djZtfxList
.
forEach
(
item
->{
SjQkztfx
sjQkztfx
=
new
SjQkztfx
();
BeanUtils
.
copyProperties
(
item
,
sjQkztfx
);
sjQkztfx
.
setJh
(
jh
);
sjQkztfx
.
setLb
(
"区块"
);
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
sjQkztfx
.
setKc
(
kc
);
sjQkztfxList
.
add
(
sjQkztfx
);
});
//根据高指标井
commonParam
.
setJh
(
ljjh
);
commonParam
.
setQk
(
null
);
List
<
DjZtfx
>
djZtfxList2
=
djdcService
.
getDjZtfxList
(
commonParam
);
djZtfxList2
.
forEach
(
item
->{
SjQkztfx
sjQkztfx
=
new
SjQkztfx
();
BeanUtils
.
copyProperties
(
item
,
sjQkztfx
);
sjQkztfx
.
setJh
(
jh
);
sjQkztfx
.
setLb
(
"高指标"
);
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
sjQkztfx
.
setKc
(
kc
);
sjQkztfxList
.
add
(
sjQkztfx
);
});
if
(
sjQkztfxList
.
size
()>
0
){
sjQkztfxMapper
.
deleteSjQkztfxByJh
(
jh
);
sjQkztfxMapper
.
insertSjQkztfxBatch
(
sjQkztfxList
);
}
//实钻分析结果
SjJsjg
sjJsjg
=
new
SjJsjg
();
sjJsjg
.
setJh
(
jh
);
...
...
@@ -820,15 +861,25 @@ public class SjDjjcServiceImpl implements ISjDjjcService
SjSzfxjg
sjSzfxjg
=
new
SjSzfxjg
();
BeanUtils
.
copyProperties
(
item
,
sjSzfxjg
);
sjSzfxjg
.
setJh
(
jh
);
String
kc
=
item
.
getFxfw
();
if
(
kc
.
equals
(
"1开"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2开"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3开"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4开"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5开"
)){
kc
=
"五开"
;
}
sjSzfxjg
.
setFxfw
(
kc
);
sjSzfxjgList
.
add
(
sjSzfxjg
);
});
if
(
sjSzfxjgList
.
size
()>
0
){
sjSzfxjgMapper
.
deleteSjSzfxjgByJh
(
jh
);
sjSzfxjgMapper
.
insertSjSzfxjgBatch
(
sjSzfxjgList
);
}
return
AjaxResult
.
success
();
}
...
...
@@ -844,11 +895,11 @@ public class SjDjjcServiceImpl implements ISjDjjcService
List
<
SjLjtjzt
>
sjLjtjztList
=
new
ArrayList
<>();
SjDjjc
sjDjjc
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
List
<
SgfambKcSggy
>
sgfambKcSggyList
=
sgfambKcSggyMapper
.
selectSgfambKcSggyListByQk
(
new
SgfambKcSggy
());
List
<
SgfambKcSggy
>
sggyList
=
new
ArrayList
<>();
if
(
sjDjjc
.
getFaid
()!=
null
){
sggyList
=
sgfambKcSggyList
.
stream
().
filter
(
sgfambKcSggy
->
sgfambKcSggy
.
getZbid
().
toString
().
equals
(
sjDjjc
.
getFaid
().
toString
())).
collect
(
Collectors
.
toList
());
}
//
List<SgfambKcSggy> sgfambKcSggyList=sgfambKcSggyMapper.selectSgfambKcSggyListByQk(new SgfambKcSggy());
//
List<SgfambKcSggy> sggyList = new ArrayList<>();
//
if(sjDjjc.getFaid()!=null){
//
sggyList = sgfambKcSggyList.stream().filter(sgfambKcSggy -> sgfambKcSggy.getZbid().toString().equals(sjDjjc.getFaid().toString())).collect(Collectors.toList());
//
}
double
ksjs
=
0
;
...
...
@@ -862,7 +913,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
final
int
kc
=
i
+
1
;
//查询钻头关键数据
List
<
SjZtgjsj
>
collect
=
sjZtgjsjList
.
stream
()
.
filter
(
it
->
String
.
valueOf
(
kc
).
equals
(
it
.
getKc
()))
.
filter
(
it
->
sjJsjg1
.
getKc
(
).
equals
(
it
.
getKc
()))
.
sorted
(
Comparator
.
comparing
(
SjZtgjsj:
:
getJxzs
,
Comparator
.
nullsLast
(
Comparator
.
reverseOrder
())))
.
collect
(
Collectors
.
toList
());
...
...
@@ -893,85 +944,35 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
sjLjtjztList
.
add
(
sjLjtjzt
);
});
//
SgfambKcSggy
sgfambKcSggy
=
sggyList
.
stream
().
filter
(
it
->
it
.
getKc
().
equals
(
sjJsjg1
.
getKc
())).
findFirst
().
orElse
(
null
);
if
(
sgfambKcSggy
!=
null
){
//概要施工参数
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
(
);
sjSggyZjzhcs
.
setJh
(
jh
);
sjSggyZjzhcs
.
setKc
(
sjJsjg1
.
getKc
());
sjSggyZjzhcs
.
setJd
(
ksjs
+
"-"
+
sjJsjg1
.
getJs
());
sjSggyZjzhcs
.
setZtxh
(
sgfambKcSggy
.
getZtxh
());
sjSggyZjzhcs
.
setCc
(
sgfambKcSggy
.
getCc
());
sjSggyZjzhcs
.
setSy
(
sgfambKcSggy
.
getSy
());
sjSggyZjzhcs
.
setZjymd
(
sgfambKcSggy
.
getZjymd
());
sjSggyZjzhcs
.
setZjpl
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjplsx
())?
sgfambKcSggy
.
getZjpl
()+
"-"
+
sgfambKcSggy
.
getZjplsx
():
sgfambKcSggy
.
getZjpl
());
sjSggyZjzhcs
.
setZjby
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjbysx
())?
sgfambKcSggy
.
getZjby
()+
"-"
+
sgfambKcSggy
.
getZjbysx
():
sgfambKcSggy
.
getZjby
());
sjSggyZjzhcs
.
setZjjg
(
sgfambKcSggy
.
getZjzh
());
sjSggyZjzhcs
.
setCj
(
sgfambKcSggy
.
getC
j
());
sjSggyZjzhcs
.
setYj
(
sgfambKcSggy
.
getYj
());
sjSggyZjzhcs
.
setZjzy
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjzysx
())?
sgfambKcSggy
.
getZjzy
()+
"-"
+
sgfambKcSggy
.
getZjzysx
():
sgfambKcSggy
.
getZjzy
());
sjSggyZjzhcs
.
setZjzs
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjzssx
())?
sgfambKcSggy
.
getZjzs
()+
"-"
+
sgfambKcSggy
.
getZjzssx
():
sgfambKcSggy
.
getZjzs
()
);
sjSggyZjzhcsMapper
.
deleteSjSggyZjzhcsB
yZjzhcs
(
sjSggyZjzhcs
);
sjSggyZjzhcsMapper
.
insertSjSggyZjzhcs
(
sjSggyZjzhcs
);
}
// SgfambKcSggy sgfambKcSggy=sggyList.stream().filter(it->it.getKc().equals(sjJsjg1.getKc())).findFirst().orElse(null);
// if(sgfambKcSggy!=null){
// //概要施工参数
// SjSggyZjzhcs sjSggyZjzhcs=new SjSggyZjzhcs();
// sjSggyZjzhcs.setJh(jh
);
// sjSggyZjzhcs.setKc(sjJsjg1.getKc()
);
// sjSggyZjzhcs.setJd(ksjs+"-"+sjJsjg1.getJs
());
// sjSggyZjzhcs.setZtxh(sgfambKcSggy.getZtxh
());
// sjSggyZjzhcs.setCc(sgfambKcSggy.getCc
());
// sjSggyZjzhcs.setSy(sgfambKcSggy.getSy
());
// sjSggyZjzhcs.setZjymd(sgfambKcSggy.getZjymd
());
// sjSggyZjzhcs.setZjpl(StringUtils.isNotEmpty(sgfambKcSggy.getZjplsx())?sgfambKcSggy.getZjpl()+"-"+sgfambKcSggy.getZjplsx():sgfambKcSggy.getZjpl
());
// sjSggyZjzhcs.setZjby(StringUtils.isNotEmpty(sgfambKcSggy.getZjbysx())?sgfambKcSggy.getZjby()+"-"+sgfambKcSggy.getZjbysx():sgfambKcSggy.getZjby
());
// sjSggyZjzhcs.setZjjg(sgfambKcSggy.getZjzh
());
// sjSggyZjzhcs.setCj(sgfambKcSggy.getCj
());
// sjSggyZjzhcs.setYj(sgfambKcSggy.getY
j());
// sjSggyZjzhcs.setZjzy(StringUtils.isNotEmpty(sgfambKcSggy.getZjzysx())?sgfambKcSggy.getZjzy()+"-"+sgfambKcSggy.getZjzysx():sgfambKcSggy.getZjzy
());
// sjSggyZjzhcs.setZjzs(StringUtils.isNotEmpty(sgfambKcSggy.getZjzssx())?sgfambKcSggy.getZjzs()+"-"+sgfambKcSggy.getZjzssx():sgfambKcSggy.getZjzs
());
// sjSggyZjzhcsMapper.deleteSjSggyZjzhcsByZjzhcs(sjSggyZjzhcs
);
// sjSggyZjzhcsMapper.insertSjSgg
yZjzhcs(sjSggyZjzhcs);
// }
if
(
collect
.
size
()>
0
){
SjZtgjsj
sjZtgjsj1
=
collect
.
get
(
0
);
sjZtxx
.
setJh
(
jh
);
sjZtxx
.
setLb
(
"邻井推荐"
);
sjZtxx
.
setKc
(
sjJsjg1
.
getKc
());
sjZtxx
.
setZtxh
(
collect
.
get
(
0
).
getZtxh
());
sjZtxxMapper
.
deleteSjZtxxByZtxx
(
sjZtxx
);
sjZtxxMapper
.
insertSjZtxx
(
sjZtxx
);
//施工参数
// SjZjcsxx sjZjcsxx =new SjZjcsxx();
// sjZjcsxx.setJh(jh);
// sjZjcsxx.setKc(sjJsjg1.getKc());
// sjZjcsxx.setJd(ksjs+"-"+sjJsjg1.getJs());
// sjZjcsxx.setZtxh(sjZtgjsj1.getZtxh());
// sjZjcsxx.setCc(sjZtgjsj1.getZtcc()+"");
// sjZjcsxx.setSy(sjZtgjsj1.getPz()+"");
// sjZjcsxx.setZjymd(sjZtgjsj1.getZjymd()+"");
// sjZjcsxx.setZjpl(sjZtgjsj1.getPl()+"");
// sjZjcsxx.setZjby(sjZtgjsj1.getLgby()+"");
// //查询厂家
// Djjc djjc = new Djjc();
// djjc.setJh(sjZtgjsj1.getLjjh());
// djjc.setKc(kc+"");
// djjc.setJd(sjZtgjsj1.getJd());
// djjc.setJxzs(sjZtgjsj1.getJxzs());
// Djjc djjc1=djdcService.selectZtsj(djjc);
// if(djjc1!=null){
// sjZjcsxx.setCj(djjc1.getCj());
// sjZjcsxx.setYj(djjc1.getZtyj()+"");
// sjZjcsxx.setZjzy(djjc1.getZy());
// sjZjcsxx.setZjzs(djjc1.getZs()+"");
// }
// sjZjcsxxMapper.deleteSjZjcsxxByZjcsxx(sjZjcsxx);
// sjZjcsxxMapper.insertSjZjcsxx(sjZjcsxx);
// Jsfa jsfa =new Jsfa();
// jsfa.setJh(sjZtgjsj1.getLjjh());
// jsfa.setZjjd(sjZtgjsj1.getJd());
// Jsfa jsfa1=jsaaMapper.selectJsfa(jsfa);
// String zjzh="";
// if(jsfa1!=null){
// zjzh = jsfa1.getZjzh();
// }
// SjFdsgcs sjFdsgcs =new SjFdsgcs();
// sjFdsgcs.setJh(jh);
// sjFdsgcs.setKc(sjJsjg1.getKc());
// SjFdsgcs sjFdsgcs1 = sjFdsgcsMapper.selectSjFdsgcsByJhAndKc(sjFdsgcs);
// if(sjFdsgcs1!=null){
// sjFdsgcs1.setZjzh(zjzh);
// sjFdsgcsMapper.updateSjFdsgcs(sjFdsgcs1);
// }else {
// sjFdsgcs1=new SjFdsgcs();
// sjFdsgcs1.setJh(jh);
// sjFdsgcs1.setKc(sjJsjg1.getKc());
// sjFdsgcs1.setZjzh(zjzh);
// sjFdsgcsMapper.insertSjFdsgcs(sjFdsgcs1);
// }
}
}
if
(
sjLjtjztList
.
size
()>
0
){
...
...
@@ -1004,7 +1005,19 @@ public class SjDjjcServiceImpl implements ISjDjjcService
for
(
DjZjzhfx
it:
zjzhfxList
)
{
SjFdsgcsLjzjzh
sjFdsgcsLjzjzh
=
new
SjFdsgcsLjzjzh
();
sjFdsgcsLjzjzh
.
setJh
(
param
.
getJh
());
sjFdsgcsLjzjzh
.
setKc
(
it
.
getKc
());
String
kc
=
it
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
sjFdsgcsLjzjzh
.
setKc
(
kc
);
sjFdsgcsLjzjzh
.
setLjjh
(
it
.
getJh
());
sjFdsgcsLjzjzh
.
setZjzh
(
it
.
getZjzh
());
sjFdsgcsLjzjzh
.
setSx
(
it
.
getZb
());
...
...
@@ -1025,16 +1038,31 @@ public class SjDjjcServiceImpl implements ISjDjjcService
//查询附近邻井
String
jh
=
sjDjjc
.
getJh
();
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
sjJygjGdsjgdcs
.
setJh
(
jh
);
List
<
SjJygjGdsjgdcs
>
sjJygjGdsjgdcsList
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
if
(
sjDjjc1
!=
null
){
if
(
sjDjjc1
.
getJdhzb
()!=
null
&&
sjDjjc1
.
getJdzzb
()!=
null
){
CommonParam
param
=
new
CommonParam
();
param
.
setJkhzb
(
sjDjjc1
.
getJkhzb
());
param
.
setJkzzb
(
sjDjjc1
.
getJkzzb
());
param
.
setJl
(
3000.0
);
param
.
setWjsjks
(
"2020"
);
param
.
setWjsjjs
(
"2025"
);
param
.
setQk
(
sjDjjc1
.
getQk
());
// 获取当前日期
LocalDate
currentDate
=
LocalDate
.
now
();
// 获取四年前的日期
LocalDate
fourYearsAgo
=
currentDate
.
minusYears
(
4
);
// 定义格式化器
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
// 格式化日期
String
formattedDate
=
fourYearsAgo
.
format
(
formatter
);
param
.
setWjsjks
(
formattedDate
);
param
.
setWjsjjs
(
DateUtils
.
parseDateToStr
(
"yyyy"
,
new
Date
()));
List
<
Ljjw
>
ljjwList
=
djdcService
.
getLjjwList2
(
param
);
List
<
String
>
collect
=
ljjwList
.
stream
().
limit
(
20
).
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
ljjwList
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()>
0
){
CommonParam
param2
=
new
CommonParam
();
String
jhs
=
String
.
join
(
","
,
collect
);
...
...
@@ -1060,13 +1088,12 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
list2
.
size
()>
0
){
List
<
String
>
collect2
=
list2
.
stream
().
distinct
().
limit
(
5
).
collect
(
Collectors
.
toList
());
map
.
put
(
"gzbjhList"
,
collect2
);
String
[]
collect2Array
=
list2
.
stream
().
distinct
().
limit
(
5
).
toArray
(
String
[]::
new
);
param
.
setJhs
(
collect2Array
);
param
.
setJdhzb
(
sjDjjc1
.
getJkhzb
());
param
.
setJdzzb
(
sjDjjc1
.
getJkzzb
());
List
<
Ljjw
>
ljjwList2
=
djdcService
.
getLjjwList3
(
param
);
map
.
put
(
"gzbjhList"
,
ljjwList2
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
()));
map
.
put
(
"gzbjhJson"
,
ljjwList2
);
}
else
{
map
.
put
(
"gzbjhList"
,
new
ArrayList
<>());
...
...
@@ -1077,16 +1104,36 @@ 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
());
map
.
put
(
"fzsgjhList"
,
collect1
.
stream
().
distinct
().
limit
(
5
).
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
<>());
}
//附近方位井
String
[]
strings
=
ljjwList
.
stream
().
map
(
Ljjw:
:
getJh
).
toArray
(
String
[]::
new
);
CommonParam
commonParam
=
new
CommonParam
();
commonParam
.
setJhs
(
strings
);
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
<>());
}
return
AjaxResult
.
success
(
map
);
}
else
{
...
...
@@ -1100,20 +1147,45 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
}
@Autowired
private
SjJygjGdsjgdcsMapper
sjJygjGdsjgdcsMapper
;
@Autowired
private
DjdcInfoMapper
djdcInfoMapper
;
@Autowired
private
JsqaMapper
jsqaMapper
;
@Override
public
int
getGzbjList
(
String
jh
)
throws
Exception
{
//查询附近邻井
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjJygjGdsjgdcs
sjJygjGdsjgdcs
=
new
SjJygjGdsjgdcs
();
sjJygjGdsjgdcs
.
setJh
(
jh
);
List
<
SjJygjGdsjgdcs
>
sjJygjGdsjgdcsList
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
if
(
sjDjjc1
!=
null
){
if
(
sjDjjc1
.
getJ
dhzb
()!=
null
&&
sjDjjc1
.
getJd
zzb
()!=
null
){
if
(
sjDjjc1
.
getJ
khzb
()!=
null
&&
sjDjjc1
.
getJk
zzb
()!=
null
){
CommonParam
param
=
new
CommonParam
();
param
.
setJkhzb
(
sjDjjc1
.
getJkhzb
());
param
.
setJkzzb
(
sjDjjc1
.
getJkzzb
());
param
.
setJl
(
3000.0
);
param
.
setWjsjks
(
"2020"
);
param
.
setWjsjjs
(
"2025"
);
param
.
setQk
(
sjDjjc1
.
getQk
());
// 获取当前日期
LocalDate
currentDate
=
LocalDate
.
now
();
// 获取四年前的日期
LocalDate
fourYearsAgo
=
currentDate
.
minusYears
(
4
);
// 定义格式化器
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
// 格式化日期
String
formattedDate
=
fourYearsAgo
.
format
(
formatter
);
param
.
setWjsjks
(
formattedDate
);
param
.
setWjsjjs
(
DateUtils
.
parseDateToStr
(
"yyyy"
,
new
Date
()));
List
<
Ljjw
>
ljjwList
=
djdcService
.
getLjjwList2
(
param
);
List
<
String
>
collect
=
ljjwList
.
stream
().
limit
(
20
).
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
ljjwList
.
stream
().
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
());
if
(
collect
.
size
()>
0
){
CommonParam
param2
=
new
CommonParam
();
String
jhs
=
String
.
join
(
","
,
collect
);
...
...
@@ -1132,38 +1204,85 @@ public class SjDjjcServiceImpl implements ISjDjjcService
.
collect
(
Collectors
.
toList
())
));
}
//附近高指标井
List
<
String
>
list2
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
List
<
DjZqsjfx
>>
entry
:
result
.
entrySet
())
{
List
<
DjZqsjfx
>
value
=
entry
.
getValue
();
list2
.
addAll
(
value
.
stream
().
map
(
DjZqsjfx:
:
getJh
).
collect
(
Collectors
.
toList
()));
}
List
<
SjLjjw
>
sjLjjwList
=
new
ArrayList
<>();
if
(
list2
.
size
()>
0
){
//保存邻井
String
[]
collect2Array
=
list2
.
stream
().
distinct
().
limit
(
5
).
toArray
(
String
[]::
new
);
param
.
setJhs
(
collect2Array
);
param
.
setJdhzb
(
sjDjjc1
.
getJkhzb
());
param
.
setJdzzb
(
sjDjjc1
.
getJkzzb
());
List
<
Ljjw
>
ljjwList2
=
djdcService
.
getLjjwList3
(
param
);
List
<
SjLjjw
>
sjLjjwList
=
new
ArrayList
<>();
ljjwList2
.
forEach
(
item
->{
SjLjjw
sjLjjw
=
new
SjLjjw
();
BeanUtils
.
copyProperties
(
item
,
sjLjjw
);
sjLjjw
.
setJh
(
jh
);
sjLjjw
.
setLjjh
(
item
.
getJh
());
sjLjjw
.
setLb1
(
"附近高指标井"
);
sjLjjw
.
setLb2
(
"推荐"
);
sjLjjwList
.
add
(
sjLjjw
);
});
if
(
sjLjjwList
.
size
()>
0
){
sjLjjwMapper
.
deleteSjLjjwByJh
(
jh
);
sjLjjwMapper
.
insertSjLjjwBatch
(
sjLjjwList
);
}
CommonParam
commonParam
=
new
CommonParam
();
commonParam
.
setQk
(
sjDjjc1
.
getQk
());
commonParam
.
setSjjh
(
jh
);
commonParam
.
setJh
(
String
.
join
(
","
,
list2
));
saveLjzl
(
commonParam
);
}
//附近方位井
String
[]
strings
=
ljjwList
.
stream
().
map
(
Ljjw:
:
getJh
).
toArray
(
String
[]::
new
);
CommonParam
commonParam
=
new
CommonParam
();
commonParam
.
setJhs
(
strings
);
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
);
ljjwList2
.
forEach
(
item
->{
SjLjjw
sjLjjw
=
new
SjLjjw
();
BeanUtils
.
copyProperties
(
item
,
sjLjjw
);
sjLjjw
.
setJh
(
jh
);
sjLjjw
.
setLjjh
(
item
.
getJh
());
sjLjjw
.
setLb1
(
"附近方位井"
);
sjLjjw
.
setLb2
(
"推荐"
);
sjLjjwList
.
add
(
sjLjjw
);
});
}
//附近复杂事故井
Jsqa
jsqa
=
new
Jsqa
();
jsqa
.
setJhs
(
collect
);
List
<
Jsqa
>
jsqaList
=
jsqaMapper
.
getJsqaByjhAndJs
(
jsqa
);
if
(
jsqaList
.
size
()>
0
){
String
[]
collect2Array
=
jsqaList
.
stream
().
map
(
Jsqa:
:
getJh
).
toArray
(
String
[]::
new
);
param
.
setJhs
(
collect2Array
);
List
<
Ljjw
>
ljjwList2
=
djdcService
.
getLjjwList3
(
param
);
ljjwList2
.
forEach
(
item
->{
SjLjjw
sjLjjw
=
new
SjLjjw
();
BeanUtils
.
copyProperties
(
item
,
sjLjjw
);
sjLjjw
.
setJh
(
jh
);
sjLjjw
.
setLjjh
(
item
.
getJh
());
sjLjjw
.
setLb1
(
"附近复杂故障井"
);
sjLjjw
.
setLb2
(
"推荐"
);
sjLjjwList
.
add
(
sjLjjw
);
});
}
//保存
if
(
sjLjjwList
.
size
()>
0
){
sjLjjwMapper
.
deleteSjLjjwByJh
(
jh
);
sjLjjwMapper
.
insertSjLjjwBatch
(
sjLjjwList
);
}
}
}
}
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
View file @
ec004008
package
com
.
zjsgfa
.
project
.
zjsgfa
.
service
.
impl
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.codec.Base64
;
import
com.zjsgfa.common.utils.DateUtils
;
import
com.zjsgfa.common.utils.StringUtils
;
import
com.zjsgfa.project.zjsgfa.domain.*
;
import
com.zjsgfa.project.zjsgfa.mapper.*
;
...
...
@@ -138,24 +138,18 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
List
<
String
>
strs
=
new
ArrayList
<>();
sjFdsgcs2
.
forEach
(
item
->{
if
(
StringUtils
.
isNotEmpty
(
item
.
getGjyh
())){
if
(
item
.
getKc
().
equals
(
sjFdsgcs
.
getKc
())){
strs
.
add
(
"<p>"
+
item
.
getKc
()+
"</p>:"
+
s
);
}
else
{
strs
.
add
(
"<p>"
+
item
.
getKc
()+
"</p>:"
+
item
.
getGjyh
());
}
}
});
if
(
sjSggyGjsbxnyqs
.
size
()>
0
){
SjSggyGjsbxnyq
sjSggyGjsbxnyq1
=
sjSggyGjsbxnyqs
.
get
(
0
);
// String sjyh=sjFdsgcs.getKc()+":"+s;
// String[] split = sjSggyGjsbxnyq1.getSjyh().split(";");
// List<String> collect = Arrays.stream(split).distinct().collect(Collectors.toList());
// collect.add(sjyh);
// sjSggyGjsbxnyq1.setSjyh(String.join(";",collect));
sjSggyGjsbxnyq1
.
setSjyh
(
String
.
join
(
";"
,
strs
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())));
sjSggyGjsbxnyqMapper
.
updateSjSggyGjsbxnyq
(
sjSggyGjsbxnyq1
);
...
...
@@ -195,20 +189,47 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
if
(
StringUtils
.
isNotEmpty
(
sjFdsgcs
.
getZjzh
())){
String
s
=
new
String
(
Base64
.
decode
(
sjFdsgcs
.
getZjzh
()),
StandardCharsets
.
UTF_8
);
sjFdsgcs
.
setZjzh
(
s
);
//
//查询井段信息
SjJsjg
sjJsjg
=
new
SjJsjg
();
sjJsjg
.
setJh
(
sjFdsgcs
.
getJh
());
List
<
SjJsjg
>
sjJsjgList
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
double
ksjs
=
0
;
String
jd
=
""
;
for
(
int
i
=
0
;
i
<
sjJsjgList
.
size
();
i
++)
{
SjJsjg
sjJsjg1
=
sjJsjgList
.
get
(
i
);
if
(
sjFdsgcs
.
getKc
().
equals
(
sjJsjg1
.
getKc
())){
if
(
i
==
0
)
{
ksjs
=
0
;
}
else
{
ksjs
=
sjJsjgList
.
get
(
i
-
1
).
getJs
();
}
jd
=
ksjs
+
"-"
+
sjJsjg1
.
getJs
();
}
}
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs
.
setJh
(
sjFdsgcs
.
getJh
());
sjSggyZjzhcs
.
setKc
(
sjFdsgcs
.
getKc
());
SjSggyZjzhcs
sjSggyZjzhcs1
=
sjSggyZjzhcsMapper
.
selectSjSggyZjzhcsByZjzhcs
(
sjSggyZjzhcs
);
if
(
sjSggyZjzhcs1
!=
null
){
sjSggyZjzhcs1
.
setZjjg
(
s
);
sjSggyZjzhcs1
.
setJd
(
jd
);
sjSggyZjzhcsMapper
.
updateSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
else
{
sjSggyZjzhcs1
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs1
.
setJh
(
sjFdsgcs
.
getJh
());
sjSggyZjzhcs1
.
setKc
(
sjFdsgcs
.
getKc
());
sjSggyZjzhcs1
.
setJd
(
jd
);
sjSggyZjzhcs1
.
setZjjg
(
s
);
sjSggyZjzhcsMapper
.
insertSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
}
if
(
StringUtils
.
isNotEmpty
(
sjFdsgcs
.
getZjzhzysx
())){
String
s
=
new
String
(
Base64
.
decode
(
sjFdsgcs
.
getZjzhzysx
()),
StandardCharsets
.
UTF_8
);
sjFdsgcs
.
setZjzhzysx
(
s
);
}
return
sjFdsgcsMapper
.
updateSjFdsgcs
(
sjFdsgcs
);
}
...
...
@@ -276,17 +297,6 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
commonParam
.
setJhs
(
jhs
);
commonParam
.
setFw
(
sjJygjGdsjgdcsList
.
get
(
0
).
getFw
());
djZqsjfxList
=
djdcInfoMapper
.
getjskd
(
commonParam
);
//如果获取的方位相同的井列表不为空
// if (djZqsjfxList.size() > 0){
// ///获取所有井的造斜规律数据
// CommonParam commonParam1 = new CommonParam();
// String[] jhs2=new String[djZqsjfxList.size()];
// for (int i = 0; i < djZqsjfxList.size(); i++) {
// jhs2[i]=djZqsjfxList.get(i).getJh();
// }
// commonParam1.setJhs(jhs2);
// jskdList= djdcService.getJskdList(commonParam1);
// }
}
...
...
@@ -340,9 +350,9 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
zyfx
=
zyfx
+
"<p>邻井风险<p>"
;
List
<
String
>
fzqk
=
new
ArrayList
<>();
//查询一趟钻率
int
kc1
=
i
+
1
;
List
<
SjQkztfx
>
collect2
=
sjQkztfxes
.
stream
().
filter
(
it
->
StringUtils
.
isNotEmpty
(
it
.
getKc
())).
collect
(
Collectors
.
toList
());
List
<
SjQkztfx
>
collect1
=
collect2
.
stream
().
filter
(
it
->
it
.
getKc
().
equals
(
kc
1
+
""
)).
collect
(
Collectors
.
toList
());
List
<
SjQkztfx
>
collect1
=
collect2
.
stream
().
filter
(
it
->
it
.
getKc
().
equals
(
kc
+
""
)).
collect
(
Collectors
.
toList
());
SjQkztfx
sjQkztfx1
=
collect1
.
stream
().
max
(
Comparator
.
comparing
(
SjQkztfx:
:
getYtzl
)).
get
();
Double
ytzl
=
0.0
;
if
(
sjQkztfx1
!=
null
){
...
...
@@ -439,10 +449,10 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
sjFdsgcs
.
setJdqk
(
previousDepth
+
"-"
+
cs
+
","
+
sjFdsgcsDcyxList
.
get
(
0
).
getDcmc
()+
"-"
+
sjFdsgcsDcyxList
.
get
(
sjFdsgcsDcyxList
.
size
()-
1
).
getDcmc
());
}
}
sjFdsgcs
.
setGj
yh
(
gjyh
);
sjFdsgcs
.
setGj
fx
(
gjyh
);
sjFdsgcsMapper
.
insertSjFdsgcs
(
sjFdsgcs
);
}
else
{
sjFdsgcs1
.
setGj
yh
(
gjyh
);
sjFdsgcs1
.
setGj
fx
(
gjyh
);
//查询是否有复杂情况
if
(
collect
.
size
()>
0
){
Jsqa
jsqa
=
new
Jsqa
();
...
...
@@ -551,8 +561,19 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
param
.
setJkhzb
(
sjDjjc
.
getJkhzb
());
param
.
setJkzzb
(
sjDjjc
.
getJkzzb
());
param
.
setJl
(
3000.0
);
param
.
setWjsjks
(
"2020"
);
param
.
setWjsjjs
(
"2025"
);
// 获取当前日期
LocalDate
currentDate
=
LocalDate
.
now
();
// 获取四年前的日期
LocalDate
fourYearsAgo
=
currentDate
.
minusYears
(
4
);
// 定义格式化器
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy"
);
// 格式化日期
String
formattedDate
=
fourYearsAgo
.
format
(
formatter
);
param
.
setWjsjks
(
formattedDate
);
param
.
setWjsjjs
(
DateUtils
.
parseDateToStr
(
"yyyy"
,
new
Date
()));
List
<
Ljjw
>
ljjwList
=
djdcService
.
getLjjwList2
(
param
);
List
<
String
>
ljjhlist
=
ljjwList
.
stream
().
limit
(
20
).
map
(
Ljjw:
:
getJh
).
collect
(
Collectors
.
toList
());
collect
.
addAll
(
ljjhlist
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjJsjgServiceImpl.java
View file @
ec004008
...
...
@@ -119,7 +119,7 @@ public class SjJsjgServiceImpl implements ISjJsjgService
Double
maxY
=
0.0
;
Double
maxX
=
0.0
;
if
(
sjJygjGdsjgdcsList
.
size
()>
0
){
maxY
=
sjJygjGdsjgdcsList
.
stream
().
map
(
SjJygjGdsjgdcs:
:
get
C
s
).
max
(
Double:
:
compare
).
get
();
maxY
=
sjJygjGdsjgdcsList
.
stream
().
map
(
SjJygjGdsjgdcs:
:
get
J
s
).
max
(
Double:
:
compare
).
get
();
maxX
=
sjJygjGdsjgdcsList
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getSpy
).
max
(
Double:
:
compare
).
get
();
}
...
...
@@ -130,7 +130,7 @@ public class SjJsjgServiceImpl implements ISjJsjgService
List
zxList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
sjJygjGdsjgdcsList
.
size
();
i
++){
SjJygjGdsjgdcs
jg
=
sjJygjGdsjgdcsList
.
get
(
i
);
Double
cs1
=
jg
.
get
C
s
();
Double
cs1
=
jg
.
get
J
s
();
Double
spy1
=
jg
.
getSpy
();
//填充中心线
Map
zxmap
=
new
HashMap
();
...
...
@@ -177,7 +177,7 @@ public class SjJsjgServiceImpl implements ISjJsjgService
for
(
int
k
=
0
;
k
<
collect
.
size
();
k
++)
{
SjJygjGdsjgdcs
jg
=
collect
.
get
(
k
);
double
cs1
=
jg
.
get
C
s
();
double
cs1
=
jg
.
get
J
s
();
double
spy1
=
jg
.
getSpy
();
//左侧
...
...
@@ -220,7 +220,7 @@ public class SjJsjgServiceImpl implements ISjJsjgService
Map
tczbqdmap1
=
new
HashMap
();
//起始y=水泥返高
//起始x
if
(
jg
.
get
C
s
().
doubleValue
()
>=
snfg
.
doubleValue
())
{
if
(
jg
.
get
J
s
().
doubleValue
()
>=
snfg
.
doubleValue
())
{
if
(
i
==
0
)
{
tczbqdmap1
.
put
(
"x"
,
Math
.
round
(
xa
-
100
));
tczbqdmap1
.
put
(
"y"
,
y
);
...
...
@@ -247,7 +247,7 @@ public class SjJsjgServiceImpl implements ISjJsjgService
Map
tczbqdmap2
=
new
HashMap
();
//起始y=水泥返高
//起始x
if
(
jg
.
get
C
s
().
doubleValue
()>=
snfg
.
doubleValue
()){
if
(
jg
.
get
J
s
().
doubleValue
()>=
snfg
.
doubleValue
()){
if
(
i
==
0
){
tczbqdmap2
.
put
(
"x"
,
xa2
+
100
);
tczbqdmap2
.
put
(
"y"
,
y
);
...
...
@@ -296,12 +296,13 @@ public class SjJsjgServiceImpl implements ISjJsjgService
}
else
{
index
=
collect
.
size
()/
2
;
}
SjJygjGdsjgdcs
dtJygjJg1
=
collect
.
get
(
index
);
SjJygjGdsjgdcs
dtJygjJg1
=
collect
.
get
(
collect
.
size
()-
1
);
Double
x
=
dtJygjJg1
.
getSpy
()+
500
;
Double
y
=
dtJygjJg1
.
getCs
();
Double
xa2
=
x
+
item
.
getZtzj
();
Double
y
=
item
.
getJs
();
// Double y= dtJygjJg1.getCs();
Double
xa2
=
x
;
double
[]
msqd
=
{
xa2
.
doubleValue
(),
y
.
doubleValue
()};
//起点
double
[]
mszd
={
xa2
.
doubleValue
()+
9
00
,
y
.
doubleValue
()};
//终点
double
[]
mszd
={
xa2
.
doubleValue
()+
4
00
,
y
.
doubleValue
()};
//终点
point
.
add
(
msqd
);
point
.
add
(
mszd
);
}
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjLjjwServiceImpl.java
View file @
ec004008
...
...
@@ -102,7 +102,7 @@ public class SjLjjwServiceImpl implements ISjLjjwService
List
<
SjLjjw
>
sjLjjws
=
sjLjjwMapper
.
selectSjLjjwList
(
sjLjjw
);
Set
<
String
>
jhSet
=
sjLjjws
.
stream
()
.
map
(
SjLjjw:
:
getLjjh
)
// 假设getJh()是获取井号的方法
.
map
(
SjLjjw:
:
getLjjh
)
.
collect
(
Collectors
.
toSet
());
List
<
SjLjjw
>
difference
=
list
.
stream
()
.
filter
(
item
->
!
jhSet
.
contains
(
item
.
getLjjh
()))
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjZjcsxxServiceImpl.java
View file @
ec004008
...
...
@@ -2,7 +2,10 @@ package com.zjsgfa.project.zjsgfa.service.impl;
import
java.util.List
;
import
com.zjsgfa.common.utils.StringUtils
;
import
com.zjsgfa.project.zjsgfa.domain.SjJsjg
;
import
com.zjsgfa.project.zjsgfa.domain.SjSggyZjzhcs
;
import
com.zjsgfa.project.zjsgfa.mapper.SjJsjgMapper
;
import
com.zjsgfa.project.zjsgfa.mapper.SjSggyZjzhcsMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -25,6 +28,10 @@ public class SjZjcsxxServiceImpl implements ISjZjcsxxService
@Autowired
private
SjSggyZjzhcsMapper
sjSggyZjzhcsMapper
;
@Autowired
private
SjJsjgMapper
sjJsjgMapper
;
/**
* 查询设计-钻具参数信息
*
...
...
@@ -58,6 +65,7 @@ public class SjZjcsxxServiceImpl implements ISjZjcsxxService
@Override
public
int
insertSjZjcsxx
(
SjZjcsxx
sjZjcsxx
)
{
return
sjZjcsxxMapper
.
insertSjZjcsxx
(
sjZjcsxx
);
}
...
...
@@ -70,37 +78,57 @@ public class SjZjcsxxServiceImpl implements ISjZjcsxxService
@Override
public
int
updateSjZjcsxx
(
SjZjcsxx
sjZjcsxx
)
{
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs
.
setJh
(
sjZjcsxx
.
getJh
());
sjSggyZjzhcs
.
setKc
(
sjZjcsxx
.
getKc
());
SjSggyZjzhcs
sjSggyZjzhcs1
=
sjSggyZjzhcsMapper
.
selectSjSggyZjzhcsByZjzhcs
(
sjSggyZjzhcs
);
//查询井段信息
SjJsjg
sjJsjg
=
new
SjJsjg
();
sjJsjg
.
setJh
(
sjZjcsxx
.
getJh
());
List
<
SjJsjg
>
sjJsjgList
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
double
ksjs
=
0
;
String
jd
=
""
;
for
(
int
i
=
0
;
i
<
sjJsjgList
.
size
();
i
++)
{
SjJsjg
sjJsjg1
=
sjJsjgList
.
get
(
i
);
if
(
sjZjcsxx
.
getKc
().
equals
(
sjZjcsxx
.
getKc
())){
if
(
i
==
0
)
{
ksjs
=
0
;
}
else
{
ksjs
=
sjJsjgList
.
get
(
i
-
1
).
getJs
();
}
jd
=
ksjs
+
"-"
+
sjJsjg1
.
getJs
();
}
}
if
(
sjSggyZjzhcs1
!=
null
){
sjSggyZjzhcs1
.
setJd
(
jd
);
sjSggyZjzhcs1
.
setZtxh
(
sjZjcsxx
.
getZtxh
());
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
()+
""
);
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
()+
""
);
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
()+
""
);
sjSggyZjzhcs1
.
setZjpl
(
sjZjcsxx
.
getZjpl
()+
""
);
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
());
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
());
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
());
sjSggyZjzhcs1
.
setCj
(
sjZjcsxx
.
getCj
());
sjSggyZjzhcs1
.
setYj
(
sjZjcsxx
.
getYj
());
sjSggyZjzhcs1
.
setZjzy
(
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjzy
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzysx
())?
sjZjcsxx
.
getZjzy
()+
"-"
+
sjZjcsxx
.
getZjzysx
():
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzssx
())?
sjZjcsxx
.
getZjzs
()+
"-"
+
sjZjcsxx
.
getZjzssx
():
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjbysx
())?
sjZjcsxx
.
getZjby
()+
"-"
+
sjZjcsxx
.
getZjbysx
():
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjpl
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjplsx
()
)?
sjZjcsxx
.
getZjpl
()+
"-"
+
sjZjcsxx
.
getZjplsx
()
:
sjZjcsxx
.
getZjpl
());
sjSggyZjzhcsMapper
.
updateSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
else
{
sjSggyZjzhcs1
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs1
.
setJh
(
sjZjcsxx
.
getJh
());
sjSggyZjzhcs1
.
setKc
(
sjZjcsxx
.
getKc
());
sjSggyZjzhcs1
.
setJd
(
sjZjcsxx
.
getJd
()
);
sjSggyZjzhcs1
.
setJd
(
jd
);
sjSggyZjzhcs1
.
setZtxh
(
sjZjcsxx
.
getZtxh
());
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
()+
""
);
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
()+
""
);
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
()+
""
);
sjSggyZjzhcs1
.
setZjpl
(
sjZjcsxx
.
getZjpl
()+
""
);
sjSggyZjzhcs1
.
setCc
(
sjZjcsxx
.
getCc
());
sjSggyZjzhcs1
.
setSy
(
sjZjcsxx
.
getSy
());
sjSggyZjzhcs1
.
setZjymd
(
sjZjcsxx
.
getZjymd
());
sjSggyZjzhcs1
.
setCj
(
sjZjcsxx
.
getCj
());
sjSggyZjzhcs1
.
setYj
(
sjZjcsxx
.
getYj
());
sjSggyZjzhcs1
.
setZjzy
(
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjzy
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzysx
())?
sjZjcsxx
.
getZjzy
()+
"-"
+
sjZjcsxx
.
getZjzysx
():
sjZjcsxx
.
getZjzy
());
sjSggyZjzhcs1
.
setZjzs
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjzssx
())?
sjZjcsxx
.
getZjzs
()+
"-"
+
sjZjcsxx
.
getZjzssx
():
sjZjcsxx
.
getZjzs
());
sjSggyZjzhcs1
.
setZjby
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjbysx
())?
sjZjcsxx
.
getZjby
()+
"-"
+
sjZjcsxx
.
getZjbysx
():
sjZjcsxx
.
getZjby
());
sjSggyZjzhcs1
.
setZjpl
(
StringUtils
.
isNotEmpty
(
sjZjcsxx
.
getZjplsx
()
)?
sjZjcsxx
.
getZjpl
()+
"-"
+
sjZjcsxx
.
getZjplsx
()
:
sjZjcsxx
.
getZjpl
());
sjSggyZjzhcsMapper
.
updateSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
int
i
=
sjZjcsxxMapper
.
updateSjZjcsxx
(
sjZjcsxx
);
...
...
src/main/java/com/zjsgfa/project/zt/domain/DjZqsjfx.java
View file @
ec004008
...
...
@@ -66,4 +66,6 @@ public class DjZqsjfx {
private
Double
hj
;
private
Double
fw
;
}
src/main/java/com/zjsgfa/project/zt/domain/Djjc.java
View file @
ec004008
...
...
@@ -64,7 +64,7 @@ public class Djjc {
private
Double
zjymd
;
//排量
@Excel
(
name
=
"排量"
)
private
Double
pl
;
private
String
pl
;
//泵压
@Excel
(
name
=
"泵压"
)
private
Double
lgby
;
...
...
src/main/java/com/zjsgfa/project/zt/domain/TimePointPair.java
View file @
ec004008
...
...
@@ -30,7 +30,8 @@ public class TimePointPair {
// 判断两个时间点之间是否跨天
public
boolean
isCrossDay
()
{
return
drillingTime
.
isBefore
(
previousTime
);
boolean
before
=
drillingTime
.
isBefore
(
previousTime
);
return
before
;
}
public
boolean
isCrossDay2
()
{
...
...
src/main/java/com/zjsgfa/project/zt/service/impl/DjdcServiceImpl.java
View file @
ec004008
...
...
@@ -340,7 +340,7 @@ public class DjdcServiceImpl implements DjdcService {
",是否跨天:"
+
pair
.
isCrossDay
());
String
formattedTime
=
pair
.
getDrillingTime
().
format
(
DateTimeFormatter
.
ISO_LOCAL_TIME
);
if
(
pair
.
isCrossDay
()){
if
(
!
pair
.
isCrossDay
()){
zwsj
=
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd"
,
jswaZwsj
.
getRq
())
+
" "
+
formattedTime
;
}
else
{
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
@@ -697,6 +697,19 @@ public class DjdcServiceImpl implements DjdcService {
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
DjZjzhfx
item:
list
){
String
zjzh
=
item
.
getZjzh
();
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
item
.
setKc
(
kc
);
// if(StringUtils.isNotEmpty(zjzh)){
// Map<String,Object> map=new HashMap<>();
// map.put("prompt",zjzh+" 这是一个钻具组合信息,请把这个钻具组合信息拆分成竖表," +
...
...
@@ -1581,6 +1594,21 @@ public class DjdcServiceImpl implements DjdcService {
param
.
setJhs
(
jhs
);
}
List
<
Jsha
>
jshaList
=
djdcInfoMapper
.
getFdcsList
(
param
);
jshaList
.
forEach
(
item
->
{
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
item
.
setKc
(
kc
);
});
return
jshaList
;
}
...
...
@@ -1956,6 +1984,22 @@ public class DjdcServiceImpl implements DjdcService {
}
List
<
LjGzbj
>
gzbjList
=
djdcInfoMapper
.
getGzbjList
(
param
);
List
<
LjGzbj
>
collect
=
gzbjList
.
stream
().
filter
(
it
->
it
.
getZb
()
!=
null
).
collect
(
Collectors
.
toList
());
for
(
LjGzbj
item:
collect
){
String
kc
=
item
.
getKc
();
if
(
kc
.
equals
(
"1"
)){
kc
=
"一开"
;
}
else
if
(
kc
.
equals
(
"2"
)){
kc
=
"二开"
;
}
else
if
(
kc
.
equals
(
"3"
)){
kc
=
"三开"
;
}
else
if
(
kc
.
equals
(
"4"
)){
kc
=
"四开"
;
}
else
if
(
kc
.
equals
(
"5"
)){
kc
=
"五开"
;
}
item
.
setKc
(
kc
);
}
return
collect
;
}
...
...
@@ -1983,6 +2027,7 @@ public class DjdcServiceImpl implements DjdcService {
List
<
String
>
collect
=
Arrays
.
stream
(
split
).
distinct
().
collect
(
Collectors
.
toList
());
item
.
setClgk
(
String
.
join
(
","
,
collect
));
}
}
...
...
src/main/resources/mybatis/zjsgfa/SjLjjwMapper.xml
View file @
ec004008
...
...
@@ -25,10 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"jdzzb"
column=
"jdzzb"
/>
<result
property=
"jdhjl"
column=
"jdhjl"
/>
<result
property=
"jdzjl"
column=
"jdzjl"
/>
<result
property=
"lb1"
column=
"lb1"
/>
<result
property=
"lb2"
column=
"lb2"
/>
</resultMap>
<sql
id=
"selectSjLjjwVo"
>
select id, jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq, jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl, jdhzb, jdzzb, jdhjl, jdzjl from sj_ljjw
select id, jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq, jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl, jdhzb, jdzzb, jdhjl, jdzjl
,lb2, lb1
from sj_ljjw
</sql>
<select
id=
"selectSjLjjwList"
parameterType=
"SjLjjw"
resultMap=
"SjLjjwResult"
>
...
...
@@ -83,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jdzzb != null"
>
jdzzb,
</if>
<if
test=
"jdhjl != null"
>
jdhjl,
</if>
<if
test=
"jdzjl != null"
>
jdzjl,
</if>
<if
test=
"lb1 != null"
>
lb1,
</if>
<if
test=
"lb2 != null"
>
lb2,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
#{jh},
</if>
...
...
@@ -104,6 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jdzzb != null"
>
#{jdzzb},
</if>
<if
test=
"jdhjl != null"
>
#{jdhjl},
</if>
<if
test=
"jdzjl != null"
>
#{jdzjl},
</if>
<if
test=
"lb1 != null"
>
#{lb1},
</if>
<if
test=
"lb2 != null"
>
#{lb2},
</if>
</trim>
</insert>
<insert
id=
"insertSjLjjwBatch"
>
...
...
@@ -112,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(
jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq,
jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl,
jdhzb, jdzzb, jdhjl, jdzjl
jdhzb, jdzzb, jdhjl, jdzjl
,lb1,lb2
)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -135,7 +141,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.jdhzb},
#{item.jdzzb},
#{item.jdhjl},
#{item.jdzjl}
#{item.jdzjl},
#{item.lb1},
#{item.lb2}
)
</foreach>
</insert>
...
...
@@ -162,6 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jdzzb != null"
>
jdzzb = #{jdzzb},
</if>
<if
test=
"jdhjl != null"
>
jdhjl = #{jdhjl},
</if>
<if
test=
"jdzjl != null"
>
jdzjl = #{jdzjl},
</if>
<if
test=
"lb1 != null"
>
lb1 = #{lb1},
</if>
<if
test=
"lb2 != null"
>
lb2 = #{lb2},
</if>
</trim>
where id = #{id}
</update>
...
...
src/main/resources/mybatis/zjsgfa/SjQkztfxMapper.xml
View file @
ec004008
...
...
@@ -22,10 +22,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"jxzsZw"
column=
"jxzs_zw"
/>
<result
property=
"jxzsMax"
column=
"jxzs_max"
/>
<result
property=
"qsjsZw"
column=
"qsjs_zw"
/>
<result
property=
"lb"
column=
"lb"
/>
</resultMap>
<sql
id=
"selectSjQkztfxVo"
>
select id, jh, kc, ztxh, cj, cc, ztsl, ytzl, etzl, stzl, sitzl, wtzl, jc_zw, jc_max, jxzs_zw, jxzs_max, qsjs_zw from sj_qkztfx
select id, jh, kc, ztxh, cj, cc, ztsl, ytzl, etzl, stzl, sitzl, wtzl, jc_zw, jc_max, jxzs_zw, jxzs_max, qsjs_zw
,lb
from sj_qkztfx
</sql>
<select
id=
"selectSjQkztfxList"
parameterType=
"SjQkztfx"
resultMap=
"SjQkztfxResult"
>
...
...
@@ -47,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jxzsZw != null "
>
and jxzs_zw = #{jxzsZw}
</if>
<if
test=
"jxzsMax != null "
>
and jxzs_max = #{jxzsMax}
</if>
<if
test=
"qsjsZw != null "
>
and qsjs_zw = #{qsjsZw}
</if>
<if
test=
"lb != null "
>
and lb = #{lb}
</if>
</where>
</select>
...
...
@@ -74,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jxzsZw != null"
>
jxzs_zw,
</if>
<if
test=
"jxzsMax != null"
>
jxzs_max,
</if>
<if
test=
"qsjsZw != null"
>
qsjs_zw,
</if>
<if
test=
"lb != null"
>
lb,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
#{jh},
</if>
...
...
@@ -92,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jxzsZw != null"
>
#{jxzsZw},
</if>
<if
test=
"jxzsMax != null"
>
#{jxzsMax},
</if>
<if
test=
"qsjsZw != null"
>
#{qsjsZw},
</if>
<if
test=
"lb != null"
>
#{lb},
</if>
</trim>
</insert>
<insert
id=
"insertSjQkztfxBatch"
>
...
...
@@ -99,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(
jh, kc, ztxh, cj, cc, ztsl,
ytzl, etzl, stzl, sitzl, wtzl,
jc_zw, jc_max, jxzs_zw, jxzs_max, qsjs_zw
jc_zw, jc_max, jxzs_zw, jxzs_max, qsjs_zw
,lb
)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -119,7 +124,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.jcMax},
#{item.jxzsZw},
#{item.jxzsMax},
#{item.qsjsZw}
#{item.qsjsZw},
#{item.lb}
)
</foreach>
...
...
@@ -144,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"jxzsZw != null"
>
jxzs_zw = #{jxzsZw},
</if>
<if
test=
"jxzsMax != null"
>
jxzs_max = #{jxzsMax},
</if>
<if
test=
"qsjsZw != null"
>
qsjs_zw = #{qsjsZw},
</if>
<if
test=
"lb != null"
>
lb = #{lb},
</if>
</trim>
where id = #{id}
</update>
...
...
src/main/resources/mybatis/zjsgfa/SjZjcsxxMapper.xml
View file @
ec004008
...
...
@@ -24,10 +24,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"zjzssx"
column=
"zjzssx"
/>
<result
property=
"zjplsx"
column=
"zjplsx"
/>
<result
property=
"zjbysx"
column=
"zjbysx"
/>
<result
property=
"dy"
column=
"dy"
/>
<result
property=
"ffp"
column=
"ffp"
/>
<result
property=
"ffpcx"
column=
"ffpcx"
/>
</resultMap>
<sql
id=
"selectSjZjcsxxVo"
>
select id, jh, kc, jd, ztxh, cj, cc, sy, yj, zjymd, zjzy, zjzs, zjpl, zjby, gtzj,zjzysx, zjzssx, zjplsx, zjbysx from sj_zjcsxx
select id, jh, kc, jd, ztxh, cj, cc, sy, yj, zjymd, zjzy, zjzs, zjpl, zjby, gtzj,zjzysx, zjzssx, zjplsx, zjbysx
, dy, ffp, ffpcx
from sj_zjcsxx
</sql>
<select
id=
"selectSjZjcsxxList"
parameterType=
"SjZjcsxx"
resultMap=
"SjZjcsxxResult"
>
...
...
@@ -80,6 +83,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"zjzssx != null"
>
zjzssx,
</if>
<if
test=
"zjplsx != null"
>
zjplsx,
</if>
<if
test=
"zjbysx != null"
>
zjbysx,
</if>
<if
test=
"dy != null"
>
dy,
</if>
<if
test=
"ffp != null"
>
ffp,
</if>
<if
test=
"ffpcx != null"
>
ffpcx,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
#{jh},
</if>
...
...
@@ -100,6 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"zjzssx != null"
>
#{zjzssx},
</if>
<if
test=
"zjplsx != null"
>
#{zjplsx},
</if>
<if
test=
"zjbysx != null"
>
#{zjbysx},
</if>
<if
test=
"dy != null"
>
#{dy},
</if>
<if
test=
"ffp != null"
>
#{ffp},
</if>
<if
test=
"ffpcx != null"
>
#{ffpcx},
</if>
</trim>
</insert>
...
...
@@ -123,7 +132,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"zjzysx != null"
>
zjzysx = #{zjzysx},
</if>
<if
test=
"zjzssx != null"
>
zjzssx = #{zjzssx},
</if>
<if
test=
"zjplsx != null"
>
zjplsx = #{zjplsx},
</if>
<if
test=
"zjbysx != null"
>
zjbysx = #{zjbysx}
</if>
<if
test=
"zjbysx != null"
>
zjbysx = #{zjbysx},
</if>
<if
test=
"dy != null"
>
dy = #{dy},
</if>
<if
test=
"ffp != null "
>
ffp = #{ffp},
</if>
<if
test=
"ffpcx != null "
>
ffpcx = #{ffpcx},
</if>
</trim>
where id = #{id}
</update>
...
...
src/main/resources/mybatis/zjsgfa/SjZtcsxxMapper.xml
View file @
ec004008
...
...
@@ -9,9 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"jh"
column=
"jh"
/>
<result
property=
"lb"
column=
"lb"
/>
<result
property=
"ztxh"
column=
"ztxh"
/>
<result
property=
"sy"
column=
"sy"
/>
<result
property=
"dy"
column=
"dy"
/>
<result
property=
"ffp"
column=
"ffp"
/>
<result
property=
"sy"
column=
"sy"
/>
<result
property=
"ffpcx"
column=
"ffpcx"
/>
<result
property=
"kc"
column=
"kc"
/>
</resultMap>
...
...
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
View file @
ec004008
...
...
@@ -618,7 +618,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
)jsha
on jsha.jh=ss.jh
and jsha.zzjs between ss.lag_js and
ss.js
on jsha.jh=ss.jh
and jsha.QSJS >= ss.lag_js and jsha.ZZJS
<
=
ss.js
)ss where kc is not null and ztxh is not null
group by ss.kc,ss.ztxh,ss.cc,ss.cj
</select>
...
...
@@ -902,7 +902,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LAG(SJDJSD2, 1, 0) OVER (PARTITION BY jh ORDER BY SJDJSD2) AS ksjs,
SJDJSD2,CW
FROM jsbb) c on a.JH=c.JH and NVL(a.LJCZJS,0)>=c.ksjs and NVL(a.LJCZJS,0)
<
c.SJDJSD2
left join jskc d on a.JH=d.jh
and a.xh=d.xh
left join jskc d on a.JH=d.jh
and a.xjs>=d.ksjs and a.XJS
<
d.jsjs
where 1=1
<if
test=
"jhs!=null"
>
and a.jh in
...
...
@@ -1023,6 +1023,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
</select>
<select
id=
"getJswaSum"
resultType=
"com.zjsgfa.project.zt.domain.vo.JswaVo"
>
...
...
src/main/resources/static/excel/sgfamb.docx
View file @
ec004008
No preview for this file type
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