Commit 3e817d52 authored by Quxl's avatar Quxl

x

parent 3207fbd9
......@@ -9,8 +9,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableScheduling
@SpringBootApplication
@EnableTransactionManagement
@SpringBootApplication(scanBasePackages= {"com.schneider_distributor", "com.egolm.sso"})
public class SapServiceApplication {
private static ApplicationContext applicationContext;
......
......@@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATIONServiceTask;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.util.DateUtil;
import com.schneider_distributor.ZMISD009SOCREATIONTask;
@RestController
@RequestMapping
......@@ -29,7 +29,7 @@ public class TestController {
private CommonService common;
@Autowired
ZMISD009SOCREATIONTask task;
ZMISD009SOCREATIONServiceTask task;
private void verify() {
if(!profiles.contains("dev")) {
......
package com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _MT004INVENTORY_QNAME = new QName("http://distributors.edi.digital.cn.se.com", "MT_004_INVENTORY");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING }
*
*/
public ZDTSD004INVENTORYSENDING createZDTSD004INVENTORYSENDING() {
return new ZDTSD004INVENTORYSENDING();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD createZDTSD004INVENTORYSENDINGRECORD() {
return new ZDTSD004INVENTORYSENDING.RECORD();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO createZDTSD004INVENTORYSENDINGRECORDREVENUERATIO() {
return new ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD createZDTSD004INVENTORYSENDINGRECORDINVENTORYRECORD() {
return new ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.HEADER }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.HEADER createZDTSD004INVENTORYSENDINGRECORDREVENUERATIOHEADER() {
return new ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.HEADER();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.ITEM }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.ITEM createZDTSD004INVENTORYSENDINGRECORDREVENUERATIOITEM() {
return new ZDTSD004INVENTORYSENDING.RECORD.REVENUERATIO.ITEM();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER createZDTSD004INVENTORYSENDINGRECORDINVENTORYRECORDHEADER() {
return new ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER();
}
/**
* Create an instance of {@link ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.ITEM }
*
*/
public ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.ITEM createZDTSD004INVENTORYSENDINGRECORDINVENTORYRECORDITEM() {
return new ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.ITEM();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ZDTSD004INVENTORYSENDING }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://distributors.edi.digital.cn.se.com", name = "MT_004_INVENTORY")
public JAXBElement<ZDTSD004INVENTORYSENDING> createMT004INVENTORY(ZDTSD004INVENTORYSENDING value) {
return new JAXBElement<ZDTSD004INVENTORYSENDING>(_MT004INVENTORY_QNAME, ZDTSD004INVENTORYSENDING.class, null, value);
}
}
package com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-08-08T10:55:10.493+08:00
* Generated source version: 3.2.9
*
*/
@WebService(targetNamespace = "http://distributors.edi.digital.cn.se.com", name = "SI_004_INVENTORY_SyncOut")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface SI004INVENTORYSyncOut {
@WebMethod(operationName = "SI_004_INVENTORY_SyncOut", action = "http://sap.com/xi/WebService/soap1.1")
@Oneway
public void si004INVENTORYSyncOut(
@WebParam(partName = "MT_004_INVENTORY", name = "MT_004_INVENTORY", targetNamespace = "http://distributors.edi.digital.cn.se.com")
ZDTSD004INVENTORYSENDING mt004INVENTORY
);
}
package com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-08-08T10:55:10.526+08:00
* Generated source version: 3.2.9
*
*/
@WebServiceClient(name = "SI_004_INVENTORY_SyncOutService",
wsdlLocation = "file:/C:/Users/Quxl/Desktop/WSDL/SI_004_INVENTORY_SyncOutService.wsdl",
targetNamespace = "http://distributors.edi.digital.cn.se.com")
public class SI004INVENTORYSyncOutService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://distributors.edi.digital.cn.se.com", "SI_004_INVENTORY_SyncOutService");
public final static QName HTTPSPort = new QName("http://distributors.edi.digital.cn.se.com", "HTTPS_Port");
public final static QName HTTPPort = new QName("http://distributors.edi.digital.cn.se.com", "HTTP_Port");
static {
URL url = null;
try {
url = new URL("file:/C:/Users/Quxl/Desktop/WSDL/SI_004_INVENTORY_SyncOutService.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(SI004INVENTORYSyncOutService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/C:/Users/Quxl/Desktop/WSDL/SI_004_INVENTORY_SyncOutService.wsdl");
}
WSDL_LOCATION = url;
}
public SI004INVENTORYSyncOutService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public SI004INVENTORYSyncOutService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public SI004INVENTORYSyncOutService() {
super(WSDL_LOCATION, SERVICE);
}
public SI004INVENTORYSyncOutService(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public SI004INVENTORYSyncOutService(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public SI004INVENTORYSyncOutService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns SI004INVENTORYSyncOut
*/
@WebEndpoint(name = "HTTPS_Port")
public SI004INVENTORYSyncOut getHTTPSPort() {
return super.getPort(HTTPSPort, SI004INVENTORYSyncOut.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SI004INVENTORYSyncOut
*/
@WebEndpoint(name = "HTTPS_Port")
public SI004INVENTORYSyncOut getHTTPSPort(WebServiceFeature... features) {
return super.getPort(HTTPSPort, SI004INVENTORYSyncOut.class, features);
}
/**
*
* @return
* returns SI004INVENTORYSyncOut
*/
@WebEndpoint(name = "HTTP_Port")
public SI004INVENTORYSyncOut getHTTPPort() {
return super.getPort(HTTPPort, SI004INVENTORYSyncOut.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SI004INVENTORYSyncOut
*/
@WebEndpoint(name = "HTTP_Port")
public SI004INVENTORYSyncOut getHTTPPort(WebServiceFeature... features) {
return super.getPort(HTTPPort, SI004INVENTORYSyncOut.class, features);
}
}
package com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService;
import java.io.File;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.CommonService;
@Component
public class SI004INVENTORYSyncOutServiceTask {
Log logger = LogFactory.getLog(SI004INVENTORYSyncOutServiceTask.class);
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private CommonService common;
@Value("${schneider.username}")
private String username;
@Value("${schneider.password}")
private String password;
@Value("${WSDLPATH}")
private String WSDLPATH;
@Transactional
@Scheduled(cron="${cronSi011}")
public void execute() {
this.runTask();
}
public static void main(String[] args) {
new SI004INVENTORYSyncOutServiceTask().execute();
}
public void runTask() {
ApplicationHome home = new ApplicationHome(getClass());
File jarFile = home.getSource();
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_011_ACTUAL_SALES_SyncOutService.wsdl";
SI004INVENTORYSyncOut service = ServiceFactory.create(SI004INVENTORYSyncOut.class, wsdlLocation, "http://distributors.edi.digital.cn.se.com", "SI_004_INVENTORY_SyncOutService", username, password);
this.sendData(service);
}
private void sendData(SI004INVENTORYSyncOut SI004INVENTORYSyncOut) {
}
}
@javax.xml.bind.annotation.XmlSchema(namespace = "http://distributors.edi.digital.cn.se.com")
package com.egolm.sso.distributors.SI_004_INVENTORY_SyncOutService;
package com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _MT011ACTUALSALES_QNAME = new QName("http://distributors.edi.digital.cn.se.com", "MT_011_ACTUAL_SALES");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ZDTSD011ACTUALSALESSENDING }
*
*/
public ZDTSD011ACTUALSALESSENDING createZDTSD011ACTUALSALESSENDING() {
return new ZDTSD011ACTUALSALESSENDING();
}
/**
* Create an instance of {@link ZDTSD011ACTUALSALESSENDING.RECORD }
*
*/
public ZDTSD011ACTUALSALESSENDING.RECORD createZDTSD011ACTUALSALESSENDINGRECORD() {
return new ZDTSD011ACTUALSALESSENDING.RECORD();
}
/**
* Create an instance of {@link ZDTSD011ACTUALSALESSENDING.RECORD.HEADER }
*
*/
public ZDTSD011ACTUALSALESSENDING.RECORD.HEADER createZDTSD011ACTUALSALESSENDINGRECORDHEADER() {
return new ZDTSD011ACTUALSALESSENDING.RECORD.HEADER();
}
/**
* Create an instance of {@link ZDTSD011ACTUALSALESSENDING.RECORD.ITEM }
*
*/
public ZDTSD011ACTUALSALESSENDING.RECORD.ITEM createZDTSD011ACTUALSALESSENDINGRECORDITEM() {
return new ZDTSD011ACTUALSALESSENDING.RECORD.ITEM();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ZDTSD011ACTUALSALESSENDING }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://distributors.edi.digital.cn.se.com", name = "MT_011_ACTUAL_SALES")
public JAXBElement<ZDTSD011ACTUALSALESSENDING> createMT011ACTUALSALES(ZDTSD011ACTUALSALESSENDING value) {
return new JAXBElement<ZDTSD011ACTUALSALESSENDING>(_MT011ACTUALSALES_QNAME, ZDTSD011ACTUALSALESSENDING.class, null, value);
}
}
package com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-08-08T10:55:41.970+08:00
* Generated source version: 3.2.9
*
*/
@WebService(targetNamespace = "http://distributors.edi.digital.cn.se.com", name = "SI_011_ACTUAL_SALES_SyncOut")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface SI011ACTUALSALESSyncOut {
@WebMethod(operationName = "SI_011_ACTUAL_SALES_SyncOut", action = "http://sap.com/xi/WebService/soap1.1")
@Oneway
public void si011ACTUALSALESSyncOut(
@WebParam(partName = "MT_011_ACTUAL_SALES", name = "MT_011_ACTUAL_SALES", targetNamespace = "http://distributors.edi.digital.cn.se.com")
ZDTSD011ACTUALSALESSENDING mt011ACTUALSALES
);
}
package com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-08-08T10:55:42.002+08:00
* Generated source version: 3.2.9
*
*/
@WebServiceClient(name = "SI_011_ACTUAL_SALES_SyncOutService",
wsdlLocation = "file:/C:/Users/Quxl/Desktop/WSDL/SI_011_ACTUAL_SALES_SyncOutService.wsdl",
targetNamespace = "http://distributors.edi.digital.cn.se.com")
public class SI011ACTUALSALESSyncOutService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://distributors.edi.digital.cn.se.com", "SI_011_ACTUAL_SALES_SyncOutService");
public final static QName HTTPSPort = new QName("http://distributors.edi.digital.cn.se.com", "HTTPS_Port");
public final static QName HTTPPort = new QName("http://distributors.edi.digital.cn.se.com", "HTTP_Port");
static {
URL url = null;
try {
url = new URL("file:/C:/Users/Quxl/Desktop/WSDL/SI_011_ACTUAL_SALES_SyncOutService.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(SI011ACTUALSALESSyncOutService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/C:/Users/Quxl/Desktop/WSDL/SI_011_ACTUAL_SALES_SyncOutService.wsdl");
}
WSDL_LOCATION = url;
}
public SI011ACTUALSALESSyncOutService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public SI011ACTUALSALESSyncOutService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public SI011ACTUALSALESSyncOutService() {
super(WSDL_LOCATION, SERVICE);
}
public SI011ACTUALSALESSyncOutService(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public SI011ACTUALSALESSyncOutService(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public SI011ACTUALSALESSyncOutService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns SI011ACTUALSALESSyncOut
*/
@WebEndpoint(name = "HTTPS_Port")
public SI011ACTUALSALESSyncOut getHTTPSPort() {
return super.getPort(HTTPSPort, SI011ACTUALSALESSyncOut.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SI011ACTUALSALESSyncOut
*/
@WebEndpoint(name = "HTTPS_Port")
public SI011ACTUALSALESSyncOut getHTTPSPort(WebServiceFeature... features) {
return super.getPort(HTTPSPort, SI011ACTUALSALESSyncOut.class, features);
}
/**
*
* @return
* returns SI011ACTUALSALESSyncOut
*/
@WebEndpoint(name = "HTTP_Port")
public SI011ACTUALSALESSyncOut getHTTPPort() {
return super.getPort(HTTPPort, SI011ACTUALSALESSyncOut.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SI011ACTUALSALESSyncOut
*/
@WebEndpoint(name = "HTTP_Port")
public SI011ACTUALSALESSyncOut getHTTPPort(WebServiceFeature... features) {
return super.getPort(HTTPPort, SI011ACTUALSALESSyncOut.class, features);
}
}
package com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService;
import java.io.File;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.CommonService;
@Component
public class SI011ACTUALSALESSyncOutServiceTask {
Log logger = LogFactory.getLog(SI011ACTUALSALESSyncOutServiceTask.class);
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private CommonService common;
@Value("${schneider.username}")
private String username;
@Value("${schneider.password}")
private String password;
@Value("${WSDLPATH}")
private String WSDLPATH;
@Transactional
@Scheduled(cron="${cronSi011}")
public void execute() {
this.runTask();
}
public static void main(String[] args) {
new SI011ACTUALSALESSyncOutServiceTask().execute();
}
public void runTask() {
ApplicationHome home = new ApplicationHome(getClass());
File jarFile = home.getSource();
File folder = jarFile.getParentFile();
String absolutePath = folder.getAbsolutePath();
String wsdlLocation = "file:///" + absolutePath + "/" + WSDLPATH + "/SI_011_ACTUAL_SALES_SyncOutService.wsdl";
SI011ACTUALSALESSyncOut service = ServiceFactory.create(SI011ACTUALSALESSyncOut.class, wsdlLocation, "http://distributors.edi.digital.cn.se.com", "SI_011_ACTUAL_SALES_SyncOutService", username, password);
this.sendData(service);
}
private void sendData(SI011ACTUALSALESSyncOut SI011ACTUALSALESSyncOut) {
}
}
@javax.xml.bind.annotation.XmlSchema(namespace = "http://distributors.edi.digital.cn.se.com")
package com.egolm.sso.distributors.SI_011_ACTUAL_SALES_SyncOutService;
package com.egolm.sso.util;
package com.egolm.sso.distributors;
import java.net.MalformedURLException;
import java.net.URL;
......
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
......@@ -10,7 +10,7 @@ import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.schneider_distributor package.
* generated in the com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
......@@ -27,7 +27,7 @@ public class ObjectFactory {
private final static QName _ZMTSD009SOCREATION_QNAME = new QName("http://schneider-distributor.com/", "Z_MT_SD_009_SO_CREATION");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.schneider_distributor
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION
*
*/
public ObjectFactory() {
......
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
import java.util.ArrayList;
import java.util.List;
......@@ -10,9 +10,9 @@ import javax.xml.bind.annotation.XmlType;
/**
* <p>Z_DT_SD_009_SO_CREATION complex type的 Java 类。
* <p>Z_DT_SD_009_SO_CREATION complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* &lt;complexType name="Z_DT_SD_009_SO_CREATION"&gt;
......@@ -137,7 +137,7 @@ public class ZDTSD009SOCREATION {
protected List<ZDTSD009SOCREATION.ITEM> item;
/**
* 获取header属性的值。
* 获取header属性的值。
*
* @return
* possible object is
......@@ -149,7 +149,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置header属性的值。
* 设置header属性的值。
*
* @param value
* allowed object is
......@@ -191,9 +191,9 @@ public class ZDTSD009SOCREATION {
/**
* <p>anonymous complex type的 Java 类。
* <p>anonymous complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* &lt;complexType&gt;
......@@ -275,7 +275,7 @@ public class ZDTSD009SOCREATION {
protected String qtflag;
/**
* 获取bstkde属性的值。
* 获取bstkde属性的值。
*
* @return
* possible object is
......@@ -287,7 +287,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置bstkde属性的值。
* 设置bstkde属性的值。
*
* @param value
* allowed object is
......@@ -299,7 +299,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取vbeln属性的值。
* 获取vbeln属性的值。
*
* @return
* possible object is
......@@ -311,7 +311,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置vbeln属性的值。
* 设置vbeln属性的值。
*
* @param value
* allowed object is
......@@ -323,7 +323,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取bstdk属性的值。
* 获取bstdk属性的值。
*
* @return
* possible object is
......@@ -335,7 +335,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置bstdk属性的值。
* 设置bstdk属性的值。
*
* @param value
* allowed object is
......@@ -347,7 +347,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取kunnr属性的值。
* 获取kunnr属性的值。
*
* @return
* possible object is
......@@ -359,7 +359,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置kunnr属性的值。
* 设置kunnr属性的值。
*
* @param value
* allowed object is
......@@ -371,7 +371,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取kgnnr属性的值。
* 获取kgnnr属性的值。
*
* @return
* possible object is
......@@ -383,7 +383,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置kgnnr属性的值。
* 设置kgnnr属性的值。
*
* @param value
* allowed object is
......@@ -395,7 +395,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取qtflag属性的值。
* 获取qtflag属性的值。
*
* @return
* possible object is
......@@ -407,7 +407,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置qtflag属性的值。
* 设置qtflag属性的值。
*
* @param value
* allowed object is
......@@ -422,9 +422,9 @@ public class ZDTSD009SOCREATION {
/**
* <p>anonymous complex type的 Java 类。
* <p>anonymous complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* &lt;complexType&gt;
......@@ -496,7 +496,7 @@ public class ZDTSD009SOCREATION {
protected String edatu;
/**
* 获取posnr属性的值。
* 获取posnr属性的值。
*
* @return
* possible object is
......@@ -508,7 +508,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置posnr属性的值。
* 设置posnr属性的值。
*
* @param value
* allowed object is
......@@ -520,7 +520,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取vtext属性的值。
* 获取vtext属性的值。
*
* @return
* possible object is
......@@ -532,7 +532,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置vtext属性的值。
* 设置vtext属性的值。
*
* @param value
* allowed object is
......@@ -544,7 +544,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取matnr属性的值。
* 获取matnr属性的值。
*
* @return
* possible object is
......@@ -556,7 +556,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置matnr属性的值。
* 设置matnr属性的值。
*
* @param value
* allowed object is
......@@ -568,7 +568,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取kwmeng属性的值。
* 获取kwmeng属性的值。
*
* @return
* possible object is
......@@ -580,7 +580,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置kwmeng属性的值。
* 设置kwmeng属性的值。
*
* @param value
* allowed object is
......@@ -592,7 +592,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 获取edatu属性的值。
* 获取edatu属性的值。
*
* @return
* possible object is
......@@ -604,7 +604,7 @@ public class ZDTSD009SOCREATION {
}
/**
* 设置edatu属性的值。
* 设置edatu属性的值。
*
* @param value
* allowed object is
......
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
import javax.jws.Oneway;
import javax.jws.WebMethod;
......@@ -9,7 +9,7 @@ import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-07-05T14:08:11.116+08:00
* 2019-08-08T10:53:40.175+08:00
* Generated source version: 3.2.9
*
*/
......
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 3.2.9
* 2019-07-05T14:08:11.147+08:00
* 2019-08-08T10:53:40.207+08:00
* Generated source version: 3.2.9
*
*/
@WebServiceClient(name = "Z_MI_SD_009_SO_CREATIONService",
wsdlLocation = "file:/C:/Users/Quxl/Desktop/Z_MI_SD_009_SO_CREATION.wsdl",
wsdlLocation = "file:/C:/Users/Quxl/Desktop/WSDL/Z_MI_SD_009_SO_CREATION.wsdl",
targetNamespace = "http://schneider-distributor.com/")
public class ZMISD009SOCREATIONService extends Service {
......@@ -27,11 +26,11 @@ public class ZMISD009SOCREATIONService extends Service {
static {
URL url = null;
try {
url = new URL("file:/C:/Users/Quxl/Desktop/Z_MI_SD_009_SO_CREATION.wsdl");
url = new URL("file:/C:/Users/Quxl/Desktop/WSDL/Z_MI_SD_009_SO_CREATION.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(ZMISD009SOCREATIONService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/C:/Users/Quxl/Desktop/Z_MI_SD_009_SO_CREATION.wsdl");
"Can not initialize the default wsdl from {0}", "file:/C:/Users/Quxl/Desktop/WSDL/Z_MI_SD_009_SO_CREATION.wsdl");
}
WSDL_LOCATION = url;
}
......
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
import java.io.File;
import java.text.SimpleDateFormat;
......@@ -16,16 +16,16 @@ import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.Header;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION.ITEM;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.ThrowableUtil;
import com.schneider_distributor.ZDTSD009SOCREATION.Header;
import com.schneider_distributor.ZDTSD009SOCREATION.ITEM;
@Component
public class ZMISD009SOCREATIONTask {
public class ZMISD009SOCREATIONServiceTask {
Log logger = LogFactory.getLog(ZMISD009SOCREATIONTask.class);
Log logger = LogFactory.getLog(ZMISD009SOCREATIONServiceTask.class);
@Autowired
private JdbcTemplate jdbcTemplate;
......@@ -49,7 +49,7 @@ public class ZMISD009SOCREATIONTask {
}
public static void main(String[] args) {
new ZMISD009SOCREATIONTask().execute();
new ZMISD009SOCREATIONServiceTask().execute();
}
public void runTask() {
......
@javax.xml.bind.annotation.XmlSchema(namespace = "http://schneider-distributor.com/")
package com.schneider_distributor;
package com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION;
......@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject;
import com.egolm.sso.config.XRException;
import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.HttpUtil;
import com.egolm.sso.util.SqlUtil;
import com.egolm.sso.util.SqlUtil.Sql;
......@@ -87,6 +88,12 @@ public class CommonService {
}
}
public String getNextBatch(Date day, String sPrefix, String sName) {
String dateString = DateUtil.formatDate(day, "yyyyMMdd");
sName = sPrefix + "_" + sName + "_" + dateString;
return dateString + "-" + this.getNextval(sName);
}
@Transactional(propagation=Propagation.NOT_SUPPORTED)
public void saveApiAccessLog(String METHOD, String ADDRESS, String RESULT) {
Date now = new Date();
......
......@@ -105,7 +105,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
if(KUNNR == null || KUNNR.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [KUNNR] cannot be empty");
}
header.put("BATCH", dateString + "-" + common.getNextval("T_SO_CONFIRMACTION_HEADER_BATCH_" + KUNNR));
header.put("BATCH", common.getNextBatch(now, "T_SO_CONFIRMACTION_HEADER_BATCH", KUNNR));
header.put("CREATED", now);
header.put("CREATEBY", systemId);
String idIndex = StringUtil.getIndex("T_SO_CONFIRMATION_HEADER_ID");
......
......@@ -72,7 +72,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
if(SOLD_TO == null || SOLD_TO.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [SOLD_TO] cannot be empty");
}
map.put("BATCH", dateString + "-" + common.getNextval("T_SO_DN_DELETION_BATCH_" + SOLD_TO));
map.put("BATCH", common.getNextBatch(now, "T_SO_DN_DELETION_BATCH", SOLD_TO));
map.put("TRACE_NO", TRACE_NO);
map.put("SEND_STATUS", "N");
map.put("CREATED", now);
......
......@@ -74,8 +74,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
if(DIS_CODE == null || DIS_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [KUNNR] cannot be empty");
}
Long BATCHID = common.getNextval(dateString + "T_VEN_GOODS_BATCH_" + DIS_CODE);
String BATCH = dateString+"-"+BATCHID;
String BATCH = common.getNextBatch(now, "T_VEN_GOODS_BATCH", DIS_CODE);
if(items != null) {
for(ITEM item : items) {
......
......@@ -162,7 +162,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
if(BATCH_CODE == null || BATCH_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [PARTN] cannot be empty");
}
headMap.put("BATCH", dateString + "-" + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + BATCH_CODE));
headMap.put("BATCH", common.getNextBatch(now, "T_PERFORM_INVOICE_HEADER_BATCH", BATCH_CODE));
headMap.put("TRACE_NO", TRACE_NO);
headMap.put("CREATED", now);
headMap.put("CREATEBY", systemId);
......
......@@ -75,7 +75,8 @@ public class PriceListServiceImpl implements PriceListService {
if(KUNNR == null || KUNNR.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [KUNNR] cannot be empty");
}
String BATCH = dateString + "-" + common.getNextval("T_PRICE_LIST_BATCH_" + KUNNR);
String BATCH = common.getNextBatch(now, "T_PRICE_LIST_BATCH", KUNNR);
if(items != null) {
for(ITEM item : items) {
if(item != null) {
......
......@@ -120,7 +120,8 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
if(BATCH_CODE == null || BATCH_CODE.trim().isEmpty()) {
throw new XRException("Unable to generate batch number, [PARTNER_ID] cannot be empty");
}
header.put("BATCH", dateString + "-" + common.getNextval("T_SHIPPING_NOTIFICATION_HEADER_BATCH_" + BATCH_CODE));
header.put("BATCH", common.getNextBatch(now, "T_SHIPPING_NOTIFICATION_HEADER_BATCH", BATCH_CODE));
header.put("SEND_STATUS", "N");
header.put("TRACE_NO", TRACE_NO);
header.put("CREATED", now);
......
......@@ -5,6 +5,8 @@ schneider:
username: DISBTOR_PI
password: disbtor@2019
cronSap009: 0 0 0 * * ?
cronSi004: 0 0 0 * * ?
cronSi011: 0 0 0 * * ?
dataTracking:
isOpen: true
tokenExpireMinute: 60
......
......@@ -5,6 +5,8 @@ schneider:
username: DISBTOR_PI
password: disbtor@2019
cronSap009: 0 0 0 * * ?
cronSi004: 0 0 0 * * ?
cronSi011: 0 0 0 * * ?
dataTracking:
isOpen: false
tokenExpireMinute: 60
......
......@@ -5,6 +5,8 @@ schneider:
username: DISBTOR_PI
password: disbtor@2019
cronSap009: 0 0 0 * * ?
cronSi004: 0 0 0 * * ?
cronSi011: 0 0 0 * * ?
dataTracking:
isOpen: false
tokenExpireMinute: 60
......
This diff is collapsed.
package test;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.confirm_quotation.ConfirmQuotationService;
import com.egolm.sso.services.confirm_quotation.Z_MT_SD_008_SO_CONFIRM_QUOTATION;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
......
package test;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.dn_deletion.DELETED_DOCUMENTS;
import com.egolm.sso.services.dn_deletion.DNDeletionService;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
......
package test;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.distributors.ServiceFactory.PasswordType;
import com.egolm.sso.services.material_master.MaterialMasterService;
import com.egolm.sso.services.material_master.Z_MT_SD_001_MATERIAL_MASTER;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.ServiceFactory.PasswordType;
import com.egolm.sso.util.XMLUtil;
public class MaterialMasterServiceTest {
......
......@@ -5,9 +5,9 @@ import java.net.URL;
import org.springframework.boot.system.ApplicationHome;
import com.schneider_distributor.ZDTSD009SOCREATION;
import com.schneider_distributor.ZMISD009SOCREATION;
import com.schneider_distributor.ZMISD009SOCREATIONService;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZDTSD009SOCREATION;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATION;
import com.egolm.sso.distributors.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATIONService;
public class OSCreationServiceTest {
......
package test;
import com.egolm.sso.distributors.ServiceFactory;
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.util.ServiceFactory;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
......
package test;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.price_list.PriceListService;
import com.egolm.sso.services.price_list.Z_MT_SD_002_PRICE_LIST;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
......
package test;
import com.egolm.sso.distributors.ServiceFactory;
import com.egolm.sso.services.shipping_notfirmation.ShippingNotificationService;
import com.egolm.sso.services.shipping_notfirmation.Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE;
import com.egolm.sso.util.ServiceFactory;
import com.egolm.sso.util.StringUtil;
import com.egolm.sso.util.XMLUtil;
......
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