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
4fbb8df4
Commit
4fbb8df4
authored
Aug 06, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
83222ec1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
16 deletions
+33
-16
TestController.java
src/main/java/com/egolm/sso/TestController.java
+1
-1
CommonService.java
src/main/java/com/egolm/sso/services/CommonService.java
+1
-1
ConfirmQuotationServiceImpl.java
...rvices/confirm_quotation/ConfirmQuotationServiceImpl.java
+2
-2
DNDeletionServiceImpl.java
...egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
+2
-2
MaterialMasterServiceImpl.java
...o/services/material_master/MaterialMasterServiceImpl.java
+2
-2
PrformaInvoiceServiceImpl.java
...o/services/prforma_invoice/PrformaInvoiceServiceImpl.java
+2
-2
PriceListServiceImpl.java
...m/egolm/sso/services/price_list/PriceListServiceImpl.java
+2
-2
ShippingNotificationServiceImpl.java
...hipping_notfirmation/ShippingNotificationServiceImpl.java
+2
-2
ThrowableUtil.java
src/main/java/com/egolm/sso/util/ThrowableUtil.java
+16
-0
ZMISD009SOCREATIONTask.java
...ava/com/schneider_distributor/ZMISD009SOCREATIONTask.java
+3
-2
No files found.
src/main/java/com/egolm/sso/TestController.java
View file @
4fbb8df4
...
@@ -68,7 +68,7 @@ public class TestController {
...
@@ -68,7 +68,7 @@ public class TestController {
@GetMapping
(
"saveOrderTracking"
)
@GetMapping
(
"saveOrderTracking"
)
public
Object
saveOrderTracking
()
{
public
Object
saveOrderTracking
()
{
return
common
.
saveOrderTracking
(
"sapmaterialmaster"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATETIME
),
"MaterialMaster"
,
"123456"
,
"123456"
,
"G"
,
null
,
"操作失败"
);
return
common
.
saveOrderTracking
(
"sapmaterialmaster"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATETIME
),
"MaterialMaster"
,
"123456"
,
"123456"
,
"G"
,
null
,
"操作失败"
,
"操作失败"
);
}
}
...
...
src/main/java/com/egolm/sso/services/CommonService.java
View file @
4fbb8df4
...
@@ -131,7 +131,7 @@ public class CommonService {
...
@@ -131,7 +131,7 @@ public class CommonService {
}
}
}
}
public
String
saveOrderTracking
(
String
traceNo
,
String
orderType
,
String
orderNo
,
String
disCode
,
String
action
,
String
result
,
String
errorMessage
)
{
public
String
saveOrderTracking
(
String
traceNo
,
String
orderType
,
String
orderNo
,
String
disCode
,
String
action
,
String
result
,
String
message
,
String
errorMessage
)
{
if
(
isOpen
)
{
if
(
isOpen
)
{
String
requestUrl
=
baseUrl
+
insertOrderTrackingUri
;
String
requestUrl
=
baseUrl
+
insertOrderTrackingUri
;
String
token
=
this
.
getToken
();
String
token
=
this
.
getToken
();
...
...
src/main/java/com/egolm/sso/services/confirm_quotation/ConfirmQuotationServiceImpl.java
View file @
4fbb8df4
...
@@ -168,7 +168,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
...
@@ -168,7 +168,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
}
}
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/confirm_quotation"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/confirm_quotation"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -176,7 +176,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
...
@@ -176,7 +176,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/confirm_quotation"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/confirm_quotation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
View file @
4fbb8df4
...
@@ -77,7 +77,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
...
@@ -77,7 +77,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
jdbcTemplate
.
update
(
headerSql
.
getSql
(),
headerSql
.
getArgs
());
jdbcTemplate
.
update
(
headerSql
.
getSql
(),
headerSql
.
getArgs
());
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/dn_deletion"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/dn_deletion"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -85,7 +85,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
...
@@ -85,7 +85,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/dn_deletion"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/dn_deletion"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/services/material_master/MaterialMasterServiceImpl.java
View file @
4fbb8df4
...
@@ -124,7 +124,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -124,7 +124,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
}
}
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/material_master"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/material_master"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -132,7 +132,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -132,7 +132,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/material_master"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/material_master"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/services/prforma_invoice/PrformaInvoiceServiceImpl.java
View file @
4fbb8df4
...
@@ -251,7 +251,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -251,7 +251,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
jdbcTemplate
.
batchUpdate
(
itemDataSql
.
getSql
(),
itemDataSql
.
getBachArgs
());
jdbcTemplate
.
batchUpdate
(
itemDataSql
.
getSql
(),
itemDataSql
.
getBachArgs
());
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/prforma_invoice"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/prforma_invoice"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -259,7 +259,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
...
@@ -259,7 +259,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/prforma_invoice"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/prforma_invoice"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/services/price_list/PriceListServiceImpl.java
View file @
4fbb8df4
...
@@ -107,7 +107,7 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -107,7 +107,7 @@ public class PriceListServiceImpl implements PriceListService {
}
}
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/price_list"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/price_list"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -115,7 +115,7 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -115,7 +115,7 @@ public class PriceListServiceImpl implements PriceListService {
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/price_list"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/price_list"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/services/shipping_notfirmation/ShippingNotificationServiceImpl.java
View file @
4fbb8df4
...
@@ -176,7 +176,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
...
@@ -176,7 +176,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
}
}
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/shipping_notfirmation"
,
"S"
);
common
.
saveApiAccessLog
(
"execute"
,
"/shipping_notfirmation"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
logger
.
error
(
timeString
,
e
);
}
}
...
@@ -184,7 +184,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
...
@@ -184,7 +184,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
isSuccess
=
false
;
isSuccess
=
false
;
try
{
try
{
common
.
saveApiAccessLog
(
"execute"
,
"/shipping_notfirmation"
,
"F"
);
common
.
saveApiAccessLog
(
"execute"
,
"/shipping_notfirmation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
+
" -- "
+
timeString
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
()
,
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
logger
.
error
(
timeString
,
e1
);
}
}
...
...
src/main/java/com/egolm/sso/util/ThrowableUtil.java
View file @
4fbb8df4
...
@@ -10,5 +10,21 @@ public class ThrowableUtil {
...
@@ -10,5 +10,21 @@ public class ThrowableUtil {
return
e
;
return
e
;
}
}
}
}
public
static
StringBuffer
toStackString
(
Throwable
ex
)
{
StringBuffer
stack
=
new
StringBuffer
();
if
(
ex
!=
null
)
{
stack
.
append
(
ex
.
getClass
().
getName
()).
append
(
ex
.
getMessage
());
StackTraceElement
[]
elms
=
ex
.
getStackTrace
();
for
(
StackTraceElement
elm
:
elms
)
{
stack
.
append
(
"\t"
).
append
(
elm
.
getClassName
()).
append
(
"."
).
append
(
elm
.
getMethodName
()).
append
(
"("
).
append
(
elm
.
getFileName
()).
append
(
" "
).
append
(
elm
.
getLineNumber
()).
append
(
")\n"
);
}
stack
.
append
(
"\n\n"
).
append
(
"Cause By: \n"
).
append
(
toStackString
(
ex
.
getCause
()));
for
(
Throwable
e
:
ex
.
getSuppressed
())
{
stack
.
append
(
"\n\n"
).
append
(
"Suppressed By: \n"
).
append
(
toStackString
(
e
));
}
}
return
stack
;
}
}
}
src/main/java/com/schneider_distributor/ZMISD009SOCREATIONTask.java
View file @
4fbb8df4
...
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.util.ServiceFactory
;
import
com.egolm.sso.util.ServiceFactory
;
import
com.egolm.sso.util.ThrowableUtil
;
import
com.schneider_distributor.ZDTSD009SOCREATION.Header
;
import
com.schneider_distributor.ZDTSD009SOCREATION.Header
;
import
com.schneider_distributor.ZDTSD009SOCREATION.ITEM
;
import
com.schneider_distributor.ZDTSD009SOCREATION.ITEM
;
...
@@ -106,14 +107,14 @@ public class ZMISD009SOCREATIONTask {
...
@@ -106,14 +107,14 @@ public class ZMISD009SOCREATIONTask {
ZMISD009SOCREATION
.
zMISD009SOCREATION
(
ZDTSD009SOCREATIONBean
);
ZMISD009SOCREATION
.
zMISD009SOCREATION
(
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
);
try
{
try
{
common
.
saveOrderTracking
(
TRACE_NO
,
"SoCreation"
,
null
,
KUNNR
,
"D"
,
"S
UCCESS"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoCreation"
,
null
,
KUNNR
,
"D"
,
"S
"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
catch
(
DataAccessException
e
)
{
}
catch
(
DataAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
try
{
try
{
common
.
saveOrderTracking
(
TRACE_NO
,
"SoCreation"
,
null
,
KUNNR
,
"D"
,
"
ERROR"
,
null
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoCreation"
,
null
,
KUNNR
,
"D"
,
"
F"
,
ThrowableUtil
.
getCaused
(
e
).
getMessage
(),
ThrowableUtil
.
toStackString
(
e
).
toString
()
);
}
catch
(
Throwable
e1
)
{
}
catch
(
Throwable
e1
)
{
e1
.
printStackTrace
();
e1
.
printStackTrace
();
}
}
...
...
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