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
2d3d5753
Commit
2d3d5753
authored
Jul 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
93a4b99d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
454 additions
and
349 deletions
+454
-349
ConfirmQuotationServiceImpl.java
...rvices/confirm_quotation/ConfirmQuotationServiceImpl.java
+114
-94
DNDeletionServiceImpl.java
...egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
+39
-17
MaterialMasterServiceImpl.java
...o/services/material_master/MaterialMasterServiceImpl.java
+1
-1
PrformaInvoiceServiceImpl.java
...o/services/prforma_invoice/PrformaInvoiceServiceImpl.java
+131
-109
PriceListServiceImpl.java
...m/egolm/sso/services/price_list/PriceListServiceImpl.java
+64
-43
ShippingNotificationServiceImpl.java
...hipping_notfirmation/ShippingNotificationServiceImpl.java
+105
-85
No files found.
src/main/java/com/egolm/sso/services/confirm_quotation/ConfirmQuotationServiceImpl.java
View file @
2d3d5753
This diff is collapsed.
Click to expand it.
src/main/java/com/egolm/sso/services/dn_deletion/DNDeletionServiceImpl.java
View file @
2d3d5753
...
@@ -7,14 +7,18 @@ import java.util.Map;
...
@@ -7,14 +7,18 @@ import java.util.Map;
import
javax.jws.WebService
;
import
javax.jws.WebService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.SqlUtil
;
import
com.egolm.sso.util.SqlUtil
;
import
com.egolm.sso.util.SqlUtil.Sql
;
import
com.egolm.sso.util.SqlUtil.Sql
;
import
com.egolm.sso.util.XMLUtil
;
@Component
@Component
@WebService
(
serviceName
=
"DNDeletionService"
,
targetNamespace
=
"http://dn_deletion.sso.egolm.com"
,
endpointInterface
=
"com.egolm.sso.services.dn_deletion.DNDeletionService"
)
@WebService
(
serviceName
=
"DNDeletionService"
,
targetNamespace
=
"http://dn_deletion.sso.egolm.com"
,
endpointInterface
=
"com.egolm.sso.services.dn_deletion.DNDeletionService"
)
...
@@ -27,28 +31,46 @@ public class DNDeletionServiceImpl implements DNDeletionService {
...
@@ -27,28 +31,46 @@ public class DNDeletionServiceImpl implements DNDeletionService {
@Autowired
@Autowired
CommonService
common
;
CommonService
common
;
@Value
(
"${xmlRoot}"
)
private
String
xmlRoot
;
@Override
@Override
@Transactional
@Transactional
public
void
execute
(
DELETED_DOCUMENTS
DELETED_DOCUMENTS
)
{
public
void
execute
(
DELETED_DOCUMENTS
DELETED_DOCUMENTS
)
{
boolean
isSuccess
=
true
;
Date
now
=
new
Date
();
Date
now
=
new
Date
();
String
dateString
=
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATE
);
String
dateString
=
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATE
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
map
.
put
(
"MSGID"
,
DELETED_DOCUMENTS
.
getMSGID
());
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"TARGET_SYSTEM"
,
DELETED_DOCUMENTS
.
getTARGET_SYSTEM
());
map
.
put
(
"MSGID"
,
DELETED_DOCUMENTS
.
getMSGID
());
map
.
put
(
"DOCTYPE"
,
DELETED_DOCUMENTS
.
getDOCTYPE
());
map
.
put
(
"TARGET_SYSTEM"
,
DELETED_DOCUMENTS
.
getTARGET_SYSTEM
());
map
.
put
(
"DOCNUMBER"
,
DELETED_DOCUMENTS
.
getDOCNUMBER
());
map
.
put
(
"DOCTYPE"
,
DELETED_DOCUMENTS
.
getDOCTYPE
());
map
.
put
(
"SALES_ORG"
,
DELETED_DOCUMENTS
.
getSALES_ORG
());
map
.
put
(
"DOCNUMBER"
,
DELETED_DOCUMENTS
.
getDOCNUMBER
());
map
.
put
(
"DELETED_BY"
,
DELETED_DOCUMENTS
.
getDELETED_BY
());
map
.
put
(
"SALES_ORG"
,
DELETED_DOCUMENTS
.
getSALES_ORG
());
map
.
put
(
"SOLD_TO"
,
DELETED_DOCUMENTS
.
getSOLD_TO
());
map
.
put
(
"DELETED_BY"
,
DELETED_DOCUMENTS
.
getDELETED_BY
());
map
.
put
(
"BATCH"
,
dateString
+
"-"
+
common
.
getNextval
(
"T_SO_DN_DELETION_BATCH"
+
dateString
));
map
.
put
(
"SOLD_TO"
,
DELETED_DOCUMENTS
.
getSOLD_TO
());
map
.
put
(
"SEND_STATUS"
,
"N"
);
map
.
put
(
"BATCH"
,
dateString
+
"-"
+
common
.
getNextval
(
"T_SO_DN_DELETION_BATCH"
+
dateString
));
map
.
put
(
"SEND_TIME"
,
now
);
map
.
put
(
"SEND_STATUS"
,
"N"
);
map
.
put
(
"CREATED"
,
now
);
map
.
put
(
"SEND_TIME"
,
now
);
map
.
put
(
"CREATEDBY"
,
"system"
);
map
.
put
(
"CREATED"
,
now
);
map
.
put
(
"UPDATED"
,
now
);
map
.
put
(
"CREATEDBY"
,
"system"
);
map
.
put
(
"UPDATEDBY"
,
"system"
);
map
.
put
(
"UPDATED"
,
now
);
Sql
headerSql
=
SqlUtil
.
insertSql
(
"t_so_dn_deletion"
,
map
);
map
.
put
(
"UPDATEDBY"
,
"system"
);
jdbcTemplate
.
update
(
headerSql
.
getSql
(),
headerSql
.
getArgs
());
Sql
headerSql
=
SqlUtil
.
insertSql
(
"t_so_dn_deletion"
,
map
);
jdbcTemplate
.
update
(
headerSql
.
getSql
(),
headerSql
.
getArgs
());
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
throw
new
XRException
(
"数据保存失败"
,
e
);
}
finally
{
String
xmlName
=
DELETED_DOCUMENTS
.
getClass
().
getSimpleName
();
try
{
String
xml
=
XMLUtil
.
toXml
(
DELETED_DOCUMENTS
);
String
xmlFullName
=
xmlRoot
+
"/sap/"
+
xmlName
+
"/"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATE
)
+
"/"
+
(
isSuccess
?
"success"
:
"error"
)
+
"/"
+
xmlName
+
"-"
+
common
.
getNextval
(
xmlName
+
"_"
+
dateString
)
+
".XML"
;
FileUtil
.
writeText
(
xmlFullName
,
xml
);
}
catch
(
Exception
e
)
{
throw
new
XRException
(
"报文保存失败"
,
e
);
}
}
}
}
}
}
src/main/java/com/egolm/sso/services/material_master/MaterialMasterServiceImpl.java
View file @
2d3d5753
...
@@ -124,7 +124,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
...
@@ -124,7 +124,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
String
xmlName
=
Z_MT_SD_001_MATERIAL_MASTER
.
getClass
().
getSimpleName
();
String
xmlName
=
Z_MT_SD_001_MATERIAL_MASTER
.
getClass
().
getSimpleName
();
try
{
try
{
String
xml
=
XMLUtil
.
toXml
(
Z_MT_SD_001_MATERIAL_MASTER
);
String
xml
=
XMLUtil
.
toXml
(
Z_MT_SD_001_MATERIAL_MASTER
);
String
xmlFullName
=
xmlRoot
+
"/sap/"
+
xmlName
+
"/"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATE
)
+
"/"
+
(
isSuccess
?
"success"
:
"error"
)
+
"/"
+
xmlName
+
"-"
+
common
.
getNextval
(
dateString
+
"MATERIAL_MASTER_FILE_NAME
"
+
dateString
)
+
".XML"
;
String
xmlFullName
=
xmlRoot
+
"/sap/"
+
xmlName
+
"/"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATE
)
+
"/"
+
(
isSuccess
?
"success"
:
"error"
)
+
"/"
+
xmlName
+
"-"
+
common
.
getNextval
(
xmlName
+
"_
"
+
dateString
)
+
".XML"
;
FileUtil
.
writeText
(
xmlFullName
,
xml
);
FileUtil
.
writeText
(
xmlFullName
,
xml
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
XRException
(
"报文保存失败"
,
e
);
throw
new
XRException
(
"报文保存失败"
,
e
);
...
...
src/main/java/com/egolm/sso/services/prforma_invoice/PrformaInvoiceServiceImpl.java
View file @
2d3d5753
This diff is collapsed.
Click to expand it.
src/main/java/com/egolm/sso/services/price_list/PriceListServiceImpl.java
View file @
2d3d5753
...
@@ -10,16 +10,20 @@ import java.util.Map.Entry;
...
@@ -10,16 +10,20 @@ import java.util.Map.Entry;
import
javax.jws.WebService
;
import
javax.jws.WebService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.egolm.sso.config.XRException
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.CommonService
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.HEADER_SENDING
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.HEADER_SENDING
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.ITEM
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.ITEM
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.RECORD
;
import
com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST.RECORD
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.DateUtil
;
import
com.egolm.sso.util.FileUtil
;
import
com.egolm.sso.util.StringUtil
;
import
com.egolm.sso.util.StringUtil
;
import
com.egolm.sso.util.XMLUtil
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
@Component
@Component
...
@@ -32,56 +36,73 @@ public class PriceListServiceImpl implements PriceListService {
...
@@ -32,56 +36,73 @@ public class PriceListServiceImpl implements PriceListService {
@Autowired
@Autowired
CommonService
common
;
CommonService
common
;
@Value
(
"${xmlRoot}"
)
private
String
xmlRoot
;
@Override
@Override
@Transactional
@Transactional
public
void
execute
(
Z_MT_SD_002_PRICE_LIST
Z_MT_SD_002_PRICE_LIST
)
{
public
void
execute
(
Z_MT_SD_002_PRICE_LIST
Z_MT_SD_002_PRICE_LIST
)
{
boolean
isSuccess
=
true
;
Date
now
=
new
Date
();
Date
now
=
new
Date
();
String
today
=
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATE
);
String
dateString
=
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATE
);
System
.
out
.
println
(
new
Gson
().
toJson
(
Z_MT_SD_002_PRICE_LIST
));
System
.
out
.
println
(
new
Gson
().
toJson
(
Z_MT_SD_002_PRICE_LIST
));
RECORD
r
=
Z_MT_SD_002_PRICE_LIST
.
getRECORD
();
try
{
HEADER_SENDING
h
=
r
.
getHEADER_SENDING
();
RECORD
r
=
Z_MT_SD_002_PRICE_LIST
.
getRECORD
();
List
<
ITEM
>
items
=
r
.
getITEM
();
HEADER_SENDING
h
=
r
.
getHEADER_SENDING
();
List
<
ITEM
>
items
=
r
.
getITEM
();
String
KUNNR
=
h
.
getKUNNR
();
String
DATUM
=
h
.
getDATUM
();
String
UZEIT
=
h
.
getUZEIT
();
for
(
ITEM
item
:
items
)
{
String
MATNR
=
item
.
getMATNR
();
Map
<
String
,
Object
>
priceObj
=
getPriceObj
(
KUNNR
,
MATNR
);
if
(
priceObj
==
null
)
{
priceObj
=
new
HashMap
<>();
}
priceObj
.
put
(
"KUNNR"
,
KUNNR
);
String
KUNNR
=
h
.
getKUNNR
();
priceObj
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
String
DATUM
=
h
.
getDATUM
();
priceObj
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
String
UZEIT
=
h
.
getUZEIT
();
priceObj
.
put
(
"MATNR"
,
MATNR
);
for
(
ITEM
item
:
items
)
{
String
MATNR
=
item
.
getMATNR
();
priceObj
.
put
(
"KBETR"
,
StringUtil
.
toDouble
(
item
.
getKBETR
()));
Map
<
String
,
Object
>
priceObj
=
getPriceObj
(
KUNNR
,
MATNR
);
priceObj
.
put
(
"KONWA"
,
item
.
getKONWA
());
if
(
priceObj
==
null
)
{
priceObj
.
put
(
"KPEIN"
,
item
.
getKPEIN
());
priceObj
=
new
HashMap
<>();
priceObj
.
put
(
"KMEIN"
,
item
.
getKMEIN
());
}
priceObj
.
put
(
"UMREZ"
,
item
.
getUMREZ
());
priceObj
.
put
(
"MAKTX"
,
item
.
getMAKTX
());
priceObj
.
put
(
"KUNNR"
,
KUNNR
);
priceObj
.
put
(
"PRSCH"
,
StringUtil
.
toDouble
(
item
.
getPRSCH
()));
priceObj
.
put
(
"DATUM"
,
DateUtil
.
parseDate
(
DATUM
,
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"DATAM"
,
DateUtil
.
parseDate
(
item
.
getDATAM
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"UZEIT"
,
DateUtil
.
parseDate
(
UZEIT
,
DateUtil
.
FMT_TIME
));
priceObj
.
put
(
"DATBI"
,
DateUtil
.
parseDateNoEmpty
(
item
.
getDATBI
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"MATNR"
,
MATNR
);
priceObj
.
put
(
"PLINE"
,
item
.
getPLINE
());
priceObj
.
put
(
"PRSCH_1"
,
StringUtil
.
toDouble
(
item
.
getPRSCH_1
()));
priceObj
.
put
(
"KBETR"
,
StringUtil
.
toDouble
(
item
.
getKBETR
()));
/*
priceObj
.
put
(
"KONWA"
,
item
.
getKONWA
());
priceObj.put("SEND_DATE", new Date(0));// 发送时间
priceObj
.
put
(
"KPEIN"
,
item
.
getKPEIN
());
*/
priceObj
.
put
(
"KMEIN"
,
item
.
getKMEIN
());
priceObj
.
put
(
"SEND_STATUS"
,
"N"
);
priceObj
.
put
(
"UMREZ"
,
item
.
getUMREZ
());
Long
BATCHID
=
common
.
getNextval
(
"T_PRICE_LIST_BATCH_"
+
today
);
priceObj
.
put
(
"MAKTX"
,
item
.
getMAKTX
());
String
BATCH
=
today
+
"-"
+
BATCHID
;
priceObj
.
put
(
"PRSCH"
,
StringUtil
.
toDouble
(
item
.
getPRSCH
()));
priceObj
.
put
(
"DATAM"
,
DateUtil
.
parseDate
(
item
.
getDATAM
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"DATBI"
,
DateUtil
.
parseDateNoEmpty
(
item
.
getDATBI
(),
DateUtil
.
FMT_DATE
));
priceObj
.
put
(
"PLINE"
,
item
.
getPLINE
());
priceObj
.
put
(
"PRSCH_1"
,
StringUtil
.
toDouble
(
item
.
getPRSCH_1
()));
/*
priceObj.put("SEND_DATE", new Date(0));// 发送时间
*/
priceObj
.
put
(
"SEND_STATUS"
,
"N"
);
Long
BATCHID
=
common
.
getNextval
(
"T_PRICE_LIST_BATCH_"
+
dateString
);
String
BATCH
=
dateString
+
"-"
+
BATCHID
;
priceObj
.
put
(
"TRACE_NO"
,
"sappricelist"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
priceObj
.
put
(
"TRACE_NO"
,
"sappricelist"
+
DateUtil
.
formatDate
(
now
,
DateUtil
.
FMT_DATETIME
));
priceObj
.
put
(
"BATCH"
,
BATCH
);
priceObj
.
put
(
"BATCH"
,
BATCH
);
if
(
priceObj
.
get
(
"ID"
)
!=
null
)
{
if
(
priceObj
.
get
(
"ID"
)
!=
null
)
{
updatePriceObj
(
priceObj
);
updatePriceObj
(
priceObj
);
}
else
{
}
else
{
insertPriceObj
(
priceObj
);
insertPriceObj
(
priceObj
);
}
}
}
catch
(
Exception
e
)
{
isSuccess
=
false
;
throw
new
XRException
(
"数据保存失败"
,
e
);
}
finally
{
String
xmlName
=
Z_MT_SD_002_PRICE_LIST
.
getClass
().
getSimpleName
();
try
{
String
xml
=
XMLUtil
.
toXml
(
Z_MT_SD_002_PRICE_LIST
);
String
xmlFullName
=
xmlRoot
+
"/sap/"
+
xmlName
+
"/"
+
DateUtil
.
formatDate
(
new
Date
(),
DateUtil
.
FMT_DATE
)
+
"/"
+
(
isSuccess
?
"success"
:
"error"
)
+
"/"
+
xmlName
+
"-"
+
common
.
getNextval
(
xmlName
+
"_"
+
dateString
)
+
".XML"
;
FileUtil
.
writeText
(
xmlFullName
,
xml
);
}
catch
(
Exception
e
)
{
throw
new
XRException
(
"报文保存失败"
,
e
);
}
}
}
}
}
}
...
...
src/main/java/com/egolm/sso/services/shipping_notfirmation/ShippingNotificationServiceImpl.java
View file @
2d3d5753
This diff is collapsed.
Click to expand it.
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