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
f180515b
Commit
f180515b
authored
Aug 12, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
60544650
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
13 deletions
+31
-13
SI004INVENTORYSyncOutServiceTask.java
...TORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
+2
-1
SI011ACTUALSALESSyncOutServiceTask.java
...ES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
+2
-1
ZMISD009SOCREATIONServiceTask.java
..._MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
+2
-2
CommonService.java
src/main/java/com/egolm/sso/services/CommonService.java
+19
-3
application-dev.yml
src/main/resources/application-dev.yml
+5
-5
application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/com/egolm/sso/clients/SI_004_INVENTORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
View file @
f180515b
...
@@ -104,9 +104,10 @@ public class SI004INVENTORYSyncOutServiceTask {
...
@@ -104,9 +104,10 @@ public class SI004INVENTORYSyncOutServiceTask {
ZDTSD004INVENTORYSENDING
.
RECORD
.
INVENTORYRECORD
.
HEADER
INVENTORYRECORD_HEADER
=
new
ZDTSD004INVENTORYSENDING
.
RECORD
.
INVENTORYRECORD
.
HEADER
();
ZDTSD004INVENTORYSENDING
.
RECORD
.
INVENTORYRECORD
.
HEADER
INVENTORYRECORD_HEADER
=
new
ZDTSD004INVENTORYSENDING
.
RECORD
.
INVENTORYRECORD
.
HEADER
();
disCode
=
headerObject
.
getString
(
"DIS_CODE"
);
disCode
=
headerObject
.
getString
(
"DIS_CODE"
);
traceNo
=
headerObject
.
getString
(
"TRACE_NO"
);
traceNo
=
headerObject
.
getString
(
"TRACE_NO"
);
Date
INVENTORY_DATE
=
headerObject
.
getDate
(
"INVENTORY_DATE"
);
INVENTORYRECORD_HEADER
.
setKUNNR
(
headerObject
.
getString
(
"DIS_CODE"
));
INVENTORYRECORD_HEADER
.
setKUNNR
(
headerObject
.
getString
(
"DIS_CODE"
));
INVENTORYRECORD_HEADER
.
setNAME1
(
headerObject
.
getString
(
"DIS_NAME"
));
INVENTORYRECORD_HEADER
.
setNAME1
(
headerObject
.
getString
(
"DIS_NAME"
));
INVENTORYRECORD_HEADER
.
setZDATE
(
headerObject
.
getString
(
"INVENTORY_DATE
"
));
INVENTORYRECORD_HEADER
.
setZDATE
(
DateUtil
.
formatDate
(
INVENTORY_DATE
,
"yyyyMMdd
"
));
INVENTORYRECORD_HEADER
.
setZSPART
(
headerObject
.
getString
(
"MPG"
));
INVENTORYRECORD_HEADER
.
setZSPART
(
headerObject
.
getString
(
"MPG"
));
INVENTORYRECORD
.
setHEADER
(
INVENTORYRECORD_HEADER
);
INVENTORYRECORD
.
setHEADER
(
INVENTORYRECORD_HEADER
);
RECORD
.
setINVENTORYRECORD
(
INVENTORYRECORD
);
RECORD
.
setINVENTORYRECORD
(
INVENTORYRECORD
);
...
...
src/main/java/com/egolm/sso/clients/SI_011_ACTUAL_SALES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
View file @
f180515b
...
@@ -103,12 +103,13 @@ public class SI011ACTUALSALESSyncOutServiceTask {
...
@@ -103,12 +103,13 @@ public class SI011ACTUALSALESSyncOutServiceTask {
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
HEADER
header
=
new
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
HEADER
();
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
HEADER
header
=
new
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
HEADER
();
List
<
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
ITEM
>
itemList
=
RECORD
.
getITEM
();
List
<
ZDTSD011ACTUALSALESSENDING
.
RECORD
.
ITEM
>
itemList
=
RECORD
.
getITEM
();
JSONObject
headerObject
=
new
JSONObject
(
vList
.
get
(
0
));
JSONObject
headerObject
=
new
JSONObject
(
vList
.
get
(
0
));
Date
SALES_DATE
=
headerObject
.
getDate
(
"SALES_DATE"
);
traceNo
=
headerObject
.
getString
(
"TRACE_NO"
);
traceNo
=
headerObject
.
getString
(
"TRACE_NO"
);
disCode
=
headerObject
.
getString
(
"DIS_CODE"
);
disCode
=
headerObject
.
getString
(
"DIS_CODE"
);
header
.
setAUBEL
(
headerObject
.
getString
(
"SALES_NO"
));
header
.
setAUBEL
(
headerObject
.
getString
(
"SALES_NO"
));
header
.
setFXSNA
(
headerObject
.
getString
(
"DIS_NAME"
));
header
.
setFXSNA
(
headerObject
.
getString
(
"DIS_NAME"
));
header
.
setFXSNO
(
headerObject
.
getString
(
"DIS_CODE"
));
header
.
setFXSNO
(
headerObject
.
getString
(
"DIS_CODE"
));
header
.
setSDATE
(
headerObject
.
getString
(
"SALES_DATE
"
));
header
.
setSDATE
(
DateUtil
.
formatDate
(
SALES_DATE
,
"yyyyMMdd
"
));
RECORD
.
setHEADER
(
header
);
RECORD
.
setHEADER
(
header
);
List
<
BigInteger
>
idList
=
new
ArrayList
<
BigInteger
>();
List
<
BigInteger
>
idList
=
new
ArrayList
<
BigInteger
>();
for
(
Map
<
String
,
Object
>
itemMap
:
vList
)
{
for
(
Map
<
String
,
Object
>
itemMap
:
vList
)
{
...
...
src/main/java/com/egolm/sso/clients/Z_MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
View file @
f180515b
...
@@ -102,7 +102,7 @@ public class ZMISD009SOCREATIONServiceTask {
...
@@ -102,7 +102,7 @@ public class ZMISD009SOCREATIONServiceTask {
header
.
setKGNNR
(
KGNNR
);
header
.
setKGNNR
(
KGNNR
);
header
.
setQTFLAG
(
QTFLAG
);
header
.
setQTFLAG
(
QTFLAG
);
if
(
BSTDK
!=
null
)
{
if
(
BSTDK
!=
null
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy
-MM-
dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy
MM
dd"
);
header
.
setBSTDK
(
format
.
format
(
BSTDK
));
header
.
setBSTDK
(
format
.
format
(
BSTDK
));
}
}
ZDTSD009SOCREATIONBean
.
setHeader
(
header
);
ZDTSD009SOCREATIONBean
.
setHeader
(
header
);
...
@@ -121,7 +121,7 @@ public class ZMISD009SOCREATIONServiceTask {
...
@@ -121,7 +121,7 @@ public class ZMISD009SOCREATIONServiceTask {
item
.
setKWMENG
(
KWMENG
.
toString
());
item
.
setKWMENG
(
KWMENG
.
toString
());
}
}
if
(
EDATU
!=
null
)
{
if
(
EDATU
!=
null
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy
-MM-
dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy
MM
dd"
);
item
.
setEDATU
(
format
.
format
(
EDATU
));
item
.
setEDATU
(
format
.
format
(
EDATU
));
}
}
ZDTSD009SOCREATIONBean
.
getITEM
().
add
(
item
);
ZDTSD009SOCREATIONBean
.
getITEM
().
add
(
item
);
...
...
src/main/java/com/egolm/sso/services/CommonService.java
View file @
f180515b
...
@@ -12,6 +12,8 @@ import java.util.HashMap;
...
@@ -12,6 +12,8 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
...
@@ -27,6 +29,7 @@ import org.springframework.transaction.annotation.Propagation;
...
@@ -27,6 +29,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.sso.SapServiceApplication
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.HttpUtil
;
import
com.egolm.sso.util.HttpUtil
;
...
@@ -65,10 +68,24 @@ public class CommonService {
...
@@ -65,10 +68,24 @@ public class CommonService {
@Value
(
"${dataTracking.isOpen}"
)
@Value
(
"${dataTracking.isOpen}"
)
private
boolean
isOpen
;
private
boolean
isOpen
;
private
static
final
Map
<
String
,
Long
>
tmp
=
new
HashMap
<
String
,
Long
>();
@PostConstruct
public
void
init
()
{
String
sql
=
"select * from x_sequence"
;
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
sql
);
for
(
Map
<
String
,
Object
>
map
:
list
)
{
String
name
=
(
String
)
map
.
get
(
"name"
);
Long
value
=
((
Number
)
map
.
get
(
"value"
)).
longValue
();
tmp
.
put
(
name
,
value
);
}
}
public
Long
getNextval
(
String
sName
)
{
public
Long
getNextval
(
String
sName
)
{
return
getNextvalBySql
(
sName
);
CommonService
common
=
SapServiceApplication
.
getBean
(
CommonService
.
class
);
return
common
.
getNextvalBySql
(
sName
);
}
}
public
Long
getNextvalByProc
(
String
sName
)
{
public
Long
getNextvalByProc
(
String
sName
)
{
return
this
.
jdbcTemplate
.
execute
(
new
CallableStatementCreator
()
{
return
this
.
jdbcTemplate
.
execute
(
new
CallableStatementCreator
()
{
public
CallableStatement
createCallableStatement
(
Connection
connection
)
throws
SQLException
{
public
CallableStatement
createCallableStatement
(
Connection
connection
)
throws
SQLException
{
...
@@ -96,7 +113,6 @@ public class CommonService {
...
@@ -96,7 +113,6 @@ public class CommonService {
Long
min
=
(
Long
)
seqMap
.
get
(
"min"
);
Long
min
=
(
Long
)
seqMap
.
get
(
"min"
);
Long
value
=
(
Long
)
seqMap
.
get
(
"value"
);
Long
value
=
(
Long
)
seqMap
.
get
(
"value"
);
Long
nextValue
=
value
+
step
;
Long
nextValue
=
value
+
step
;
if
(
value
>
max
||
value
<
min
)
{
if
(
value
>
max
||
value
<
min
)
{
throw
new
XRException
(
MessageFormat
.
format
(
"序列已超出许可范围[{0}]"
,
sName
));
throw
new
XRException
(
MessageFormat
.
format
(
"序列已超出许可范围[{0}]"
,
sName
));
}
else
{
}
else
{
...
...
src/main/resources/application-dev.yml
View file @
f180515b
wsUsedAuth
:
tru
e
wsUsedAuth
:
fals
e
wsUsername
:
test
wsUsername
:
test
wsPassword
:
78258c537d6e4d5fb210a57d05619fb6
wsPassword
:
78258c537d6e4d5fb210a57d05619fb6
schneider
:
schneider
:
...
@@ -8,7 +8,7 @@ cronSap009: 0 0 0 * * ?
...
@@ -8,7 +8,7 @@ cronSap009: 0 0 0 * * ?
cronSi004
:
0 0 0 * * ?
cronSi004
:
0 0 0 * * ?
cronSi011
:
0 0 0 * * ?
cronSi011
:
0 0 0 * * ?
dataTracking
:
dataTracking
:
isOpen
:
tru
e
isOpen
:
fals
e
tokenExpireMinute
:
60
tokenExpireMinute
:
60
appId
:
schneider-api
appId
:
schneider-api
appSecret
:
SGVsbG8yQ2xpZW50IQ
appSecret
:
SGVsbG8yQ2xpZW50IQ
...
@@ -19,6 +19,6 @@ dataTracking:
...
@@ -19,6 +19,6 @@ dataTracking:
insertOrderTracking
:
/v1/insertOrderTracking
insertOrderTracking
:
/v1/insertOrderTracking
spring
:
spring
:
datasource
:
datasource
:
url
:
jdbc:mysql://10.204.6.8:8066/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8
url
:
jdbc:mysql://localhost/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
username
:
schneider
username
:
root
password
:
schneider_e2e
password
:
123456
\ No newline at end of file
\ No newline at end of file
src/main/resources/application.yml
View file @
f180515b
isUsedTestController
:
fals
e
isUsedTestController
:
tru
e
xmlRoot
:
xml
xmlRoot
:
xml
systemId
:
system
systemId
:
system
WSDLPATH
:
WSDL
WSDLPATH
:
WSDL
...
...
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