Commit c088d334 authored by Quxl's avatar Quxl

x

parent 1b5e3f59
package com.egolm.sso;
import java.util.TimeZone;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
......@@ -14,6 +16,8 @@ public class SapServiceApplication {
private static ApplicationContext applicationContext;
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
System.out.println(TimeZone.getDefault());
applicationContext = SpringApplication.run(SapServiceApplication.class, args);
}
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.confirm_quotation;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://confirm_quotation.sso.egolm.com")
public interface ConfirmQuotationService {
Log logger = LogFactory.getLog(ConfirmQuotationService.class);
@WebMethod
public void execute(Z_MT_SD_008_SO_CONFIRM_QUOTATION Z_MT_SD_008_SO_CONFIRM_QUOTATION);
......
......@@ -170,7 +170,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
common.saveApiAccessLog("execute", "/confirm_quotation", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "SoConfirmQuotation", VBELN, KUNNR, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -178,7 +178,7 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
common.saveApiAccessLog("execute", "/confirm_quotation", "ERROR");
common.saveOrderTracking(TRACE_NO, "SoConfirmQuotation", VBELN, KUNNR, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.dn_deletion;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://dn_deletion.sso.egolm.com")
public interface DNDeletionService {
Log logger = LogFactory.getLog(DNDeletionService.class);
@WebMethod
public void execute(DELETED_DOCUMENTS DELETED_DOCUMENTS);
......
......@@ -79,7 +79,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
common.saveApiAccessLog("execute", "/dn_deletion", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "SODNDeletion", null, SOLD_TO, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -87,7 +87,7 @@ public class DNDeletionServiceImpl implements DNDeletionService {
common.saveApiAccessLog("execute", "/dn_deletion", "ERROR");
common.saveOrderTracking(TRACE_NO, "SODNDeletion", null, SOLD_TO, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.material_master;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://material_master.sso.egolm.com")
public interface MaterialMasterService {
Log logger = LogFactory.getLog(MaterialMasterService.class);
@WebMethod
public void execute(Z_MT_SD_001_MATERIAL_MASTER Z_MT_SD_001_MATERIAL_MASTER);
......
......@@ -126,7 +126,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
common.saveApiAccessLog("execute", "/material_master", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "MaterialMaster", null, DIS_CODE, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -134,7 +134,7 @@ public class MaterialMasterServiceImpl implements MaterialMasterService {
common.saveApiAccessLog("execute", "/material_master", "ERROR");
common.saveOrderTracking(TRACE_NO, "MaterialMaster", null, DIS_CODE, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.prforma_invoice;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://prforma_invoice.sso.egolm.com")
public interface PrformaInvoiceService {
Log logger = LogFactory.getLog(PrformaInvoiceService.class);
@WebMethod
public void execute(Z_MT_SD_005_PERFORM_INVOICE Z_MT_SD_005_PERFORM_INVOICE);
......
......@@ -253,7 +253,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
common.saveApiAccessLog("execute", "/prforma_invoice", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "ProFormaInvoice", null, BATCH_CODE, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -261,7 +261,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
common.saveApiAccessLog("execute", "/prforma_invoice", "ERROR");
common.saveOrderTracking(TRACE_NO, "ProFormaInvoice", null, BATCH_CODE, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.price_list;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://price_list.sso.egolm.com")
public interface PriceListService {
Log logger = LogFactory.getLog(PriceListService.class);
@WebMethod
public void execute(Z_MT_SD_002_PRICE_LIST Z_MT_SD_002_PRICE_LIST);
......
......@@ -109,7 +109,7 @@ public class PriceListServiceImpl implements PriceListService {
common.saveApiAccessLog("execute", "/price_list", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "PriceList", null, KUNNR, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -117,7 +117,7 @@ public class PriceListServiceImpl implements PriceListService {
common.saveApiAccessLog("execute", "/price_list", "ERROR");
common.saveOrderTracking(TRACE_NO, "PriceList", null, KUNNR, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -3,9 +3,14 @@ package com.egolm.sso.services.shipping_notfirmation;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@WebService(targetNamespace = "http://shipping_notfirmation.sso.egolm.com")
public interface ShippingNotificationService {
Log logger = LogFactory.getLog(ShippingNotificationService.class);
@WebMethod
public void execute(Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE Z_MT_SD_007_SHIPPING_NOTFIRMATION_FILE);
......
......@@ -178,7 +178,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
common.saveApiAccessLog("execute", "/shipping_notfirmation", "SUCCESS");
common.saveOrderTracking(TRACE_NO, "ShippingNotification", null, BATCH_CODE, "U", "SUCCESS", null);
} catch (Throwable e) {
e.printStackTrace();
logger.error(timeString, e);
}
} catch (Exception e) {
isSuccess = false;
......@@ -186,7 +186,7 @@ public class ShippingNotificationServiceImpl implements ShippingNotificationServ
common.saveApiAccessLog("execute", "/shipping_notfirmation", "ERROR");
common.saveOrderTracking(TRACE_NO, "ShippingNotification", null, BATCH_CODE, "U", "ERROR", ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString);
} catch (Throwable e1) {
e1.printStackTrace();
logger.error(timeString, e1);
}
throw new XRException(ThrowableUtil.getCaused(e).getMessage() + " -- " + timeString, e);
} finally {
......
......@@ -30,12 +30,12 @@ public class DateUtil {
}
}
public static final DateFormat format_HHmmss = new SimpleDateFormat("HHmmss");
public static Date parseTime_HHmmss(String timeString) {
if (timeString == null || timeString.trim().length() == 0) {
return null;
} else {
try {
DateFormat format_HHmmss = new SimpleDateFormat("HHmmss");
return format_HHmmss.parse(timeString);
} catch (Throwable e) {
throw new XRException("Error time value " + timeString, e);
......
......@@ -7,11 +7,11 @@ schneider:
cronSap009: 0 0 0 * * ?
dataTracking:
isOpen: false
tokenExpireMinute: 30
appId: schneider
appSecret: SGVsbG8yQ2xpZW50IQ==
username: schneider
baseUrl: http://xxx
tokenExpireMinute: 60
appId: schneider-api
appSecret: SGVsbG8yQ2xpZW50IQ
username: trance
baseUrl: http://10.204.15.3:8083/uat/etc/schneider-api
uri:
token: /v1/token
insertOrderTracking: /v1/insertOrderTracking
......
......@@ -12,7 +12,6 @@ public class MaterialMasterServiceTest {
// String wsdlLocation = "http://localhost:8080/api/services/material_master?wsdl";
String namespace = "http://material_master.sso.egolm.com";
String serviceName = "MaterialMasterService";
//MaterialMasterService service = ServiceFactory.create(MaterialMasterService.class, wsdlLocation, namespace, serviceName, "test", "78258c537d6e4d5fb210a57d05619fb6", PasswordType.PasswordText);
MaterialMasterService service = ServiceFactory.create(MaterialMasterService.class, wsdlLocation, namespace, serviceName);
//String XML = StringUtil.readText("C:\\Users\\Quxl\\Desktop\\SSP3A250F7R.xml");
//String XML = StringUtil.readText("D:/data/sso/001.XML");
......
package test;
import java.util.Date;
import java.util.TimeZone;
import com.egolm.sso.util.DateUtil;
public class Test {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
System.out.println(TimeZone.getDefault());
System.out.println(DateUtil.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
}
}
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