Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sap-service
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sap-service
Commits
c925955d
Commit
c925955d
authored
Aug 12, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
4ae7ba41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
TestController.java
src/main/java/com/egolm/sso/TestController.java
+24
-1
No files found.
src/main/java/com/egolm/sso/TestController.java
View file @
c925955d
...
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.sso.clients.SI_004_INVENTORY_SyncOutService.SI004INVENTORYSyncOutServiceTask
;
import
com.egolm.sso.clients.SI_011_ACTUAL_SALES_SyncOutService.SI011ACTUALSALESSyncOutServiceTask
;
import
com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATIONServiceTask
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.util.DateUtil
;
...
...
@@ -31,6 +33,12 @@ public class TestController {
@Autowired
ZMISD009SOCREATIONServiceTask
task
;
@Autowired
SI011ACTUALSALESSyncOutServiceTask
si011Task
;
@Autowired
SI004INVENTORYSyncOutServiceTask
si004Task
;
private
void
verify
()
{
if
(!
profiles
.
contains
(
"dev"
))
{
throw
new
RuntimeException
(
"spring.profiles.active="
+
profiles
+
", The test interface has been closed."
);
...
...
@@ -43,6 +51,8 @@ public class TestController {
Map
<
String
,
String
>
map
=
new
LinkedHashMap
<
String
,
String
>();
map
.
put
(
"/"
,
"/"
);
map
.
put
(
"/009_SO_CREATION"
,
"009_SO_CREATION"
);
map
.
put
(
"/004_INVENTORY"
,
"004_INVENTORY"
);
map
.
put
(
"/011_ACTUAL_SALES"
,
"011_ACTUAL_SALES"
);
map
.
put
(
"/getToken"
,
"getToken"
);
map
.
put
(
"/saveOrderTracking"
,
"saveOrderTracking"
);
StringBuffer
sb
=
new
StringBuffer
();
...
...
@@ -60,6 +70,20 @@ public class TestController {
return
"OK"
;
}
@RequestMapping
(
value
=
{
"/004_INVENTORY"
},
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
si004Task
()
throws
MalformedURLException
{
this
.
verify
();
si004Task
.
runTask
();
return
"OK"
;
}
@RequestMapping
(
value
=
{
"/011_ACTUAL_SALES"
},
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
si011Task
()
throws
MalformedURLException
{
this
.
verify
();
si011Task
.
runTask
();
return
"OK"
;
}
@GetMapping
(
"getToken"
)
public
Object
getToken
()
{
String
token
=
common
.
getToken
();
...
...
@@ -71,5 +95,4 @@ public class TestController {
return
common
.
saveOrderTracking
(
"sapmaterialmaster"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATETIME
),
"MaterialMaster"
,
"123456"
,
"123456"
,
"G"
,
null
,
"操作失败"
,
"操作失败"
);
}
}
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