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
dc8d3e69
Commit
dc8d3e69
authored
Aug 12, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
76284ec8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
12 deletions
+4
-12
SI004INVENTORYSyncOutServiceTask.java
...TORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
+0
-2
SI011ACTUALSALESSyncOutServiceTask.java
...ES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
+0
-2
ZMISD009SOCREATIONServiceTask.java
..._MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
+0
-2
CommonService.java
src/main/java/com/egolm/sso/services/CommonService.java
+4
-6
No files found.
src/main/java/com/egolm/sso/clients/SI_004_INVENTORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
View file @
dc8d3e69
...
...
@@ -15,7 +15,6 @@ import org.springframework.boot.system.ApplicationHome;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.sso.clients.ServiceFactory
;
...
...
@@ -58,7 +57,6 @@ public class SI004INVENTORYSyncOutServiceTask {
this
.
runTask
();
}
@Transactional
public
void
runTask
()
{
ApplicationHome
home
=
new
ApplicationHome
(
getClass
());
File
jarFile
=
home
.
getSource
();
...
...
src/main/java/com/egolm/sso/clients/SI_011_ACTUAL_SALES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
View file @
dc8d3e69
...
...
@@ -15,7 +15,6 @@ import org.springframework.boot.system.ApplicationHome;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSONObject
;
import
com.egolm.sso.clients.ServiceFactory
;
...
...
@@ -58,7 +57,6 @@ public class SI011ACTUALSALESSyncOutServiceTask {
this
.
runTask
();
}
@Transactional
public
void
runTask
()
{
ApplicationHome
home
=
new
ApplicationHome
(
getClass
());
File
jarFile
=
home
.
getSource
();
...
...
src/main/java/com/egolm/sso/clients/Z_MI_SD_009_SO_CREATION/ZMISD009SOCREATIONServiceTask.java
View file @
dc8d3e69
...
...
@@ -14,7 +14,6 @@ import org.springframework.boot.system.ApplicationHome;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.egolm.sso.clients.ServiceFactory
;
import
com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.Header
;
...
...
@@ -55,7 +54,6 @@ public class ZMISD009SOCREATIONServiceTask {
this
.
runTask
();
}
@Transactional
public
void
runTask
()
{
ApplicationHome
home
=
new
ApplicationHome
(
getClass
());
File
jarFile
=
home
.
getSource
();
...
...
src/main/java/com/egolm/sso/services/CommonService.java
View file @
dc8d3e69
...
...
@@ -11,6 +11,8 @@ import java.util.Map;
import
org.bouncycastle.util.encoders.Base64
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.config.ConfigurableBeanFactory
;
import
org.springframework.context.annotation.Scope
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.dao.EmptyResultDataAccessException
;
import
org.springframework.jdbc.core.JdbcTemplate
;
...
...
@@ -27,6 +29,7 @@ import com.egolm.sso.util.SqlUtil.Sql;
import
com.egolm.sso.util.StringUtil
;
@Service
@Scope
(
value
=
ConfigurableBeanFactory
.
SCOPE_SINGLETON
)
public
class
CommonService
{
@Autowired
...
...
@@ -57,7 +60,7 @@ public class CommonService {
private
boolean
isOpen
;
@Transactional
(
propagation
=
Propagation
.
NOT_SUPPORTED
)
public
Long
getNextval
(
String
sName
)
{
public
synchronized
Long
getNextval
(
String
sName
)
{
try
{
Map
<
String
,
Object
>
seqMap
=
jdbcTemplate
.
queryForMap
(
"select * from x_sequence where name = ?"
,
sName
);
Integer
id
=
(
Integer
)
seqMap
.
get
(
"id"
);
...
...
@@ -75,11 +78,6 @@ public class CommonService {
if
(
count
==
1
)
{
return
value
;
}
else
if
(
count
==
0
)
{
try
{
Thread
.
sleep
(
1000L
);
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
}
return
this
.
getNextval
(
sName
);
}
else
{
throw
new
XRException
(
MessageFormat
.
format
(
"序列错误[{0}]"
,
sName
));
...
...
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