Commit f180515b authored by Quxl's avatar Quxl

x

parent 60544650
...@@ -104,9 +104,10 @@ public class SI004INVENTORYSyncOutServiceTask { ...@@ -104,9 +104,10 @@ public class SI004INVENTORYSyncOutServiceTask {
ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER INVENTORYRECORD_HEADER = new ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER(); ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER INVENTORYRECORD_HEADER = new ZDTSD004INVENTORYSENDING.RECORD.INVENTORYRECORD.HEADER();
disCode = headerObject.getString("DIS_CODE"); disCode = headerObject.getString("DIS_CODE");
traceNo = headerObject.getString("TRACE_NO"); traceNo = headerObject.getString("TRACE_NO");
Date INVENTORY_DATE = headerObject.getDate("INVENTORY_DATE");
INVENTORYRECORD_HEADER.setKUNNR(headerObject.getString("DIS_CODE")); INVENTORYRECORD_HEADER.setKUNNR(headerObject.getString("DIS_CODE"));
INVENTORYRECORD_HEADER.setNAME1(headerObject.getString("DIS_NAME")); INVENTORYRECORD_HEADER.setNAME1(headerObject.getString("DIS_NAME"));
INVENTORYRECORD_HEADER.setZDATE(headerObject.getString("INVENTORY_DATE")); INVENTORYRECORD_HEADER.setZDATE(DateUtil.formatDate(INVENTORY_DATE, "yyyyMMdd"));
INVENTORYRECORD_HEADER.setZSPART(headerObject.getString("MPG")); INVENTORYRECORD_HEADER.setZSPART(headerObject.getString("MPG"));
INVENTORYRECORD.setHEADER(INVENTORYRECORD_HEADER); INVENTORYRECORD.setHEADER(INVENTORYRECORD_HEADER);
RECORD.setINVENTORYRECORD(INVENTORYRECORD); RECORD.setINVENTORYRECORD(INVENTORYRECORD);
......
...@@ -103,12 +103,13 @@ public class SI011ACTUALSALESSyncOutServiceTask { ...@@ -103,12 +103,13 @@ public class SI011ACTUALSALESSyncOutServiceTask {
ZDTSD011ACTUALSALESSENDING.RECORD.HEADER header = new ZDTSD011ACTUALSALESSENDING.RECORD.HEADER(); ZDTSD011ACTUALSALESSENDING.RECORD.HEADER header = new ZDTSD011ACTUALSALESSENDING.RECORD.HEADER();
List<ZDTSD011ACTUALSALESSENDING.RECORD.ITEM> itemList = RECORD.getITEM(); List<ZDTSD011ACTUALSALESSENDING.RECORD.ITEM> itemList = RECORD.getITEM();
JSONObject headerObject = new JSONObject(vList.get(0)); JSONObject headerObject = new JSONObject(vList.get(0));
Date SALES_DATE = headerObject.getDate("SALES_DATE");
traceNo = headerObject.getString("TRACE_NO"); traceNo = headerObject.getString("TRACE_NO");
disCode = headerObject.getString("DIS_CODE"); disCode = headerObject.getString("DIS_CODE");
header.setAUBEL(headerObject.getString("SALES_NO")); header.setAUBEL(headerObject.getString("SALES_NO"));
header.setFXSNA(headerObject.getString("DIS_NAME")); header.setFXSNA(headerObject.getString("DIS_NAME"));
header.setFXSNO(headerObject.getString("DIS_CODE")); header.setFXSNO(headerObject.getString("DIS_CODE"));
header.setSDATE(headerObject.getString("SALES_DATE")); header.setSDATE(DateUtil.formatDate(SALES_DATE, "yyyyMMdd"));
RECORD.setHEADER(header); RECORD.setHEADER(header);
List<BigInteger> idList = new ArrayList<BigInteger>(); List<BigInteger> idList = new ArrayList<BigInteger>();
for(Map<String, Object> itemMap : vList) { for(Map<String, Object> itemMap : vList) {
......
...@@ -102,7 +102,7 @@ public class ZMISD009SOCREATIONServiceTask { ...@@ -102,7 +102,7 @@ public class ZMISD009SOCREATIONServiceTask {
header.setKGNNR(KGNNR); header.setKGNNR(KGNNR);
header.setQTFLAG(QTFLAG); header.setQTFLAG(QTFLAG);
if(BSTDK != null) { if(BSTDK != null) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
header.setBSTDK(format.format(BSTDK)); header.setBSTDK(format.format(BSTDK));
} }
ZDTSD009SOCREATIONBean.setHeader(header); ZDTSD009SOCREATIONBean.setHeader(header);
...@@ -121,7 +121,7 @@ public class ZMISD009SOCREATIONServiceTask { ...@@ -121,7 +121,7 @@ public class ZMISD009SOCREATIONServiceTask {
item.setKWMENG(KWMENG.toString()); item.setKWMENG(KWMENG.toString());
} }
if(EDATU != null) { if(EDATU != null) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
item.setEDATU(format.format(EDATU)); item.setEDATU(format.format(EDATU));
} }
ZDTSD009SOCREATIONBean.getITEM().add(item); ZDTSD009SOCREATIONBean.getITEM().add(item);
......
...@@ -12,6 +12,8 @@ import java.util.HashMap; ...@@ -12,6 +12,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.beans.factory.config.ConfigurableBeanFactory;
...@@ -27,6 +29,7 @@ import org.springframework.transaction.annotation.Propagation; ...@@ -27,6 +29,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.egolm.sso.SapServiceApplication;
import com.egolm.sso.config.XRException; import com.egolm.sso.config.XRException;
import com.egolm.sso.util.DateUtil; import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.HttpUtil; import com.egolm.sso.util.HttpUtil;
...@@ -65,8 +68,22 @@ public class CommonService { ...@@ -65,8 +68,22 @@ public class CommonService {
@Value("${dataTracking.isOpen}") @Value("${dataTracking.isOpen}")
private boolean isOpen; private boolean isOpen;
private static final Map<String, Long> tmp = new HashMap<String, Long>();
@PostConstruct
public void init() {
String sql = "select * from x_sequence";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
for(Map<String, Object> map : list) {
String name = (String)map.get("name");
Long value = ((Number)map.get("value")).longValue();
tmp.put(name, value);
}
}
public Long getNextval(String sName) { public Long getNextval(String sName) {
return getNextvalBySql(sName); CommonService common = SapServiceApplication.getBean(CommonService.class);
return common.getNextvalBySql(sName);
} }
public Long getNextvalByProc(String sName) { public Long getNextvalByProc(String sName) {
...@@ -96,7 +113,6 @@ public class CommonService { ...@@ -96,7 +113,6 @@ public class CommonService {
Long min = (Long) seqMap.get("min"); Long min = (Long) seqMap.get("min");
Long value = (Long) seqMap.get("value"); Long value = (Long) seqMap.get("value");
Long nextValue = value + step; Long nextValue = value + step;
if (value > max || value < min) { if (value > max || value < min) {
throw new XRException(MessageFormat.format("序列已超出许可范围[{0}]", sName)); throw new XRException(MessageFormat.format("序列已超出许可范围[{0}]", sName));
} else { } else {
......
wsUsedAuth: true wsUsedAuth: false
wsUsername: test wsUsername: test
wsPassword: 78258c537d6e4d5fb210a57d05619fb6 wsPassword: 78258c537d6e4d5fb210a57d05619fb6
schneider: schneider:
...@@ -8,7 +8,7 @@ cronSap009: 0 0 0 * * ? ...@@ -8,7 +8,7 @@ cronSap009: 0 0 0 * * ?
cronSi004: 0 0 0 * * ? cronSi004: 0 0 0 * * ?
cronSi011: 0 0 0 * * ? cronSi011: 0 0 0 * * ?
dataTracking: dataTracking:
isOpen: true isOpen: false
tokenExpireMinute: 60 tokenExpireMinute: 60
appId: schneider-api appId: schneider-api
appSecret: SGVsbG8yQ2xpZW50IQ appSecret: SGVsbG8yQ2xpZW50IQ
...@@ -19,6 +19,6 @@ dataTracking: ...@@ -19,6 +19,6 @@ dataTracking:
insertOrderTracking: /v1/insertOrderTracking insertOrderTracking: /v1/insertOrderTracking
spring: spring:
datasource: datasource:
url: jdbc:mysql://10.204.6.8:8066/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://localhost/schneider?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
username: schneider username: root
password: schneider_e2e password: 123456
\ No newline at end of file \ No newline at end of file
isUsedTestController: false isUsedTestController: true
xmlRoot: xml xmlRoot: xml
systemId: system systemId: system
WSDLPATH: WSDL WSDLPATH: WSDL
......
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