Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InternalLogic
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CrossProvincialPlatform
InternalLogic
Commits
e59526b1
Commit
e59526b1
authored
May 31, 2021
by
华润
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交内置机
parent
4848eb89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
16 deletions
+49
-16
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
...j/adapter/controller/ProvidentFundServicesController.java
+46
-13
src/main/java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
.../java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
+3
-3
No files found.
src/main/java/net/cdkj/gjj/adapter/controller/ProvidentFundServicesController.java
View file @
e59526b1
...
...
@@ -13,12 +13,11 @@ import org.springframework.web.bind.annotation.RestController;
import
java.io.*
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.sql.CallableStatement
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
import
java.sql.ResultSet
;
import
java.sql.*
;
import
java.text.Format
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.Date
;
/**
...
...
@@ -38,8 +37,10 @@ public class ProvidentFundServicesController {
@PostMapping
(
"ProvidentFundServices"
)
public
static
String
ProvidentFundServices
()
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"startTime"
,
currenttime
(
0
));
jsonObject
.
put
(
"endTime"
,
currenttime
(
24
));
// jsonObject.put("startTime", currenttime(0));
// jsonObject.put("endTime", currenttime(24));
jsonObject
.
put
(
"startTime"
,
"20210520 00:00:00"
);
jsonObject
.
put
(
"endTime"
,
"20210520 23:00:00"
);
jsonObject
.
put
(
"app_id"
,
"eb453ca78b354f2c9163a703530f5186"
);
jsonObject
.
put
(
"app_secret"
,
"9a31b84878654a72a999e38ef55aa186"
);
String
str
=
jsonObject
.
toString
();
...
...
@@ -155,12 +156,19 @@ public class ProvidentFundServicesController {
//2.内置机处理返回的业务数据,调用oracle存储过程
JSONObject
a
=
JSONObject
.
parseObject
(
jsoninfom
);
JSONArray
jsonArray
=
(
JSONArray
)
a
.
get
(
"data"
);
List
<
UnitAccountOpeningInformation
>
bills
=
(
List
<
UnitAccountOpeningInformation
>)
JSONArray
.
parseArray
(
jsonArray
.
toString
(),
UnitAccountOpeningInformation
.
class
);
List
<
UnitAccountOpeningInformation
>
bills
=
new
ArrayList
<>();
if
(
jsonArray
.
size
()<
1
){
//data为空
}
else
{
bills
=
(
List
<
UnitAccountOpeningInformation
>)
JSONArray
.
parseArray
(
jsonArray
.
toString
(),
UnitAccountOpeningInformation
.
class
);
}
System
.
out
.
println
(
bills
);
//加载数据库驱动
Class
.
forName
(
"oracle.jdbc.driver.OracleDriver"
);
//得到Connection连接
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.101.194:1521:zfgjj"
,
"HG2020"
,
"HG2020"
);
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.1.36:1521:zfgjj"
,
"GJJ80"
,
"GJJ80"
);
//测试环境
//得到预编译的Statement对象
CallableStatement
pstm
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWKH.DWXX_IMP(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"
);
//调完第一个存储过程DWXX_IMP之后再调DWKH_SAVE存储过程
...
...
@@ -381,7 +389,13 @@ public class ProvidentFundServicesController {
}
responseReader
.
close
();
System
.
out
.
println
(
"前置机返回第三方解压之后的进度推送结果"
+
sb
.
toString
());
String
uscc
=
list
.
get
(
0
).
getUscc
();
String
uscc
=
""
;
if
(!
list
.
isEmpty
()){
uscc
=
list
.
get
(
0
).
getUscc
();
}
else
{
}
System
.
out
.
println
(
uscc
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
sb
.
toString
());
String
success
=
jsonObj
.
getString
(
"success"
);
...
...
@@ -433,7 +447,7 @@ public class ProvidentFundServicesController {
Class
.
forName
(
"oracle.jdbc.driver.OracleDriver"
);
//得到Connection连接
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.1.36:15
66:zfgjj"
,
"HG2020"
,
"HG202
0"
);
//测试环境
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.1.36:15
21:zfgjj"
,
"GJJ80"
,
"GJJ8
0"
);
//测试环境
//得到预编译的Statement对象
CallableStatement
pstm
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWKH.DWKH_CX(?)}"
);
//给参数赋值
...
...
@@ -470,9 +484,18 @@ public class ProvidentFundServicesController {
if
(!
""
.
equals
(
rs
.
getString
(
6
))&&
rs
.
getString
(
6
)!=
null
){
b
.
setResult
(
rs
.
getString
(
6
));
}
System
.
out
.
println
(
rs
.
getString
(
7
));
//获取具体的值
// System.out.println("1111"+rs.getDate(7));//获取具体的值
System
.
out
.
println
(
"sssss:"
+
Timestamp
.
valueOf
(
rs
.
getString
(
7
).
substring
(
0
,
19
)));
System
.
out
.
println
(
"ddddd:"
+
rs
.
getString
(
7
).
substring
(
0
,
19
));
if
(!
""
.
equals
(
rs
.
getString
(
7
))&&
rs
.
getString
(
7
)!=
null
){
b
.
setTime
(
rs
.
getDate
(
7
));
// b.setTime(rs.getDate(7),);
// System.out.println("222"+rs.getDate(7));
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//注意月份是MM
// Date date = simpleDateFormat.parse(rs.getString(7).substring(0,19));
// b.setTime(Timestamp.valueOf(rs.getString(7).substring(0,19)));
b
.
setTime
(
rs
.
getString
(
7
).
substring
(
0
,
19
));
// Date ccc=date;
// System.out.println("日期转换"+ccc);
}
System
.
out
.
println
(
rs
.
getString
(
8
));
//获取具体的值
if
(!
""
.
equals
(
rs
.
getString
(
8
))&&
rs
.
getString
(
8
)!=
null
){
...
...
@@ -482,12 +505,22 @@ public class ProvidentFundServicesController {
if
(!
""
.
equals
(
rs
.
getString
(
9
))&&
rs
.
getString
(
9
)!=
null
){
b
.
setEntName
(
rs
.
getString
(
9
));
}
System
.
out
.
println
(
rs
.
getString
(
10
));
//获取具体的值
if
(!
""
.
equals
(
rs
.
getString
(
10
))&&
rs
.
getString
(
10
)!=
null
){
b
.
setBusId
(
rs
.
getString
(
10
));
}
list
.
add
(
b
);
}
System
.
out
.
println
(
list
);
//释放资源
pstm
.
close
();
connection
.
close
();
// for(BusinessProcessing b:list){
// if(b.getTime()!=null){
// Format format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// b.setTime(format.format(b.getTime()));
// }
// }
return
list
;
}
...
...
@@ -498,7 +531,7 @@ public class ProvidentFundServicesController {
Class
.
forName
(
"oracle.jdbc.driver.OracleDriver"
);
//得到Connection连接
// Connection connection= DriverManager.getConnection("jdbc:oracle:thin:@192.168.101.194:1521:zfgjj", "HG2020", "HG2020");//本地环境
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.1.36:15
66:zfgjj"
,
"HG2020"
,
"HG202
0"
);
//测试环境
Connection
connection
=
DriverManager
.
getConnection
(
"jdbc:oracle:thin:@192.168.1.36:15
21:zfgjj"
,
"GJJ80"
,
"GJJ8
0"
);
//测试环境
//得到预编译的Statement对象
CallableStatement
pstm
=
connection
.
prepareCall
(
"{call JGJ_KSYW_DWKH.DWKH_HX(?,?)}"
);
//给参数赋值
...
...
src/main/java/net/cdkj/gjj/adapter/domain/BusinessProcessing.java
View file @
e59526b1
...
...
@@ -22,7 +22,7 @@ public class BusinessProcessing {
private
String
result
;
private
Date
time
;
private
String
time
;
private
String
uscc
;
...
...
@@ -78,11 +78,11 @@ public class BusinessProcessing {
this
.
result
=
result
;
}
public
Date
getTime
()
{
public
String
getTime
()
{
return
time
;
}
public
void
setTime
(
Date
time
)
{
public
void
setTime
(
String
time
)
{
this
.
time
=
time
;
}
...
...
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