update MES物料消耗接口,修改SAP过账日期报文
This commit is contained in:
parent
136d0b16a4
commit
e51c4eea7f
@ -1,6 +1,7 @@
|
|||||||
package com.cim.idm.service;
|
package com.cim.idm.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.cim.idm.framework.data.EventInfo;
|
||||||
import com.cim.idm.wmsextend.generic.errorHandler.CustomException;
|
import com.cim.idm.wmsextend.generic.errorHandler.CustomException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,4 +18,14 @@ public interface QMSService {
|
|||||||
*/
|
*/
|
||||||
String PreIQCInfoSend (String receiveActNo, String siteName, String opCode, String erpFactory) throws CustomException;
|
String PreIQCInfoSend (String receiveActNo, String siteName, String opCode, String erpFactory) throws CustomException;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用QMS质检接口
|
||||||
|
* @param sendQMSUrl QMS质检url
|
||||||
|
* @param sendQMSJson QMS质检报文
|
||||||
|
* @return QMS返回状态码
|
||||||
|
* @throws CustomException
|
||||||
|
*/
|
||||||
|
String sendQMSByUrlJson (String sendQMSUrl,String sendQMSJson, EventInfo eventInfo) throws CustomException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cim.idm.data.ErpMessageLog;
|
import com.cim.idm.data.ErpMessageLog;
|
||||||
import com.cim.idm.framework.IDMFrameServiceProxy;
|
import com.cim.idm.framework.IDMFrameServiceProxy;
|
||||||
|
import com.cim.idm.framework.data.EventInfo;
|
||||||
import com.cim.idm.framework.util.time.TimeStampUtil;
|
import com.cim.idm.framework.util.time.TimeStampUtil;
|
||||||
import com.cim.idm.service.QMSService;
|
import com.cim.idm.service.QMSService;
|
||||||
import com.cim.idm.util.MessageLogUtil;
|
import com.cim.idm.util.MessageLogUtil;
|
||||||
@ -568,4 +569,41 @@ public class QMSServiceImpl implements QMSService{
|
|||||||
return code;
|
return code;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 质检信息发送QMS
|
||||||
|
* @throws CustomException
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String sendQMSByUrlJson(String sendQMSUrl, String sendQMSJson, EventInfo eventInfo) throws CustomException {
|
||||||
|
String httpPost = NCHttpUtil.httpPost(baseUrl + sendQMSUrl, sendQMSJson);
|
||||||
|
org.json.JSONObject jsonObject = new org.json.JSONObject(httpPost);
|
||||||
|
String code = jsonObject.getString("code");
|
||||||
|
String msg = "";
|
||||||
|
if (!"200".equals(code)) {
|
||||||
|
msg = jsonObject.getString("msg");
|
||||||
|
}
|
||||||
|
// String msg = jsonObject.getString("msg");
|
||||||
|
//JSONObject object = (JSONObject) jsonObject.get("data");
|
||||||
|
Thread t = new Thread(new Runnable(){
|
||||||
|
public void run(){
|
||||||
|
// run方法具体重写
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
|
erplog.setEventUser("");
|
||||||
|
erplog.setServerName("WmsToQMS");
|
||||||
|
erplog.setEventName(eventInfo.getEventName());
|
||||||
|
erplog.setId(uuid.toString());
|
||||||
|
erplog.setInterfaceTime(ConvertUtil.getCurrTime("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
erplog.setMessageId(UUID.randomUUID().toString());
|
||||||
|
erplog.setSendMsg(sendQMSJson);
|
||||||
|
erplog.setReturnMsg2(httpPost.toString());
|
||||||
|
erplog.setResultCode(code);
|
||||||
|
MessageLogUtil.writeMessageLog(erplog);
|
||||||
|
}});
|
||||||
|
t.start();
|
||||||
|
return msg;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user