Commit 81c10c91 authored by Quxl's avatar Quxl

x

parent e1d29811
...@@ -44,7 +44,7 @@ spring: ...@@ -44,7 +44,7 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.204.6.8:8066/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8mb4&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 username: schneider
password: schneider_e2e password: schneider_e2e
maxActive: 2000 maxActive: 2000
......
import org.junit.Test; //import org.junit.Test;
import org.junit.runner.RunWith; //import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
//
import com.egolm.sso.SapServiceApplication; //import com.egolm.sso.SapServiceApplication;
import com.egolm.sso.services.prforma_invoice.PrformaInvoiceService; //import com.egolm.sso.services.prforma_invoice.PrformaInvoiceService;
import com.egolm.sso.services.prforma_invoice.Z_MT_SD_005_PERFORM_INVOICE; //import com.egolm.sso.services.prforma_invoice.Z_MT_SD_005_PERFORM_INVOICE;
import com.google.gson.Gson; //import com.google.gson.Gson;
//
@RunWith(SpringRunner.class) //@RunWith(SpringRunner.class)
@SpringBootTest(classes=SapServiceApplication.class) //@SpringBootTest(classes=SapServiceApplication.class)
public class TestPrformalInvoice { //public class TestPrformalInvoice {
//
@Autowired // @Autowired
PrformaInvoiceService service; // PrformaInvoiceService service;
//
@Test // @Test
public void 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\"}]}}"; // 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); // 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); // service.execute(Z_MT_SD_005_PERFORM_INVOICE);
} // }
//
} //}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment