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
b794f34d
Commit
b794f34d
authored
Dec 02, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
7fe6c4f7
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
223 additions
and
73 deletions
+223
-73
src/main/java/com/zjsgfa/framework/task/MxdyTask.java
+112
-40
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
+38
-22
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/MxfxjgbServiceImpl.java
+1
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SgfambKcSggyServiceImpl.java
+11
-0
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
+41
-3
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
+11
-6
src/main/resources/mybatis/zjsgfa/SjFdsgcsMapper.xml
+9
-2
src/main/resources/static/excel/sgfamb.docx
+0
-0
src/main/resources/static/excel/sgfamb251201.docx
+0
-0
No files found.
src/main/java/com/zjsgfa/framework/task/MxdyTask.java
View file @
b794f34d
package
com
.
zjsgfa
.
framework
.
task
;
import
cn.hutool.http.HttpException
;
import
cn.hutool.http.HttpRequest
;
import
com.alibaba.fastjson
2
.JSON
;
import
com.
google.gson.Gson
;
import
com.google.gson.
GsonBuilder
;
import
com.google.gson.
JsonObject
;
import
com.alibaba.fastjson.JSON
;
import
com.
alibaba.fastjson.JSONObject
;
import
com.google.gson.
*
;
import
com.google.gson.
stream.JsonReader
;
import
com.zjsgfa.project.zjsgfa.domain.Mxfxjgb
;
import
com.zjsgfa.project.zjsgfa.mapper.MxfxjgbMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.io.StringReader
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -22,44 +24,114 @@ public class MxdyTask {
private
MxfxjgbMapper
mxfxjgbMapper
;
public
void
ryParams
(
Long
mxid
)
public
void
ryParams
2
(
Long
mxid
)
{
Mxfxjgb
mxfxjgb
=
mxfxjgbMapper
.
selectMxfxjgbById
(
mxid
);
System
.
out
.
println
(
mxfxjgb
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stream"
,
false
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"field_name"
,
"data"
);
map2
.
put
(
"type"
,
"input"
);
map2
.
put
(
"value"
,
mxfxjgb
.
getRwnr
());
List
<
Map
>
listMap
=
new
ArrayList
<>();
listMap
.
add
(
map2
);
map
.
put
(
"content"
,
listMap
);
String
url
=
"https://agent.ai.sinopec.com/aicoapi/gateway/v2/workflow/api_run/53f4afd436d2417180cb27d6dc0a3e17"
;
String
key
=
"278GANwseRJ98YbADs3G1tj7Fg40sI7d"
;
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
String
json
=
gson
.
toJson
(
map
);
String
result2
=
HttpRequest
.
post
(
url
).
header
(
"Authorization"
,
"Bearer "
+
key
).
body
(
json
).
execute
().
body
();
System
.
out
.
println
(
result2
);
try
{
System
.
out
.
println
(
mxfxjgb
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"stream"
,
false
);
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
map2
.
put
(
"field_name"
,
"text"
);
map2
.
put
(
"type"
,
"input"
);
map2
.
put
(
"value"
,
mxfxjgb
.
getRwnr
());
List
<
Map
>
listMap
=
new
ArrayList
<>();
listMap
.
add
(
map2
);
map
.
put
(
"content"
,
listMap
);
map
.
put
(
"value"
,
mxfxjgb
.
getRwnr
());
String
url
=
"https://agent.ai.sinopec.com/aicoapi/gateway/v2/workflow/api_run/53f4afd436d2417180cb27d6dc0a3e17"
;
String
key
=
"278GANwseRJ98YbADs3G1tj7Fg40sI7d"
;
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
String
json
=
gson
.
toJson
(
map
);
String
result2
=
HttpRequest
.
post
(
url
).
header
(
"Authorization"
,
"Bearer "
+
key
).
body
(
json
).
execute
().
body
();
System
.
out
.
println
(
result2
);
// // 解析API响应
String
textPresentation
=
""
;
// 解析为顶层JsonObject
JsonObject
root
=
gson
.
fromJson
(
result2
,
JsonObject
.
class
);
// 逐层获取"文本呈现"内容
// 1. 获取外层data节点
JsonObject
outerData
=
root
.
getAsJsonObject
(
"data"
);
// 2. 获取内层data节点
JsonObject
innerData
=
outerData
.
getAsJsonObject
(
"data"
);
// 3. 获取"文本呈现"字段的值
textPresentation
=
innerData
.
get
(
"文本呈现"
).
getAsString
();
// 打印结果
System
.
out
.
println
(
"文本呈现内容:\n"
+
textPresentation
);
mxfxjgb
.
setFhjg
(
textPresentation
);
mxfxjgb
.
setJxzt
(
"解析完成"
);
mxfxjgbMapper
.
updateMxfxjgb
(
mxfxjgb
);
String
textPresentation
=
""
;
// 解析为顶层JsonObject
JsonObject
root
=
gson
.
fromJson
(
result2
,
JsonObject
.
class
);
// 逐层获取"文本呈现"内容
// 1. 获取外层data节点
JsonObject
outerData
=
root
.
getAsJsonObject
(
"data"
);
// 2. 获取内层data节点
JsonObject
innerData
=
outerData
.
getAsJsonObject
(
"data"
);
// 3. 获取"文本呈现"字段的值
textPresentation
=
innerData
.
get
(
"文本呈现_6"
).
getAsString
();
// 打印结果
System
.
out
.
println
(
"文本呈现内容:\n"
+
textPresentation
);
mxfxjgb
.
setFhjg
(
textPresentation
);
mxfxjgb
.
setJxzt
(
"解析完成"
);
mxfxjgbMapper
.
updateMxfxjgb
(
mxfxjgb
);
}
catch
(
Exception
e
)
{
mxfxjgb
.
setJxzt
(
"解析失败"
);
mxfxjgbMapper
.
updateMxfxjgb
(
mxfxjgb
);
}
}
public
void
ryParams
(
Long
mxid
)
{
Mxfxjgb
mxfxjgb
=
mxfxjgbMapper
.
selectMxfxjgbById
(
mxid
);
try
{
System
.
out
.
println
(
mxfxjgb
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"prompt"
,
mxfxjgb
.
getRwnr
());
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
String
json
=
gson
.
toJson
(
map
);
String
url
=
"http://10.68.249.59:33331/api/chat/1"
;
// String key="278GANwseRJ98YbADs3G1tj7Fg40sI7d";
// Gson gson = new GsonBuilder().setPrettyPrinting().create();
// String json = gson.toJson(map);
// String result2 = HttpRequest.post(url).body(json).execute().body();
String
result2
=
HttpRequest
.
post
(
url
).
body
(
json
).
execute
().
body
();
System
.
out
.
println
(
result2
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
result2
);
Object
error
=
jsonObject
.
get
(
"error"
);
// 解析API响应
// Gson gsonres = new GsonBuilder().setPrettyPrinting().create();
JsonObject
apiResponse
=
JsonParser
.
parseString
(
result2
).
getAsJsonObject
();
// 提取message.content字段
JsonObject
message
=
apiResponse
.
getAsJsonObject
(
"message"
);
String
content
=
message
.
get
(
"content"
).
getAsString
();
System
.
out
.
println
(
content
);
// 提取content中的JSON部分(去除Markdown代码块标记)
// String jsonContent = extractJsonContent(content);
// 解析并格式化JSON内容
// JsonReader reader = new JsonReader(new StringReader(jsonContent));
// reader.setLenient(true);
// JsonElement jsonElement = JsonParser.parseReader(reader);
//// JsonElement jsonElement = JsonParser.parseString(jsonContent);
// String formattedJson = gson.toJson(jsonElement);
//// // 解析API响应
// String textPresentation ="";
// // 解析为顶层JsonObject
// JsonObject root = gson.fromJson(result2, JsonObject.class);
//
// // 逐层获取"文本呈现"内容
// // 1. 获取外层data节点
// JsonObject outerData = root.getAsJsonObject("data");
// // 2. 获取内层data节点
// JsonObject innerData = outerData.getAsJsonObject("data");
// // 3. 获取"文本呈现"字段的值
// textPresentation = innerData.get("文本呈现_6").getAsString();
//
// // 打印结果
// System.out.println("文本呈现内容:\n" + textPresentation);
//
// mxfxjgb.setFhjg(textPresentation);
// mxfxjgb.setJxzt("解析完成");
// mxfxjgbMapper.updateMxfxjgb(mxfxjgb);
}
catch
(
Exception
e
)
{
mxfxjgb
.
setJxzt
(
"解析失败"
);
mxfxjgbMapper
.
updateMxfxjgb
(
mxfxjgb
);
}
}
}
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
View file @
b794f34d
...
...
@@ -1399,7 +1399,7 @@ public class SjDjjcController extends BaseController
//质量要求 中靶要求-定向井---------------------------------------------------
List
<
SjZlyqZbyq
>
sjZlyqZbyqList
=
new
ArrayList
<>();
for
(
int
i
=
3
;
i
<=
lastRowNum
;
i
++){
for
(
int
i
=
2
;
i
<=
lastRowNum
;
i
++){
row
=
sheet
.
getRow
(
i
);
if
(
row
==
null
){
continue
;
...
...
@@ -2234,6 +2234,7 @@ public class SjDjjcController extends BaseController
SjQkztfx
sjQkztfx
=
new
SjQkztfx
();
sjQkztfx
.
setJh
(
jh
);
List
<
SjQkztfx
>
sjQkztfxList
=
sjQkztfxMapper
.
selectSjQkztfxList
(
sjQkztfx
);
// sjQkztfxList=sjQkztfxList.stream().filter(it->it.getLb().equals("区块")).collect(Collectors.toList());
dataModel
.
put
(
"sjQkztfxList"
,
sjQkztfxList
);
SjSzfxjg
sjSzfxjg
=
new
SjSzfxjg
();
...
...
@@ -2255,23 +2256,23 @@ public class SjDjjcController extends BaseController
List
<
SjGztz
>
gztzList
=
sjGztzMapper
.
selectSjGztzList
(
sjGztz
);
List
<
String
>
jwtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"井位图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
if
(
jwtList
.
size
()>
0
){
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
jwtList
,
500
,
60
0
);
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
jwtList
,
400
,
45
0
);
dataModel
.
put
(
"jwtList"
,
pictureList
);
}
else
{
dataModel
.
put
(
"jwtList"
,
new
ArrayList
<>());
}
List
<
String
>
dzpmtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"地震
刨
面图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
List
<
String
>
dzpmtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"地震
剖
面图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
if
(
dzpmtList
.
size
()>
0
){
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
dzpmtList
,
500
,
60
0
);
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
dzpmtList
,
400
,
45
0
);
dataModel
.
put
(
"dzpmtList"
,
pictureList
);
}
else
{
dataModel
.
put
(
"dzpmtList"
,
new
ArrayList
<>());
}
List
<
String
>
sylpmtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"三压力
刨
面图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
List
<
String
>
sylpmtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"三压力
剖
面图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
if
(
sylpmtList
.
size
()>
0
){
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
sylpmtList
,
500
,
60
0
);
List
<
Map
<
String
,
PictureRenderData
>>
pictureList
=
createPictureList
(
sylpmtList
,
400
,
45
0
);
dataModel
.
put
(
"sylpmtList"
,
pictureList
);
}
else
{
dataModel
.
put
(
"sylpmtList"
,
new
ArrayList
<>());
...
...
@@ -2280,7 +2281,7 @@ public class SjDjjcController extends BaseController
//查询井身结构图
List
<
String
>
jsjgtList
=
gztzList
.
stream
().
filter
(
it
->
it
.
getGzlx
().
equals
(
"井身结构图"
)).
map
(
SjGztz:
:
getLj
).
collect
(
Collectors
.
toList
());
if
(
jsjgtList
.
size
()>
0
){
PictureRenderData
pictureMap2
=
createPictureMap2
(
jsjgtList
.
get
(
0
),
500
,
60
0
);
PictureRenderData
pictureMap2
=
createPictureMap2
(
jsjgtList
.
get
(
0
),
400
,
45
0
);
if
(
pictureMap2
!=
null
){
dataModel
.
put
(
"jsjgt"
,
pictureMap2
);
}
else
{
...
...
@@ -2293,7 +2294,7 @@ public class SjDjjcController extends BaseController
InputStream
pngStream
=
ImageProcessUtil
.
convertSvgToPng
(
svgContent
);
PictureRenderData
image
=
Pictures
.
ofStream
(
pngStream
,
PictureType
.
PNG
)
.
size
(
500
,
60
0
)
.
size
(
400
,
45
0
)
.
create
();
dataModel
.
put
(
"jsjgt"
,
image
);
}
else
{
...
...
@@ -2347,6 +2348,13 @@ public class SjDjjcController extends BaseController
}
else
{
dataModel
.
put
(
"fpfx"
,
""
);
}
SjZysx
qcq
=
sjZysxList
.
stream
().
filter
(
it
->
it
.
getLb
().
equals
(
"浅层气"
)).
findFirst
().
orElse
(
null
);
if
(
qcq
!=
null
){
dataModel
.
put
(
"qcq"
,
qcq
.
getZysx
());
}
else
{
dataModel
.
put
(
"qcq"
,
""
);
}
//施工概要
SjSggyGjsbxnyq
sjSggyGjsbxnyq
=
new
SjSggyGjsbxnyq
();
sjSggyGjsbxnyq
.
setJh
(
jh
);
...
...
@@ -2382,6 +2390,7 @@ public class SjDjjcController extends BaseController
dataModel
.
put
(
"xhgZrl"
,
gjsbxnyq
.
getXhgZrl
());
dataModel
.
put
(
"cbgSl"
,
gjsbxnyq
.
getCbgSl
());
dataModel
.
put
(
"cbgZrl"
,
gjsbxnyq
.
getCbgZrl
());
dataModel
.
put
(
"sbfxyj"
,
gjsbxnyq
.
getSbfxyj
());
}
else
{
dataModel
.
put
(
"sjyh"
,
""
);
dataModel
.
put
(
"zjxh"
,
""
);
...
...
@@ -2412,6 +2421,7 @@ public class SjDjjcController extends BaseController
dataModel
.
put
(
"xhgZrl"
,
""
);
dataModel
.
put
(
"cbgSl"
,
""
);
dataModel
.
put
(
"cbgZrl"
,
""
);
dataModel
.
put
(
"sbfxyj"
,
""
);
}
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
();
...
...
@@ -2535,12 +2545,12 @@ public class SjDjjcController extends BaseController
sjFdsgcsTsgj1
.
setRemark
(
"-"
);
}
map
.
put
(
"sjFdsgcsTsgjList"
,
sjFdsgcsTsgjList
);
SjZtxx
sjZtxx
=
new
SjZtxx
();
sjZtxx
.
setJh
(
jh
);
sjZtxx
.
setKc
(
kc
);
List
<
SjZtxx
>
sjZtxxList
=
sjZtxxMapper
.
selectSjZtxxList
(
sjZtxx
);
SjZtxx
sjZtxx1
=
sjZtxxList
.
get
(
0
);
map
.
put
(
"ztxh"
,
sjZtxx1
.
getZtxh
());
//
SjZtxx sjZtxx=new SjZtxx();
//
sjZtxx.setJh(jh);
//
sjZtxx.setKc(kc);
//
List<SjZtxx> sjZtxxList = sjZtxxMapper.selectSjZtxxList(sjZtxx);
//
SjZtxx sjZtxx1 = sjZtxxList.get(0);
//
map.put("ztxh", sjZtxx1.getZtxh());
SjFdsgcsDcyx
sjFdsgcsDcyx
=
new
SjFdsgcsDcyx
();
sjFdsgcsDcyx
.
setJh
(
jh
);
sjFdsgcsDcyx
.
setKc
(
kc
);
...
...
@@ -2549,22 +2559,28 @@ public class SjDjjcController extends BaseController
SjLjtjzt
sjLjtjzt
=
new
SjLjtjzt
();
sjLjtjzt
.
setJh
(
jh
);
sjLjtjzt
.
setKc
(
kc
);
List
<
SjLjtjzt
>
sjLjtjztList
=
sjLjtjztMapper
.
selectSjLjtjztList
(
sjLjtjzt
);
map
.
put
(
"sjLjtjztList"
,
sjLjtjztList
);
SjZ
tcsxx
sjZtcsxx
=
new
SjZt
csxx
();
//
List<SjLjtjzt> sjLjtjztList = sjLjtjztMapper.selectSjLjtjztList(sjLjtjzt);
//
map.put("sjLjtjztList", sjLjtjztList);
SjZ
jcsxx
sjZtcsxx
=
new
SjZj
csxx
();
sjZtcsxx
.
setJh
(
jh
);
sjZtcsxx
.
setKc
(
kc
);
List
<
SjZtcsxx
>
sjZtcsxxList
=
sjZtcsxxMapper
.
selectSjZtcsxxList
(
sjZtcsxx
);
map
.
put
(
"sjZtcsxxList"
,
sjZtcsxxList
);
List
<
SjZjcsxx
>
sjZjcsxxes
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZtcsxx
);
if
(
sjZjcsxxes
.
size
()>
0
){
map
.
put
(
"ztxh"
,
sjZjcsxxes
.
get
(
0
).
getZtxh
());
}
else
{
map
.
put
(
"ztxh"
,
""
);
}
// List<SjZtcsxx> sjZtcsxxList = sjZtcsxxMapper.selectSjZtcsxxList(sjZtcsxx);
map
.
put
(
"sjZtcsxxList"
,
sjZjcsxxes
);
SjZjcsxx
sjZjcsxx
=
new
SjZjcsxx
();
sjZjcsxx
.
setJh
(
jh
);
sjZjcsxx
.
setKc
(
kc
);
List
<
SjZjcsxx
>
sjZjcsxxList
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZjcsxx
);
SjZjcsxx
sjZjcsxx1
=
sjZjcsxxList
.
get
(
0
);
map
.
put
(
"zjpl"
,
sjZjcsxx1
.
getZjpl
()
);
map
.
put
(
"zjzy"
,
sjZjcsxx1
.
getZjzy
());
map
.
put
(
"zjzs"
,
sjZjcsxx1
.
getZjzs
());
map
.
put
(
"zjpl"
,
StringUtils
.
isNotEmpty
(
sjZjcsxx1
.
getZjplsx
())?
sjZjcsxx1
.
getZjpl
()+
"-"
+
sjZjcsxx1
.
getZjplsx
():
sjZjcsxx1
.
getZjpl
()
);
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
());
SjFdsgcsZjyFdxnb
sjFdsgcsZjyFdxnb
=
new
SjFdsgcsZjyFdxnb
();
sjFdsgcsZjyFdxnb
.
setJh
(
jh
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/MxfxjgbServiceImpl.java
View file @
b794f34d
...
...
@@ -74,6 +74,7 @@ public class MxfxjgbServiceImpl implements IMxfxjgbService
sysJob
.
setStatus
(
"0"
);
jobService
.
insertJob
(
sysJob
);
mxfxjgb
.
setJobid
(
sysJob
.
getJobId
());
mxfxjgbMapper
.
updateMxfxjgb
(
mxfxjgb
);
}
return
i
;
}
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SgfambKcSggyServiceImpl.java
View file @
b794f34d
...
...
@@ -83,6 +83,9 @@ public class SgfambKcSggyServiceImpl implements ISgfambKcSggyService
if
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjycs
())){
sgfambKcSggy
.
setZjycs
(
new
String
(
Base64
.
decode
(
sgfambKcSggy
.
getZjycs
()),
StandardCharsets
.
UTF_8
));
}
if
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getFxgkcs
())){
sgfambKcSggy
.
setFxgkcs
(
new
String
(
Base64
.
decode
(
sgfambKcSggy
.
getFxgkcs
()),
StandardCharsets
.
UTF_8
));
}
int
i
=
sgfambKcSggyMapper
.
insertSgfambKcSggy
(
sgfambKcSggy
);
return
i
;
}
...
...
@@ -120,10 +123,18 @@ public class SgfambKcSggyServiceImpl implements ISgfambKcSggyService
if
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getZjycs
())){
sgfambKcSggy
.
setZjycs
(
new
String
(
Base64
.
decode
(
sgfambKcSggy
.
getZjycs
()),
StandardCharsets
.
UTF_8
));
}
if
(
StringUtils
.
isNotEmpty
(
sgfambKcSggy
.
getFxgkcs
())){
sgfambKcSggy
.
setFxgkcs
(
new
String
(
Base64
.
decode
(
sgfambKcSggy
.
getFxgkcs
()),
StandardCharsets
.
UTF_8
));
}
sgfambKcSggy
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
sgfambKcSggyMapper
.
updateSgfambKcSggy
(
sgfambKcSggy
);
}
public
static
void
main
(
String
[]
args
)
{
String
s
=
new
String
(
Base64
.
decode
(
"PHA+77yIMe+8ieS4iumDqOmYsueisO+8jOS4gOW8gOW6lOS4i+WFpeWumuWQkeW3peWFt++8jOaWveW3peS4reWPr+S7peiAg+iZkemHh+eUqOS4jumCu+S6leebuOWQjOeahOmSu+WFt+e7hOWQiOOAgeebuOWQjOeahOaWveW3peWPguaVsOadpeaWveW3peOAgjwvcD4="
),
StandardCharsets
.
UTF_8
);
System
.
out
.
println
(
s
);
}
/**
* 批量删除施工方案模板管理—开次-施工概要
*
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjDjjcServiceImpl.java
View file @
b794f34d
...
...
@@ -124,6 +124,9 @@ public class SjDjjcServiceImpl implements ISjDjjcService
/**
* 查询设计信息-井基础信息
*
...
...
@@ -392,7 +395,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
}
sjSggyGjsbxnyq
.
setSjyh
(
String
.
join
(
"
;
"
,
sjggjyh
));
sjSggyGjsbxnyq
.
setSjyh
(
String
.
join
(
"
\n
"
,
sjggjyh
));
sjSggyGjsbxnyqMapper
.
insertSjSggyGjsbxnyq
(
sjSggyGjsbxnyq
);
...
...
@@ -742,7 +745,6 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZqfx
.
setWjsczq
(
item
.
getWjsczq
());
sjZqfx
.
setZjycms
(
item
.
getZjycms
());
sjZqfx
.
setWjycms
(
item
.
getWjycms
());
sjZqfxList
.
add
(
sjZqfx
);
});
if
(
sjZqfxList
.
size
()>
0
){
...
...
@@ -890,6 +892,10 @@ public class SjDjjcServiceImpl implements ISjDjjcService
List
<
SjJsjg
>
sjJsjgList
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
List
<
SjLjtjzt
>
sjLjtjztList
=
new
ArrayList
<>();
SjDjjc
sjDjjc
=
sjDjjcMapper
.
selectSjDjjcByJh
(
jh
);
SjSzfxjg
sjSzfxjg
=
new
SjSzfxjg
();
sjSzfxjg
.
setJh
(
jh
);
List
<
SjSzfxjg
>
sjSzfxjgs
=
sjSzfxjgMapper
.
selectSjSzfxjgList
(
sjSzfxjg
);
// List<SgfambKcSggy> sgfambKcSggyList=sgfambKcSggyMapper.selectSgfambKcSggyListByQk(new SgfambKcSggy());
// List<SgfambKcSggy> sggyList = new ArrayList<>();
...
...
@@ -902,7 +908,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
for
(
int
i
=
0
;
i
<
sjJsjgList
.
size
();
i
++){
SjJsjg
sjJsjg1
=
sjJsjgList
.
get
(
i
);
if
(
i
==
0
){
ksjs
=
0
;
;
ksjs
=
0
;
}
else
{
ksjs
=
sjJsjgList
.
get
(
i
-
1
).
getJs
();
}
...
...
@@ -916,6 +922,27 @@ public class SjDjjcServiceImpl implements ISjDjjcService
if
(
collect
.
size
()>
3
){
collect
=
collect
.
subList
(
0
,
3
);
}
SjSzfxjg
jczg
=
sjSzfxjgs
.
stream
().
filter
(
it
->
it
.
getFxfw
().
equals
(
sjJsjg1
.
getKc
())
&&
it
.
getYxyj
().
equals
(
"机速最快"
)).
findFirst
().
orElse
(
null
);
if
(
jczg
!=
null
){
SjZtxx
sjZtxx
=
new
SjZtxx
();
sjZtxx
.
setJh
(
jh
);
sjZtxx
.
setKc
(
sjJsjg1
.
getKc
());
sjZtxx
.
setZtxh
(
jczg
.
getZyjy
());
sjZtxx
.
setLb
(
"专家分析"
);
sjZtxxMapper
.
deleteSjZtxxByZtxx
(
sjZtxx
);
sjZtxxMapper
.
insertSjZtxx
(
sjZtxx
);
SjZjcsxx
sjZjcsxx
=
new
SjZjcsxx
();
sjZjcsxx
.
setJh
(
sjDjjc
.
getJh
());
sjZjcsxx
.
setKc
(
sjJsjg1
.
getKc
());
List
<
SjZjcsxx
>
sjZjcsxxes
=
sjZjcsxxMapper
.
selectSjZjcsxxList
(
sjZjcsxx
);
if
(
sjZjcsxxes
.
size
()>
0
){
SjZjcsxx
sjZjcsxx1
=
sjZjcsxxes
.
get
(
0
);
sjZjcsxx1
.
setZtxh
(
jczg
.
getZyjy
());
sjZjcsxxMapper
.
updateSjZjcsxx
(
sjZjcsxx1
);
}
}
SjZtxx
sjZtxx
=
new
SjZtxx
();
collect
.
forEach
(
it
->{
SjLjtjzt
sjLjtjzt
=
new
SjLjtjzt
();
...
...
@@ -962,6 +989,17 @@ public class SjDjjcServiceImpl implements ISjDjjcService
// sjSggyZjzhcsMapper.insertSjSggyZjzhcs(sjSggyZjzhcs);
// }
SjSggyZjzhcs
sjSggyZjzhcs
=
new
SjSggyZjzhcs
();
sjSggyZjzhcs
.
setJh
(
sjDjjc
.
getJh
());
sjSggyZjzhcs
.
setKc
(
sjJsjg1
.
getKc
());
SjSggyZjzhcs
sjSggyZjzhcs1
=
sjSggyZjzhcsMapper
.
selectSjSggyZjzhcsByZjzhcs
(
sjSggyZjzhcs
);
if
(
sjSggyZjzhcs1
!=
null
){
sjSggyZjzhcs1
.
setJd
(
ksjs
+
"-"
+
sjJsjg1
.
getJs
());
sjSggyZjzhcs1
.
setZtxh
(
jczg
.
getZyjy
());
sjSggyZjzhcsMapper
.
updateSjSggyZjzhcs
(
sjSggyZjzhcs1
);
}
if
(
collect
.
size
()>
0
){
sjZtxx
.
setJh
(
jh
);
sjZtxx
.
setLb
(
"邻井推荐"
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
View file @
b794f34d
...
...
@@ -151,10 +151,10 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
if
(
sjSggyGjsbxnyqs
.
size
()>
0
){
SjSggyGjsbxnyq
sjSggyGjsbxnyq1
=
sjSggyGjsbxnyqs
.
get
(
0
);
sjSggyGjsbxnyq1
.
setSjyh
(
String
.
join
(
"
;
"
,
strs
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())));
sjSggyGjsbxnyq1
.
setSjyh
(
String
.
join
(
"
\n
"
,
strs
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())));
sjSggyGjsbxnyqMapper
.
updateSjSggyGjsbxnyq
(
sjSggyGjsbxnyq1
);
}
else
{
sjSggyGjsbxnyq
.
setSjyh
(
String
.
join
(
"
;
"
,
strs
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())));
sjSggyGjsbxnyq
.
setSjyh
(
String
.
join
(
"
\n
"
,
strs
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())));
sjSggyGjsbxnyqMapper
.
insertSjSggyGjsbxnyq
(
sjSggyGjsbxnyq
);
}
...
...
@@ -277,6 +277,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
List
<
String
>
collect
=
sjLjjwList
.
stream
().
map
(
SjLjjw:
:
getLjjh
).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
"邻井井位"
+
collect
);
SjDjjc
sjDjjc1
=
sjDjjcMapper
.
selectSjDjjcByJh
(
sjFdsgcs
.
getJh
());
List
<
SgfambKcSggy
>
sgfambKcSggyList
=
sgfambKcSggyMapper
.
selectSgfambKcSggyListByQk
(
new
SgfambKcSggy
());
List
<
SgfambKcSggy
>
sgmbySggyList
=
new
ArrayList
<>();
...
...
@@ -298,6 +299,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
commonParam
.
setFw
(
sjJygjGdsjgdcsList
.
get
(
0
).
getFw
());
djZqsjfxList
=
djdcInfoMapper
.
getjskd
(
commonParam
);
}
System
.
out
.
println
(
"所有井的造斜规律数据"
+
djZqsjfxList
);
...
...
@@ -312,7 +314,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
previousDepth
=
csaa
;
}
String
gjyh
=
""
;
///
//
查询符合开次的测斜数据
///查询符合开次的测斜数据
if
(
djZqsjfxList
.
size
()>
0
){
List
<
Jskd
>
jskdList_kc
=
new
ArrayList
<>();
double
ksjs
=
0.0
;
...
...
@@ -320,7 +322,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
//开始井深
ksjs
=
0
;
}
else
{
ksjs
=
sjJsjgList
.
get
(
i
).
getJs
();
ksjs
=
sjJsjgList
.
get
(
i
-
1
).
getJs
();
}
double
jsjs
=
sjJsjg1
.
getJs
();
CommonParam
commonParam
=
new
CommonParam
();
...
...
@@ -330,6 +332,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
commonParam
.
setKsjs
(
ksjs
);
commonParam
.
setJsjs
(
jsjs
);
jskdList_kc
=
djdcInfoMapper
.
getJskdList2
(
commonParam
);
System
.
out
.
println
(
"jskdList_kc"
+
jskdList_kc
);
if
(
jskdList_kc
.
size
()>
0
){
for
(
Jskd
jskd
:
jskdList_kc
)
{
gjyh
+=
jskd
.
getGldc
()+
": 自然增:"
+
jskd
.
getZrz
()+
", 自然减:"
+
jskd
.
getZrj
()+
", 人工增:"
+
jskd
.
getRgz
()+
", 人工减:"
+
jskd
.
getRgj
()+
"<br>"
;
...
...
@@ -352,12 +355,14 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
//查询一趟钻率
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
+
"
"
)).
collect
(
Collectors
.
toList
());
List
<
SjQkztfx
>
collect1
=
collect2
.
stream
().
filter
(
it
->
it
.
getKc
().
equals
(
kc
)
&&
it
.
getLb
().
equals
(
"高指标
"
)).
collect
(
Collectors
.
toList
());
SjQkztfx
sjQkztfx1
=
collect1
.
stream
().
max
(
Comparator
.
comparing
(
SjQkztfx:
:
getYtzl
)).
get
();
System
.
out
.
println
(
"kc======="
+
kc
);
Double
ytzl
=
0.0
;
if
(
sjQkztfx1
!=
null
){
ytzl
=
sjQkztfx1
.
getYtzl
();
}
System
.
out
.
println
(
"ytzl=========="
+
ytzl
);
if
(
sjFdsgcs1
==
null
){
...
...
@@ -493,7 +498,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
// sjFdsgcs1.setZjgccs(zjgccs);
// sjFdsgcs1.setZjycs(zjycs);
sjFdsgcs1
.
setFxgkcs
(
fxgkcs
);
//
sjFdsgcs1.setFxgkcs(fxgkcs);
sjFdsgcs1
.
setZyfx
(
zyfx
);
String
join
=
""
;
if
(
fzqk
.
size
()>
0
){
...
...
src/main/resources/mybatis/zjsgfa/SjFdsgcsMapper.xml
View file @
b794f34d
...
...
@@ -23,7 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectSjFdsgcsVo"
>
select id, jh, kc, tzqk,ljfzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx from sj_fdsgcs
select id, jh, kc, tzqk,ljfzqk, jdqk, gjfx, gjyh, dcyl, zyfx, fxgkcs, zjycs, zjgccs,zjzh,zjzhzysx,
case
when kc = '一开' then 1
else (case
when kc = '二开' then 2
else (case
when kc = '三开' then 3
else (case when kc = '四开' then 4 else (case when kc = '五开' then 5 else 6 end )end )end )end )end kcpx from sj_fdsgcs
</sql>
<select
id=
"selectSjFdsgcsList"
parameterType=
"SjFdsgcs"
resultMap=
"SjFdsgcsResult"
>
...
...
@@ -40,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"fxgkcs != null and fxgkcs != ''"
>
and fxgkcs = #{fxgkcs}
</if>
</where>
order by kc
order by kc
px
</select>
<select
id=
"selectSjFdsgcsById"
parameterType=
"Long"
resultMap=
"SjFdsgcsResult"
>
...
...
src/main/resources/static/excel/sgfamb.docx
View file @
b794f34d
No preview for this file type
src/main/resources/static/excel/sgfamb251201.docx
0 → 100644
View file @
b794f34d
File added
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