Commit f180515b authored by Quxl's avatar Quxl

x

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