update meswms_materialconsume_request接口修改,将MES调用WMS接口时传递的payMentDate字段放在WMS给SAP过账时的过账日期字段中
This commit is contained in:
parent
55d841ebed
commit
80d3104698
@ -2550,7 +2550,7 @@ public class ToSAPServiceImpl {
|
||||
}
|
||||
|
||||
//MES上报工单消耗数据-261工单投料
|
||||
public String mesMaterialConsume( String user ) throws Exception {
|
||||
public String mesMaterialConsume( String user, String payMentDate) throws Exception {
|
||||
|
||||
String rcode;
|
||||
String undoId = "";
|
||||
@ -2581,8 +2581,14 @@ public class ToSAPServiceImpl {
|
||||
*/
|
||||
body.put("ITEM", itemArray);
|
||||
body.put("ITEMID", uniqueID);
|
||||
String budatData = "";
|
||||
if(StringUtils.isNotEmpty(payMentDate)){
|
||||
budatData = payMentDate;
|
||||
}else {
|
||||
budatData = TimeStampUtil.getCurrentTime("yyyyMMdd");
|
||||
}
|
||||
//过账日期
|
||||
body.put("BUDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
||||
body.put("BUDAT", budatData);
|
||||
//凭证日期
|
||||
body.put("BLDAT", TimeStampUtil.getCurrentTime("yyyyMMdd"));
|
||||
//凭证抬头文本
|
||||
|
@ -81,7 +81,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
* 3. 过账
|
||||
* 4. 更新MATERIALPACKINGMDC表库存
|
||||
*/
|
||||
|
||||
String payMentDate = "";
|
||||
for (int i = 0; i < in.size(); i++) {
|
||||
JSONObject jb = in.getJSONObject(i);
|
||||
String materialSpecName = jb.get("materialSpecName").toString();
|
||||
@ -89,6 +89,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
String wo = jb.get("requestName") == null ? "" : jb.get("requestName").toString(); // 工单
|
||||
String flag = jb.get("flag") == null ? "" : jb.get("flag").toString();
|
||||
String charge = jb.get("CHARGE") == null ? "" : jb.get("CHARGE").toString();
|
||||
payMentDate = jb.get("payMentDate").toString();
|
||||
//判空
|
||||
if (StringUtils.isBlank(materialSpecName) || StringUtils.isBlank(qty)) {
|
||||
result = AjaxResult.me().setSuccess(false).setErrorCode(500).setMessage("料号或数量不能为空");
|
||||
@ -135,7 +136,7 @@ public class MESToWMSServiceImpl implements MESToWMSService {
|
||||
|
||||
}
|
||||
// 将工单的物料消耗数据传给SAP
|
||||
String undoId = toSAPService.mesMaterialConsume("MES");
|
||||
String undoId = toSAPService.mesMaterialConsume("MES",payMentDate);
|
||||
result = AjaxResult.me().setSuccess(true).setErrorCode(200).setMessage("执行成功");
|
||||
loginfo.setResultCode("0");
|
||||
loginfo.setReturnMsg(JSONObject.toJSONString(result));
|
||||
|
Loading…
x
Reference in New Issue
Block a user