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
b0c97c63
Commit
b0c97c63
authored
Aug 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
305a8c28
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
11 deletions
+59
-11
SI004INVENTORYSyncOutServiceTask.java
...TORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
+2
-0
SI009SOCREATIONAsynOutServiceTask.java
...ION_AsynOutService/SI009SOCREATIONAsynOutServiceTask.java
+2
-0
ZDTSD009SOCREATION.java
...SI_009_SO_CREATION_AsynOutService/ZDTSD009SOCREATION.java
+11
-11
SI011ACTUALSALESSyncOutServiceTask.java
...ES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
+2
-0
BeanUtil.java
src/main/java/com/egolm/sso/util/BeanUtil.java
+42
-0
No files found.
src/main/java/com/egolm/sso/clients/SI_004_INVENTORY_SyncOutService/SI004INVENTORYSyncOutServiceTask.java
View file @
b0c97c63
...
@@ -23,6 +23,7 @@ import com.egolm.sso.clients.SAPServiceFactory;
...
@@ -23,6 +23,7 @@ import com.egolm.sso.clients.SAPServiceFactory;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.util.BeanUtil
;
import
com.egolm.sso.util.CollectionUtil
;
import
com.egolm.sso.util.CollectionUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.FileUtil
;
...
@@ -131,6 +132,7 @@ public class SI004INVENTORYSyncOutServiceTask {
...
@@ -131,6 +132,7 @@ public class SI004INVENTORYSyncOutServiceTask {
NVENTORYR_ITEM
.
setZVALU
(
jsonObject
.
getString
(
"DIS_TAX_AMOUNT"
));
NVENTORYR_ITEM
.
setZVALU
(
jsonObject
.
getString
(
"DIS_TAX_AMOUNT"
));
NVENTORYR_ITEM_LIST
.
add
(
NVENTORYR_ITEM
);
NVENTORYR_ITEM_LIST
.
add
(
NVENTORYR_ITEM
);
}
}
BeanUtil
.
setEmptyStringIfNull
(
mt004INVENTORY
);
SI004INVENTORYSyncOut
.
si004INVENTORYSyncOut
(
mt004INVENTORY
);
SI004INVENTORYSyncOut
.
si004INVENTORYSyncOut
(
mt004INVENTORY
);
String
updateSql
=
"UPDATE t_dis_inventory SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID IN ("
+
StringUtil
.
join
(
"?"
,
", "
,
idList
.
size
(),
""
,
""
)
+
")"
;
String
updateSql
=
"UPDATE t_dis_inventory SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID IN ("
+
StringUtil
.
join
(
"?"
,
", "
,
idList
.
size
(),
""
,
""
)
+
")"
;
jdbcTemplate
.
update
(
updateSql
,
idList
.
toArray
());
jdbcTemplate
.
update
(
updateSql
,
idList
.
toArray
());
...
...
src/main/java/com/egolm/sso/clients/SI_009_SO_CREATION_AsynOutService/SI009SOCREATIONAsynOutServiceTask.java
View file @
b0c97c63
...
@@ -24,6 +24,7 @@ import com.egolm.sso.clients.SI_009_SO_CREATION_AsynOutService.ZDTSD009SOCREATIO
...
@@ -24,6 +24,7 @@ import com.egolm.sso.clients.SI_009_SO_CREATION_AsynOutService.ZDTSD009SOCREATIO
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.util.BeanUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.SqlUtil
;
import
com.egolm.sso.util.SqlUtil
;
...
@@ -142,6 +143,7 @@ public class SI009SOCREATIONAsynOutServiceTask {
...
@@ -142,6 +143,7 @@ public class SI009SOCREATIONAsynOutServiceTask {
}
}
ZDTSD009SOCREATIONBean
.
getITEM
().
add
(
item
);
ZDTSD009SOCREATIONBean
.
getITEM
().
add
(
item
);
}
}
BeanUtil
.
setEmptyStringIfNull
(
ZDTSD009SOCREATIONBean
);
sI009SOCREATIONAsynOut
.
si009SOCREATIONAsynOut
(
ZDTSD009SOCREATIONBean
);
sI009SOCREATIONAsynOut
.
si009SOCREATIONAsynOut
(
ZDTSD009SOCREATIONBean
);
jdbcTemplate
.
update
(
"UPDATE t_so_creation_header SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID = ?"
,
ID
);
jdbcTemplate
.
update
(
"UPDATE t_so_creation_header SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID = ?"
,
ID
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
...
...
src/main/java/com/egolm/sso/clients/SI_009_SO_CREATION_AsynOutService/ZDTSD009SOCREATION.java
View file @
b0c97c63
...
@@ -265,17 +265,17 @@ public class ZDTSD009SOCREATION {
...
@@ -265,17 +265,17 @@ public class ZDTSD009SOCREATION {
public
static
class
Header
{
public
static
class
Header
{
@XmlElement
(
name
=
"BSTKD_E"
)
@XmlElement
(
name
=
"BSTKD_E"
)
protected
String
bstkde
=
""
;
protected
String
bstkde
;
@XmlElement
(
name
=
"VBELN"
)
@XmlElement
(
name
=
"VBELN"
)
protected
String
vbeln
=
""
;
protected
String
vbeln
;
@XmlElement
(
name
=
"BSTDK"
)
@XmlElement
(
name
=
"BSTDK"
)
protected
String
bstdk
=
""
;
protected
String
bstdk
;
@XmlElement
(
name
=
"KUNNR"
)
@XmlElement
(
name
=
"KUNNR"
)
protected
String
kunnr
=
""
;
protected
String
kunnr
;
@XmlElement
(
name
=
"KGNNR"
)
@XmlElement
(
name
=
"KGNNR"
)
protected
String
kgnnr
=
""
;
protected
String
kgnnr
;
@XmlElement
(
name
=
"QTFLAG"
)
@XmlElement
(
name
=
"QTFLAG"
)
protected
String
qtflag
=
""
;
protected
String
qtflag
;
/**
/**
* 获取bstkde属性的值。
* 获取bstkde属性的值。
...
@@ -488,15 +488,15 @@ public class ZDTSD009SOCREATION {
...
@@ -488,15 +488,15 @@ public class ZDTSD009SOCREATION {
public
static
class
ITEM
{
public
static
class
ITEM
{
@XmlElement
(
name
=
"POSNR"
)
@XmlElement
(
name
=
"POSNR"
)
protected
String
posnr
=
""
;
protected
String
posnr
;
@XmlElement
(
name
=
"VTEXT"
)
@XmlElement
(
name
=
"VTEXT"
)
protected
String
vtext
=
""
;
protected
String
vtext
;
@XmlElement
(
name
=
"MATNR"
)
@XmlElement
(
name
=
"MATNR"
)
protected
String
matnr
=
""
;
protected
String
matnr
;
@XmlElement
(
name
=
"KWMENG"
)
@XmlElement
(
name
=
"KWMENG"
)
protected
String
kwmeng
=
""
;
protected
String
kwmeng
;
@XmlElement
(
name
=
"EDATU"
)
@XmlElement
(
name
=
"EDATU"
)
protected
String
edatu
=
""
;
protected
String
edatu
;
/**
/**
* 获取posnr属性的值。
* 获取posnr属性的值。
...
...
src/main/java/com/egolm/sso/clients/SI_011_ACTUAL_SALES_SyncOutService/SI011ACTUALSALESSyncOutServiceTask.java
View file @
b0c97c63
...
@@ -23,6 +23,7 @@ import com.egolm.sso.clients.SAPServiceFactory;
...
@@ -23,6 +23,7 @@ import com.egolm.sso.clients.SAPServiceFactory;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.services.TraceService
;
import
com.egolm.sso.util.BeanUtil
;
import
com.egolm.sso.util.CollectionUtil
;
import
com.egolm.sso.util.CollectionUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.FileUtil
;
...
@@ -138,6 +139,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
...
@@ -138,6 +139,7 @@ public class SI011ACTUALSALESSyncOutServiceTask {
item
.
setYLZD3
(
itemObject
.
getString
(
"YLZD3"
));
item
.
setYLZD3
(
itemObject
.
getString
(
"YLZD3"
));
itemList
.
add
(
item
);
itemList
.
add
(
item
);
}
}
BeanUtil
.
setEmptyStringIfNull
(
mt011ACTUALSALES
);
SI011ACTUALSALESSyncOut
.
si011ACTUALSALESSyncOut
(
mt011ACTUALSALES
);
SI011ACTUALSALESSyncOut
.
si011ACTUALSALESSyncOut
(
mt011ACTUALSALES
);
String
updateSql
=
"UPDATE t_dis_sales SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID IN ("
+
StringUtil
.
join
(
"?"
,
", "
,
idList
.
size
(),
""
,
""
)
+
")"
;
String
updateSql
=
"UPDATE t_dis_sales SET SEND_STATUS = 'Y', SEND_TIME = NOW() WHERE ID IN ("
+
StringUtil
.
join
(
"?"
,
", "
,
idList
.
size
(),
""
,
""
)
+
")"
;
jdbcTemplate
.
update
(
updateSql
,
idList
.
toArray
());
jdbcTemplate
.
update
(
updateSql
,
idList
.
toArray
());
...
...
src/main/java/com/egolm/sso/util/BeanUtil.java
0 → 100644
View file @
b0c97c63
package
com
.
egolm
.
sso
.
util
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
public
class
BeanUtil
{
private
static
Log
logger
=
LogFactory
.
getLog
(
BeanUtil
.
class
);
public
static
void
setEmptyStringIfNull
(
Object
o
)
{
if
(
o
!=
null
)
{
Class
<?>
clz
=
o
.
getClass
();
Field
[]
fields
=
clz
.
getDeclaredFields
();
for
(
Field
field
:
fields
)
{
Class
<?>
ftype
=
field
.
getType
();
try
{
field
.
setAccessible
(
true
);
Object
fvalue
=
field
.
get
(
o
);
if
(
ftype
==
String
.
class
)
{
if
(
fvalue
==
null
)
{
field
.
set
(
o
,
""
);
}
}
else
if
(
ftype
==
List
.
class
)
{
List
<?>
list
=
(
List
<?>)
fvalue
;
for
(
Object
obj
:
list
)
{
setEmptyStringIfNull
(
obj
);
}
}
else
{
setEmptyStringIfNull
(
fvalue
);
}
}
catch
(
Throwable
e
)
{
logger
.
warn
(
"Null field filling error"
,
e
);
}
}
}
}
}
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