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
c1341302
Commit
c1341302
authored
Mar 23, 2026
by
jiangyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ee29a9fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
+14
-9
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
+2
-2
No files found.
src/main/java/com/zjsgfa/project/zjsgfa/controller/SjDjjcController.java
View file @
c1341302
...
@@ -447,7 +447,7 @@ public class SjDjjcController extends BaseController {
...
@@ -447,7 +447,7 @@ public class SjDjjcController extends BaseController {
Long
id
=
sjDjjc
.
getId
();
Long
id
=
sjDjjc
.
getId
();
XSSFWorkbook
workbook
=
null
;
XSSFWorkbook
workbook
=
null
;
//
try {
try
{
//装载流
//装载流
workbook
=
new
XSSFWorkbook
(
file
.
getInputStream
());
workbook
=
new
XSSFWorkbook
(
file
.
getInputStream
());
...
@@ -2154,14 +2154,7 @@ public class SjDjjcController extends BaseController {
...
@@ -2154,14 +2154,7 @@ public class SjDjjcController extends BaseController {
//高指标井
//高指标井
sjDjjcService
.
getGzbjList
(
jh
);
sjDjjcService
.
getGzbjList
(
jh
);
// } catch (IOException e) {
// e.getMessage();
// e.printStackTrace();
// throw new Exception("导入Excel失败,请联系网站管理员!");
//
// } finally {
// workbook.close();
// }
String
name
=
file
.
getOriginalFilename
();
String
name
=
file
.
getOriginalFilename
();
...
@@ -2180,6 +2173,17 @@ public class SjDjjcController extends BaseController {
...
@@ -2180,6 +2173,17 @@ public class SjDjjcController extends BaseController {
// upFile.setCreatedBy(SecurityUtils.getUsername());//创建人
// upFile.setCreatedBy(SecurityUtils.getUsername());//创建人
upFile
.
setCreatedTime
(
new
Date
());
//创建时间
upFile
.
setCreatedTime
(
new
Date
());
//创建时间
commonFileService
.
insertCommonFile
(
upFile
);
commonFileService
.
insertCommonFile
(
upFile
);
}
catch
(
IOException
e
)
{
e
.
getMessage
();
e
.
printStackTrace
();
// throw new Exception("导入Excel失败,请联系网站管理员!");
sjSjzlErrorLogMapper
.
add
(
SjSjzlErrorLog
.
builder
().
jh
(
id
).
body
(
e
.
getMessage
()).
build
());
workbook
.
close
();
return
AjaxResult
.
error
(
"数据导入失败"
);
}
finally
{
workbook
.
close
();
}
return
AjaxResult
.
success
(
"导入成功"
);
return
AjaxResult
.
success
(
"导入成功"
);
}
}
...
@@ -2404,6 +2408,7 @@ public class SjDjjcController extends BaseController {
...
@@ -2404,6 +2408,7 @@ public class SjDjjcController extends BaseController {
sjSjzlErrorLogMapper
.
add
(
SjSjzlErrorLog
.
builder
().
jh
(
id
).
body
(
"调用接口失败,连接超时"
).
build
());
sjSjzlErrorLogMapper
.
add
(
SjSjzlErrorLog
.
builder
().
jh
(
id
).
body
(
"调用接口失败,连接超时"
).
build
());
return
AjaxResult
.
error
(
"调用接口失败,连接超时"
);
return
AjaxResult
.
error
(
"调用接口失败,连接超时"
);
}
}
}
}
}
}
return
AjaxResult
.
success
(
"解析成功"
);
return
AjaxResult
.
success
(
"解析成功"
);
...
...
src/main/java/com/zjsgfa/project/zjsgfa/service/impl/SjFdsgcsServiceImpl.java
View file @
c1341302
...
@@ -329,8 +329,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
...
@@ -329,8 +329,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
String
json
=
gson
.
toJson
(
map
);
String
json
=
gson
.
toJson
(
map
);
//调用httpsPost请求获取数据
//调用httpsPost请求获取数据
String
url
=
"http://10.68.202.238:12001/api/ljzjymd"
;
//
String url = "http://10.68.202.238:12001/api/ljzjymd";
//
String url = "http://10.68.249.11:5174/api/ljzjymd";
String
url
=
"http://10.68.249.11:5174/api/ljzjymd"
;
System
.
out
.
println
(
json
);
System
.
out
.
println
(
json
);
String
result
=
HttpRequest
.
post
(
url
).
body
(
json
).
execute
().
body
();
String
result
=
HttpRequest
.
post
(
url
).
body
(
json
).
execute
().
body
();
System
.
out
.
println
(
result
);
System
.
out
.
println
(
result
);
...
...
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