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
81c10c91
Commit
81c10c91
authored
Aug 16, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
e1d29811
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
application.yml
src/main/resources/application.yml
+1
-1
TestPrformalInvoice.java
src/test/java/TestPrformalInvoice.java
+26
-26
No files found.
src/main/resources/application.yml
View file @
81c10c91
...
...
@@ -44,7 +44,7 @@ spring:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
driverClassName
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://10.204.6.8:8066/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8
mb4
&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8
url
:
jdbc:mysql://10.204.6.8:8066/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT%2B8
username
:
schneider
password
:
schneider_e2e
maxActive
:
2000
...
...
src/test/java/TestPrformalInvoice.java
View file @
81c10c91
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
com.egolm.sso.SapServiceApplication
;
import
com.egolm.sso.services.prforma_invoice.PrformaInvoiceService
;
import
com.egolm.sso.services.prforma_invoice.Z_MT_SD_005_PERFORM_INVOICE
;
import
com.google.gson.Gson
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
SapServiceApplication
.
class
)
public
class
TestPrformalInvoice
{
@Autowired
PrformaInvoiceService
service
;
@Test
public
void
test
()
{
String
json
=
"{\"Z_DT_SD_005_PERFORM_INVOICE\":{\"HEADER_GENERAL_DATA\":{\"BELNR\":\"0048142320\",\"ZTERM\":\"Z018\"},\"HEADER_PARTNER_DATA\":[{\"PARVW\":\"AG\",\"PARTN\":\"0000161960\"},{\"PARVW\":\"WE\",\"PARTN\":\"0000161960\"}],\"HEADER_DOCU_DATE\":{\"IDDAT\":\"012\",\"DATUM\":\"20190815\"},\"HEADER_REFERENCE_DATA\":{\"QUALF\":\"012\",\"BELNR\":\"0815482872\",\"DATUM\":\"20190816\"},\"HEADER_ORGANIZATIONAL_DATA\":[{\"QUALF\":\"008\",\"ORGID\":\"I003\"},{\"QUALF\":\"007\",\"ORGID\":\"01\"},{\"QUALF\":\"006\",\"ORGID\":\"01\"},{\"QUALF\":\"015\",\"ORGID\":\"F8\"}],\"ITEM_DATA\":[{\"ITEM_REFERENCE_DATA\":[{\"QUALF\":\"002\",\"BELNR\":\"2001895217\",\"ZEILE\":\"000010\"},{\"QUALF\":\"016\",\"BELNR\":\"0815482872\",\"ZEILE\":\"000010\"}],\"ITEM_MATERIAL_DATA\":{\"QUALF\":\"002\",\"IDTNR\":\"A9F18302\"},\"ITEM_AMOUNT_DATA\":[{\"QUALF\":\"003\",\"BETRG\":\"6000.00\"},{\"QUALF\":\"001\",\"BETRG\":\"500.00\"}],\"ITEM_REFERENCE_PO_TYPE\":[{\"ITEM_REFERENCE_PO_DATA\":{\"TDLINE\":\"1\"},\"TDID\":\"ZXI1\"},{\"ITEM_REFERENCE_PO_DATA\":{\"TDLINE\":\"PE2E0815\"},\"TDID\":\"ZXI2\"}],\"POSEX\":\"000010\",\"MENGE\":\"12.000\",\"MENEE\":\"PCE\",\"WERKS\":\"N001\"},{\"ITEM_REFERENCE_DATA\":[{\"QUALF\":\"002\",\"BELNR\":\"2001895220\",\"ZEILE\":\"000010\"},{\"QUALF\":\"016\",\"BELNR\":\"0815482872\",\"ZEILE\":\"000020\"}],\"ITEM_MATERIAL_DATA\":{\"QUALF\":\"002\",\"IDTNR\":\"A9F19210\"},\"ITEM_AMOUNT_DATA\":[{\"QUALF\":\"003\",\"BETRG\":\"6000.00\"},{\"QUALF\":\"001\",\"BETRG\":\"1000.00\"}],\"POSEX\":\"000020\",\"MENGE\":\"6.000\",\"MENEE\":\"PCE\",\"WERKS\":\"N001\"}],\"SUMMARY_GENERAL\":[{\"SUMID\":\"005\",\"SUMME\":\"1560.00\",\"WAERQ\":\"RMB\"},{\"SUMID\":\"010\",\"SUMME\":\"12000.00\",\"WAERQ\":\"RMB\"}]}}"
;
Z_MT_SD_005_PERFORM_INVOICE
Z_MT_SD_005_PERFORM_INVOICE
=
new
Gson
().
fromJson
(
json
,
Z_MT_SD_005_PERFORM_INVOICE
.
class
);
service
.
execute
(
Z_MT_SD_005_PERFORM_INVOICE
);
}
}
//
import org.junit.Test;
//
import org.junit.runner.RunWith;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.boot.test.context.SpringBootTest;
//
import org.springframework.test.context.junit4.SpringRunner;
//
//
import com.egolm.sso.SapServiceApplication;
//
import com.egolm.sso.services.prforma_invoice.PrformaInvoiceService;
//
import com.egolm.sso.services.prforma_invoice.Z_MT_SD_005_PERFORM_INVOICE;
//
import com.google.gson.Gson;
//
//
@RunWith(SpringRunner.class)
//
@SpringBootTest(classes=SapServiceApplication.class)
//
public class TestPrformalInvoice {
//
//
@Autowired
//
PrformaInvoiceService service;
//
//
@Test
//
public void test() {
//
String json = "{\"Z_DT_SD_005_PERFORM_INVOICE\":{\"HEADER_GENERAL_DATA\":{\"BELNR\":\"0048142320\",\"ZTERM\":\"Z018\"},\"HEADER_PARTNER_DATA\":[{\"PARVW\":\"AG\",\"PARTN\":\"0000161960\"},{\"PARVW\":\"WE\",\"PARTN\":\"0000161960\"}],\"HEADER_DOCU_DATE\":{\"IDDAT\":\"012\",\"DATUM\":\"20190815\"},\"HEADER_REFERENCE_DATA\":{\"QUALF\":\"012\",\"BELNR\":\"0815482872\",\"DATUM\":\"20190816\"},\"HEADER_ORGANIZATIONAL_DATA\":[{\"QUALF\":\"008\",\"ORGID\":\"I003\"},{\"QUALF\":\"007\",\"ORGID\":\"01\"},{\"QUALF\":\"006\",\"ORGID\":\"01\"},{\"QUALF\":\"015\",\"ORGID\":\"F8\"}],\"ITEM_DATA\":[{\"ITEM_REFERENCE_DATA\":[{\"QUALF\":\"002\",\"BELNR\":\"2001895217\",\"ZEILE\":\"000010\"},{\"QUALF\":\"016\",\"BELNR\":\"0815482872\",\"ZEILE\":\"000010\"}],\"ITEM_MATERIAL_DATA\":{\"QUALF\":\"002\",\"IDTNR\":\"A9F18302\"},\"ITEM_AMOUNT_DATA\":[{\"QUALF\":\"003\",\"BETRG\":\"6000.00\"},{\"QUALF\":\"001\",\"BETRG\":\"500.00\"}],\"ITEM_REFERENCE_PO_TYPE\":[{\"ITEM_REFERENCE_PO_DATA\":{\"TDLINE\":\"1\"},\"TDID\":\"ZXI1\"},{\"ITEM_REFERENCE_PO_DATA\":{\"TDLINE\":\"PE2E0815\"},\"TDID\":\"ZXI2\"}],\"POSEX\":\"000010\",\"MENGE\":\"12.000\",\"MENEE\":\"PCE\",\"WERKS\":\"N001\"},{\"ITEM_REFERENCE_DATA\":[{\"QUALF\":\"002\",\"BELNR\":\"2001895220\",\"ZEILE\":\"000010\"},{\"QUALF\":\"016\",\"BELNR\":\"0815482872\",\"ZEILE\":\"000020\"}],\"ITEM_MATERIAL_DATA\":{\"QUALF\":\"002\",\"IDTNR\":\"A9F19210\"},\"ITEM_AMOUNT_DATA\":[{\"QUALF\":\"003\",\"BETRG\":\"6000.00\"},{\"QUALF\":\"001\",\"BETRG\":\"1000.00\"}],\"POSEX\":\"000020\",\"MENGE\":\"6.000\",\"MENEE\":\"PCE\",\"WERKS\":\"N001\"}],\"SUMMARY_GENERAL\":[{\"SUMID\":\"005\",\"SUMME\":\"1560.00\",\"WAERQ\":\"RMB\"},{\"SUMID\":\"010\",\"SUMME\":\"12000.00\",\"WAERQ\":\"RMB\"}]}}";
//
Z_MT_SD_005_PERFORM_INVOICE Z_MT_SD_005_PERFORM_INVOICE = new Gson().fromJson(json, Z_MT_SD_005_PERFORM_INVOICE.class);
//
service.execute(Z_MT_SD_005_PERFORM_INVOICE);
//
}
//
//
}
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