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
87ba9f62
Commit
87ba9f62
authored
Aug 06, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
6ee9fa0f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
18 deletions
+44
-18
ConfirmQuotationServiceImpl.java
...rvices/confirm_quotation/ConfirmQuotationServiceImpl.java
+3
-3
DNDeletionServiceImpl.java
...egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
+3
-3
MaterialMasterServiceImpl.java
...o/services/material_master/MaterialMasterServiceImpl.java
+3
-3
PrformaInvoiceServiceImpl.java
...o/services/prforma_invoice/PrformaInvoiceServiceImpl.java
+3
-3
PriceListServiceImpl.java
...m/egolm/sso/services/price_list/PriceListServiceImpl.java
+3
-3
ShippingNotificationServiceImpl.java
...hipping_notfirmation/ShippingNotificationServiceImpl.java
+3
-3
ThrowableUtil.java
src/main/java/com/egolm/sso/util/ThrowableUtil.java
+26
-0
No files found.
src/main/java/com/egolm/sso/services/confirm_quotation/ConfirmQuotationServiceImpl.java
View file @
87ba9f62
...
...
@@ -167,7 +167,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
}
}
try
{
common
.
saveApiAccessLog
(
"S
oConfirmQuotation
"
,
"/confirm_quotation"
,
"S"
);
common
.
saveApiAccessLog
(
"S
AP报价单订单确认接口
"
,
"/confirm_quotation"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -175,8 +175,8 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"S
oConfirmQuotation
"
,
"/confirm_quotation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"S
AP报价单订单确认接口
"
,
"/confirm_quotation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SoConfirmQuotation"
,
VBELN
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
View file @
87ba9f62
...
...
@@ -76,7 +76,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
Sql
headerSql
=
SqlUtil
.
insertSql
(
"t_so_dn_deletion"
,
map
);
jdbcTemplate
.
update
(
headerSql
.
getSql
(),
headerSql
.
getArgs
());
try
{
common
.
saveApiAccessLog
(
"S
ODNDeletion
"
,
"/dn_deletion"
,
"S"
);
common
.
saveApiAccessLog
(
"S
AP单据删除通知接口
"
,
"/dn_deletion"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -84,8 +84,8 @@ public class DNDeletionServiceImpl implements DNDeletionService {
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"S
ODNDeletion
"
,
"/dn_deletion"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"S
AP单据删除通知接口
"
,
"/dn_deletion"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"SODNDeletion"
,
null
,
SOLD_TO
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/services/material_master/MaterialMasterServiceImpl.java
View file @
87ba9f62
...
...
@@ -123,7 +123,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
}
}
try
{
common
.
saveApiAccessLog
(
"
MaterialMaster
"
,
"/material_master"
,
"S"
);
common
.
saveApiAccessLog
(
"
SAP物料接口
"
,
"/material_master"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -131,8 +131,8 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"
MaterialMaster
"
,
"/material_master"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"
SAP物料接口
"
,
"/material_master"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"MaterialMaster"
,
null
,
DIS_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/services/prforma_invoice/PrformaInvoiceServiceImpl.java
View file @
87ba9f62
...
...
@@ -250,7 +250,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
Sql
itemDataSql
=
SqlUtil
.
insertSqlBatch
(
"t_perform_invoice_item_data"
,
itemDatas
);
jdbcTemplate
.
batchUpdate
(
itemDataSql
.
getSql
(),
itemDataSql
.
getBachArgs
());
try
{
common
.
saveApiAccessLog
(
"
ProFormaInvoice
"
,
"/prforma_invoice"
,
"S"
);
common
.
saveApiAccessLog
(
"
SAP形式发票接口
"
,
"/prforma_invoice"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -258,8 +258,8 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"
ProFormaInvoice
"
,
"/prforma_invoice"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"
SAP形式发票接口
"
,
"/prforma_invoice"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ProFormaInvoice"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/services/price_list/PriceListServiceImpl.java
View file @
87ba9f62
...
...
@@ -106,7 +106,7 @@ public class PriceListServiceImpl implements PriceListService {
}
}
try
{
common
.
saveApiAccessLog
(
"
PriceList
"
,
"/price_list"
,
"S"
);
common
.
saveApiAccessLog
(
"
SAP列表价接口
"
,
"/price_list"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -114,8 +114,8 @@ public class PriceListServiceImpl implements PriceListService {
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"
PriceList
"
,
"/price_list"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"
SAP列表价接口
"
,
"/price_list"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"PriceList"
,
null
,
KUNNR
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/services/shipping_notfirmation/ShippingNotificationServiceImpl.java
View file @
87ba9f62
...
...
@@ -175,7 +175,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
}
}
try
{
common
.
saveApiAccessLog
(
"S
hippingNotification
"
,
"/shipping_notfirmation"
,
"S"
);
common
.
saveApiAccessLog
(
"S
AP发货通知接口
"
,
"/shipping_notfirmation"
,
"S"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"S"
,
null
,
null
);
}
catch
(
Throwable
e
)
{
logger
.
error
(
timeString
,
e
);
...
...
@@ -183,8 +183,8 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
try
{
common
.
saveApiAccessLog
(
"S
hippingNotification
"
,
"/shipping_notfirmation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
Caused
(
e
).
getMessage
(
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
common
.
saveApiAccessLog
(
"S
AP发货通知接口
"
,
"/shipping_notfirmation"
,
"F"
);
common
.
saveOrderTracking
(
TRACE_NO
,
"ShippingNotification"
,
null
,
BATCH_CODE
,
"U"
,
"F"
,
ThrowableUtil
.
get
ThrowableDesc
(
e
),
ThrowableUtil
.
toStackString
(
e
)
+
" -- "
+
timeString
);
}
catch
(
Throwable
e1
)
{
logger
.
error
(
timeString
,
e1
);
}
...
...
src/main/java/com/egolm/sso/util/ThrowableUtil.java
View file @
87ba9f62
package
com
.
egolm
.
sso
.
util
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
public
class
ThrowableUtil
{
public
static
Throwable
getCaused
(
Throwable
e
)
{
...
...
@@ -27,4 +32,25 @@ public class ThrowableUtil {
return
stack
;
}
private
static
final
Map
<
Pattern
,
String
>
map
=
new
HashMap
<
Pattern
,
String
>();
static
{
map
.
put
(
Pattern
.
compile
(
"NumberFormatException: For input string: "
),
"上传数据格式错误"
);
map
.
put
(
Pattern
.
compile
(
"Unparseable date"
),
"日期格式错误"
);
map
.
put
(
Pattern
.
compile
(
"Data truncation"
),
"数据长度错误"
);
}
public
static
String
getThrowableDesc
(
Throwable
e
)
{
return
getThrowableDesc
(
getCaused
(
e
).
getMessage
());
}
public
static
String
getThrowableDesc
(
String
message
)
{
for
(
Pattern
pattern
:
map
.
keySet
())
{
Matcher
matcher
=
pattern
.
matcher
(
message
);
if
(
matcher
.
find
())
{
return
map
.
get
(
pattern
);
}
}
return
"未知错误类型"
;
}
}
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