Merge branch 'main' of http://162.14.99.253:3000/10539622/2025-03-JS-SDK-svr
This commit is contained in:
commit
59c6846ece
@ -5132,7 +5132,8 @@ public class ToSAPServiceImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//物料报废/降级品出库 (Z07)
|
//物料报废/降级品出库 (Z07)
|
||||||
public String MaterialScrapStockOut(List<MaterialPackingKey> all, String siteName, String user,String commitDate,String opCode) throws Exception {
|
public String MaterialScrapStockOut(List<MaterialPackingKey> all, String siteName, String user,String commitDate,
|
||||||
|
String opCode,String qtc,String costName) throws Exception {
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
String rmsg = null;
|
String rmsg = null;
|
||||||
@ -5212,7 +5213,8 @@ public class ToSAPServiceImpl {
|
|||||||
// LGORT 发货库存地点
|
// LGORT 发货库存地点
|
||||||
item.put("LGORT", mm.get("ERPLOCATION"));
|
item.put("LGORT", mm.get("ERPLOCATION"));
|
||||||
//BWART 移动类型
|
//BWART 移动类型
|
||||||
item.put("BWART", "Z07");
|
item.put("BWART", qtc);
|
||||||
|
item.put("KOSTL", costName);
|
||||||
//MENGE 数量
|
//MENGE 数量
|
||||||
item.put("MENGE", mm.get("MATERIALQUANTITY"));
|
item.put("MENGE", mm.get("MATERIALQUANTITY"));
|
||||||
//MENGE 单位
|
//MENGE 单位
|
||||||
@ -6071,6 +6073,124 @@ public class ToSAPServiceImpl {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过账
|
||||||
|
* @param srPk
|
||||||
|
* @param qtc 判断盘亏 qtc, 盘盈 qtr
|
||||||
|
* @param user 用户
|
||||||
|
* @param commitDate 过账时间
|
||||||
|
* @param opCode
|
||||||
|
* @param costName 成本中心
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String qtcrNoInvoiceForCheckPlanApp(List<Map<String, Object>> srPk, String qtc, String user, String commitDate,
|
||||||
|
String opCode, String costName, String lifnr) {
|
||||||
|
String rcode;
|
||||||
|
String undoId = "";
|
||||||
|
String rmsg = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
JSONObject sendData = new JSONObject(true);
|
||||||
|
JSONObject header = new JSONObject(true);
|
||||||
|
sendData.put("HEAD", header);
|
||||||
|
JSONObject body = new JSONObject(true);
|
||||||
|
sendData.put("BODY", body);
|
||||||
|
JSONArray itemArray = new JSONArray();
|
||||||
|
|
||||||
|
/*
|
||||||
|
HEAD
|
||||||
|
*/
|
||||||
|
header.put("INTF_ID", "MM067");
|
||||||
|
String uniqueID = UUID.randomUUID().toString();
|
||||||
|
header.put("REQ_KEYID", uniqueID);
|
||||||
|
header.put("SRC_MSGID", uniqueID);
|
||||||
|
header.put("SRC_SYSTEM", "WMS");
|
||||||
|
header.put("DEST_SYSTEM", "SAP");
|
||||||
|
header.put("REQUSER", user);
|
||||||
|
|
||||||
|
/*
|
||||||
|
BODY
|
||||||
|
*/
|
||||||
|
body.put("ITEM", itemArray);
|
||||||
|
body.put("ITEMID", uniqueID);
|
||||||
|
|
||||||
|
SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
Date date = inputFormat.parse(commitDate);
|
||||||
|
String outputDate = outputFormat.format(date);
|
||||||
|
//过账日期
|
||||||
|
body.put("BUDAT", outputDate);
|
||||||
|
//凭证日期
|
||||||
|
body.put("BLDAT", outputDate);
|
||||||
|
//凭证抬头文本
|
||||||
|
body.put("BKTXT", uniqueID);
|
||||||
|
//用户名
|
||||||
|
body.put("USNAM", user);
|
||||||
|
|
||||||
|
for (Map<String, Object> auditBox : srPk) {
|
||||||
|
|
||||||
|
JSONObject item = new JSONObject(true);
|
||||||
|
|
||||||
|
//BWART 移动类型
|
||||||
|
item.put("BWART", qtc);
|
||||||
|
// MATNR 发货物料号
|
||||||
|
item.put("MATNR", auditBox.get("MATERIALSPECNAME"));
|
||||||
|
// WERKS 发货工厂
|
||||||
|
item.put("WERKS", auditBox.get("ERPFACTORY"));
|
||||||
|
// LGORT 发货库存地点
|
||||||
|
item.put("LGORT", auditBox.get("ERPLOCATION"));
|
||||||
|
//MENGE 数量
|
||||||
|
item.put("MENGE", auditBox.get("MATERIALQUANTITY"));
|
||||||
|
//MENGE 单位
|
||||||
|
item.put("MEINS", auditBox.get("UNIT"));
|
||||||
|
// 供应商编码
|
||||||
|
item.put("LIFNR", lifnr);
|
||||||
|
//KOSTL 成本中心
|
||||||
|
item.put("KOSTL", costName);
|
||||||
|
itemArray.add(item);
|
||||||
|
}
|
||||||
|
log.info("SendTOSAP >>>>" + sendData);
|
||||||
|
String sapreturn = toSAPMessageUtil.sendHttpPost(toSAPMessageUtil.materialChangeLocationUrl, "", sendData.toJSONString());
|
||||||
|
org.json.JSONObject receiveJsonObject = new org.json.JSONObject(sapreturn);
|
||||||
|
org.json.JSONObject returnJsonObject = (org.json.JSONObject) receiveJsonObject.get("RETURN");
|
||||||
|
rcode = returnJsonObject.get("STATUS").toString();
|
||||||
|
rmsg = returnJsonObject.get("MSGTXT").toString();
|
||||||
|
|
||||||
|
if ("S".equals(rcode)) {
|
||||||
|
undoId = returnJsonObject.get("MBLNR").toString()+"_"+returnJsonObject.get("MJAHR").toString();//将物料凭证号与凭证年度拼在一起
|
||||||
|
}
|
||||||
|
//将log写到表里
|
||||||
|
ErpMessageLog erplog = new ErpMessageLog();
|
||||||
|
erplog.setEventUser("");
|
||||||
|
erplog.setServerName("WmsToErp");
|
||||||
|
if ("501".equals(qtc)) {
|
||||||
|
erplog.setEventName("客供品入库");
|
||||||
|
} else if ("542O".equals(qtc)) {
|
||||||
|
erplog.setEventName("委外退料入库");
|
||||||
|
} else if ("Z06".equals(qtc)) {
|
||||||
|
erplog.setEventName("盘盈入库");
|
||||||
|
} else {
|
||||||
|
erplog.setEventName("其他入库");
|
||||||
|
}
|
||||||
|
erplog.setInterfaceTime(TimeStampUtil.getCurrentTime(TimeStampUtil.FORMAT_DEFAULT));
|
||||||
|
erplog.setMessageId(UUID.randomUUID().toString());
|
||||||
|
erplog.setSendMsg(sendData.toJSONString());
|
||||||
|
erplog.setSendMsg2(sendData.toJSONString());
|
||||||
|
erplog.setReturnMsg2(sapreturn);
|
||||||
|
erplog.setResultCode(rcode);
|
||||||
|
MessageLogUtil.writeMessageLog(erplog);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info(e.getMessage(), e);
|
||||||
|
throw new RuntimeException("SAP返回" + rmsg);
|
||||||
|
}
|
||||||
|
if (!"S".equals(rcode)) {
|
||||||
|
throw new RuntimeException("SAP返回" + rmsg);
|
||||||
|
}
|
||||||
|
return undoId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public String qtcrNoInvoiceForCheckPlan(List<Map<String, Object>> srPk, String qtc, String user, String commitDate, String opCode, String costName) {
|
public String qtcrNoInvoiceForCheckPlan(List<Map<String, Object>> srPk, String qtc, String user, String commitDate, String opCode, String costName) {
|
||||||
String rcode;
|
String rcode;
|
||||||
String undoId = "";
|
String undoId = "";
|
||||||
|
@ -287,23 +287,23 @@ public class MaterialReceiveActController {
|
|||||||
int result = a.compareTo(b);
|
int result = a.compareTo(b);
|
||||||
hashMap2.put("QTY", mathMaterialQuantity);
|
hashMap2.put("QTY", mathMaterialQuantity);
|
||||||
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
||||||
// 去掉接受收数量更新
|
// 去掉接收数量更新
|
||||||
// IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
||||||
break;
|
break;
|
||||||
} else if (mathMaterialQuantity.compareTo(mathQty) == 1) {//条码数量大于剩余数量
|
} else if (mathMaterialQuantity.compareTo(mathQty) == 1) {//条码数量大于剩余数量
|
||||||
hashMap2.put("QTY", qty);
|
hashMap2.put("QTY", qty);
|
||||||
mathMaterialQuantity = mathMaterialQuantity.subtract(mathQty);
|
mathMaterialQuantity = mathMaterialQuantity.subtract(mathQty);
|
||||||
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
||||||
// 去掉接受收数量更新
|
// 去掉接收数量更新
|
||||||
// IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
||||||
System.out.println("a is greater than b");
|
System.out.println("a is greater than b");
|
||||||
continue;
|
continue;
|
||||||
} else {//条码数量小于订单剩余数量
|
} else {//条码数量小于订单剩余数量
|
||||||
System.out.println("a is less than b");
|
System.out.println("a is less than b");
|
||||||
hashMap2.put("QTY", mathMaterialQuantity);
|
hashMap2.put("QTY", mathMaterialQuantity);
|
||||||
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(insertSql, hashMap2);
|
||||||
// 去掉接受收数量更新
|
// 去掉接收数量更新
|
||||||
// IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,6 +177,38 @@ public class NoInvoiceManagerContoller {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/getQTCOutList", method = RequestMethod.POST)
|
||||||
|
public AjaxResult getQTCOutList(@RequestBody JSONObject in ){
|
||||||
|
MaterialPacking materialPacking = JSON.toJavaObject(in, MaterialPacking.class);
|
||||||
|
|
||||||
|
String sql = "SELECT\r\n" +
|
||||||
|
" M.*,\r\n" +
|
||||||
|
" CASE\r\n" +
|
||||||
|
" WHEN M.MATURATIONINTIME IS NOT NULL THEN SYSDATE - M.MATURATIONINTIME - m2.MATURATIONTIME\r\n" +
|
||||||
|
" ELSE 1\r\n" +
|
||||||
|
" END FLAG,\r\n" +
|
||||||
|
" bsn.DESCRIPTION\r\n" +
|
||||||
|
"FROM\r\n" +
|
||||||
|
" MATERIALPACKING M\r\n" +
|
||||||
|
"LEFT JOIN MATERIALSPEC m2 ON\r\n" +
|
||||||
|
" M.MATERIALSPECNAME = m2.MATERIALSPECNAME\r\n" +
|
||||||
|
"LEFT JOIN BS_ERPLOCATION bsn ON\r\n" +
|
||||||
|
" bsn.ERPLOCATIONNAME = M.ERPLOCATION\r\n" +
|
||||||
|
"WHERE\r\n" +
|
||||||
|
" M.STOCKSTATE = 'Stocked'\r\n" +
|
||||||
|
" AND M.MATERIALPACKINGNAME = :MATERIALPACKINGNAME";
|
||||||
|
|
||||||
|
Map<String, Object> bindMap = new HashMap<String, Object>();
|
||||||
|
bindMap.put("MATERIALPACKINGNAME", materialPacking.getMaterialPackingName());
|
||||||
|
List<Map<String,Object>> list = IDMFrameServiceProxy.getSqlTemplate().queryForList(sql, bindMap);
|
||||||
|
|
||||||
|
if(Objects.isNull(list) || list.isEmpty()) {
|
||||||
|
throw new GlobalException("未找到对应的数据!");
|
||||||
|
}
|
||||||
|
return AjaxResult.me().setResultObj(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报废出提交
|
* 报废出提交
|
||||||
@ -194,7 +226,10 @@ public class NoInvoiceManagerContoller {
|
|||||||
String commitDatesString = sl.getCommitDate();
|
String commitDatesString = sl.getCommitDate();
|
||||||
String commitDate = commitDatesString + " 00:00:00";
|
String commitDate = commitDatesString + " 00:00:00";
|
||||||
String opCode = sl.getOpCode();
|
String opCode = sl.getOpCode();
|
||||||
|
// 移动类型
|
||||||
|
String qtc = sl.getQtc();
|
||||||
|
// 成本中心
|
||||||
|
String costName = sl.getCostName();
|
||||||
ArrayList<MaterialPackingKey> arrayList = new ArrayList<>();
|
ArrayList<MaterialPackingKey> arrayList = new ArrayList<>();
|
||||||
for(MaterialPacking map : boxList) {
|
for(MaterialPacking map : boxList) {
|
||||||
// String supplierCharge = map.get("SUPPLIERCHARGE") == null ? "" : map.get("SUPPLIERCHARGE").toString();
|
// String supplierCharge = map.get("SUPPLIERCHARGE") == null ? "" : map.get("SUPPLIERCHARGE").toString();
|
||||||
@ -204,7 +239,7 @@ public class NoInvoiceManagerContoller {
|
|||||||
String undoId = "";
|
String undoId = "";
|
||||||
try {
|
try {
|
||||||
// NoInvoiceManagerServiceImpl.QTC(boxList,user,siteName,commitDate,opCode);
|
// NoInvoiceManagerServiceImpl.QTC(boxList,user,siteName,commitDate,opCode);
|
||||||
undoId = toSAPService.MaterialScrapStockOut(arrayList,siteName,user,commitDate,opCode);
|
undoId = toSAPService.MaterialScrapStockOut(arrayList,siteName,user,commitDate,opCode,qtc,costName);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
return AjaxResult.me().setSuccess(false).setMessage(e.toString());
|
||||||
@ -212,7 +247,11 @@ public class NoInvoiceManagerContoller {
|
|||||||
|
|
||||||
// 发送过账
|
// 发送过账
|
||||||
EventInfoUtil util = new EventInfoUtil();
|
EventInfoUtil util = new EventInfoUtil();
|
||||||
makeEventInfo = util.makeEventInfo("报废出库", user, "报废出库");
|
String enentName = "报废出库";
|
||||||
|
if ("Z05".equals(qtc)) {
|
||||||
|
enentName = "盘亏出库";
|
||||||
|
}
|
||||||
|
makeEventInfo = util.makeEventInfo(enentName, user, enentName);
|
||||||
// 更新库存状态
|
// 更新库存状态
|
||||||
SDKMaterialPackingServiceImpl.SaveUnDoInfo( undoId,commitDate);
|
SDKMaterialPackingServiceImpl.SaveUnDoInfo( undoId,commitDate);
|
||||||
// SDKMaterialPackingServiceImpl.updateStockState( makeEventInfo, undoId,opCode);
|
// SDKMaterialPackingServiceImpl.updateStockState( makeEventInfo, undoId,opCode);
|
||||||
@ -234,8 +273,10 @@ public class NoInvoiceManagerContoller {
|
|||||||
// arrayList.add(selectByKey);
|
// arrayList.add(selectByKey);
|
||||||
|
|
||||||
String commitDate = commitDateString + " 00:00:00";
|
String commitDate = commitDateString + " 00:00:00";
|
||||||
|
String costName = sl.getCostName();
|
||||||
NoInvoiceManagerServiceImpl.QTR(boxList,user2,commitDate,opCode);
|
String lifnr = sl.getLifnr();
|
||||||
|
String qtc = sl.getQtc();
|
||||||
|
NoInvoiceManagerServiceImpl.QTR(boxList,user2,commitDate,opCode,costName,lifnr,qtc);
|
||||||
|
|
||||||
return AjaxResult.me().setResultObj(null);
|
return AjaxResult.me().setResultObj(null);
|
||||||
|
|
||||||
|
@ -29,6 +29,9 @@ public class MaterialReceiveRequest {
|
|||||||
private String phase;
|
private String phase;
|
||||||
private String CUSTOMNO;
|
private String CUSTOMNO;
|
||||||
private String truegg;
|
private String truegg;
|
||||||
|
private String costName;
|
||||||
|
private String lifnr;
|
||||||
|
private String qtc;
|
||||||
/**销售订单*/
|
/**销售订单*/
|
||||||
private String SALESHIPREQUESTNAME;
|
private String SALESHIPREQUESTNAME;
|
||||||
/**销售订单行号*/
|
/**销售订单行号*/
|
||||||
|
@ -48,10 +48,10 @@ public class MaterialPackingServiceServiceImpl implements IMaterialPackingServic
|
|||||||
hashMap.put("RECEIVEREQUESTNAME", item.get("RECEIVEREQUESTNAME").toString());
|
hashMap.put("RECEIVEREQUESTNAME", item.get("RECEIVEREQUESTNAME").toString());
|
||||||
hashMap.put("RECEIVEREQUESTDETAILNAME", item.get("RECEIVEREQUESTDETAILNAME").toString());
|
hashMap.put("RECEIVEREQUESTDETAILNAME", item.get("RECEIVEREQUESTDETAILNAME").toString());
|
||||||
hashMap.put("QTY", item.get("QTY").toString());
|
hashMap.put("QTY", item.get("QTY").toString());
|
||||||
// 去掉接受收数量更新
|
// 去掉接收数量更新
|
||||||
// String updateSql = "UPDATE MATERIALRECEIVEREQUESTDETAIL T SET T.RECEIVEDQUANTITY = T.RECEIVEDQUANTITY - :QTY "
|
String updateSql = "UPDATE MATERIALRECEIVEREQUESTDETAIL T SET T.RECEIVEDQUANTITY = T.RECEIVEDQUANTITY - :QTY "
|
||||||
// + "WHERE T.RECEIVEREQUESTNAME = :RECEIVEREQUESTNAME AND T.RECEIVEREQUESTDETAILNAME = :RECEIVEREQUESTDETAILNAME";
|
+ "WHERE T.RECEIVEREQUESTNAME = :RECEIVEREQUESTNAME AND T.RECEIVEREQUESTDETAILNAME = :RECEIVEREQUESTDETAILNAME";
|
||||||
// IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap);
|
IDMFrameServiceProxy.getSqlTemplate().update(updateSql, hashMap);
|
||||||
|
|
||||||
String deleteSql = "DELETE FROM MATERIALPACKINGSUB m WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND RECEIVEREQUESTNAME = :RECEIVEREQUESTNAME";
|
String deleteSql = "DELETE FROM MATERIALPACKINGSUB m WHERE m.MATERIALPACKINGNAME = :MATERIALPACKINGNAME AND RECEIVEREQUESTNAME = :RECEIVEREQUESTNAME";
|
||||||
IDMFrameServiceProxy.getSqlTemplate().update(deleteSql, hashMap);
|
IDMFrameServiceProxy.getSqlTemplate().update(deleteSql, hashMap);
|
||||||
|
@ -4,6 +4,7 @@ import com.cim.idm.exception.GlobalException;
|
|||||||
import com.cim.idm.framework.IDMFrameServiceProxy;
|
import com.cim.idm.framework.IDMFrameServiceProxy;
|
||||||
import com.cim.idm.framework.data.EventInfo;
|
import com.cim.idm.framework.data.EventInfo;
|
||||||
import com.cim.idm.service.impl.ToSAPServiceImpl;
|
import com.cim.idm.service.impl.ToSAPServiceImpl;
|
||||||
|
import com.cim.idm.utils.CommonUtils;
|
||||||
import com.cim.idm.utils.EventInfoUtil;
|
import com.cim.idm.utils.EventInfoUtil;
|
||||||
import com.cim.idm.wmspackage.materialpacking.MaterialPackingServiceProxy;
|
import com.cim.idm.wmspackage.materialpacking.MaterialPackingServiceProxy;
|
||||||
import com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking;
|
import com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking;
|
||||||
@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -21,15 +23,30 @@ import java.util.Map;
|
|||||||
public class NoInvoiceManagerServiceImpl {
|
public class NoInvoiceManagerServiceImpl {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ToSAPServiceImpl toSAPService;
|
private ToSAPServiceImpl toSAPService;
|
||||||
|
@Autowired
|
||||||
|
private ToSAPServiceImpl toSAPServiceImpl;
|
||||||
|
@Autowired
|
||||||
|
private CommonUtils commonUtils;
|
||||||
|
|
||||||
private SDKMaterialPackingServiceImpl SDKMaterialPackingServiceImpl = new SDKMaterialPackingServiceImpl();
|
private SDKMaterialPackingServiceImpl SDKMaterialPackingServiceImpl = new SDKMaterialPackingServiceImpl();
|
||||||
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void QTR(List<MaterialPacking> list,String user,String commitDate,String opCode) {
|
public void QTR(List<MaterialPacking> list,String user,String commitDate,String opCode,
|
||||||
EventInfo makeEventInfo = EventInfoUtil.makeEventInfo("QTR", user, "QTR", "", "");
|
String costName, String lifnr, String qtc) {
|
||||||
|
String enentName = "QTR";
|
||||||
|
if ("501".equals(qtc)) {
|
||||||
|
enentName = "客供品入库";
|
||||||
|
} else if ("542O".equals(qtc)) {
|
||||||
|
enentName = "委外退料入库";
|
||||||
|
} else if ("Z06".equals(qtc)) {
|
||||||
|
enentName = "盘盈入库";
|
||||||
|
}
|
||||||
|
EventInfo makeEventInfo = EventInfoUtil.makeEventInfo(enentName, user, enentName, "", "");
|
||||||
SetEventInfo setEventInfo = new SetEventInfo();
|
SetEventInfo setEventInfo = new SetEventInfo();
|
||||||
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||||
HashMap<String, Object> hashMap = new HashMap<String,Object> ();
|
HashMap<String, Object> hashMap = new HashMap<String,Object> ();
|
||||||
|
List<String> strings = new ArrayList<>();
|
||||||
hashMap.put("StockState", "Stocked");
|
hashMap.put("StockState", "Stocked");
|
||||||
hashMap.put("packingState","Released");
|
hashMap.put("packingState","Released");
|
||||||
hashMap.put("oqaResultState","END");
|
hashMap.put("oqaResultState","END");
|
||||||
@ -51,13 +68,30 @@ public class NoInvoiceManagerServiceImpl {
|
|||||||
hashMap.put("erpLocation", materialPacking.getErpLocation());
|
hashMap.put("erpLocation", materialPacking.getErpLocation());
|
||||||
setEventInfo.setObjectValueUserColumns(hashMap);
|
setEventInfo.setObjectValueUserColumns(hashMap);
|
||||||
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(materialPackingKey, makeEventInfo, setEventInfo);
|
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(materialPackingKey, makeEventInfo, setEventInfo);
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("MATERIALPACKINGNAME", materialPacking.getMaterialPackingName());
|
||||||
|
map.put("CHARGE", materialPacking.getCharge());
|
||||||
|
// 物料号
|
||||||
|
map.put("MATERIALSPECNAME", materialPacking.getMaterialSpecName());
|
||||||
|
map.put("UNIT", queryForList.get(0).get("UNIT"));
|
||||||
|
map.put("PHASE", materialPacking.getPHASE());
|
||||||
|
map.put("MATERIALQUANTITY", materialPacking.getMaterialQuantity());
|
||||||
|
map.put("ERPFACTORY", materialPacking.getErpFactory());
|
||||||
|
map.put("ERPLOCATION", materialPacking.getErpLocation());
|
||||||
|
map.put("LOCATIONNAME", materialPacking.getLocationName());
|
||||||
|
mapList.add(map);
|
||||||
|
|
||||||
|
strings.add(materialPackingName);
|
||||||
}
|
}
|
||||||
String undoid = "";
|
String undoid = "";
|
||||||
// undoid = NCWServiceImpl.qtrNoInvoice(list,user,commitDate,opCode);
|
// undoid = NCWServiceImpl.qtrNoInvoice(list,user,commitDate,opCode);
|
||||||
|
//调用SAP接口
|
||||||
SDKMaterialPackingServiceImpl.updateUndoIdByList(list, undoid, makeEventInfo,opCode);
|
undoid = toSAPServiceImpl.qtcrNoInvoiceForCheckPlanApp(mapList, qtc, user,
|
||||||
|
commitDate,opCode,costName,lifnr);
|
||||||
|
SDKMaterialPackingServiceImpl.updateUndoIdInByList(list, undoid, makeEventInfo,opCode);
|
||||||
//更新库存状态
|
//更新库存状态
|
||||||
SDKMaterialPackingServiceImpl.SaveUnDoInfo( undoid,commitDate);
|
commonUtils.SaveUnDoInfo_ForSap(strings,undoid,makeEventInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,7 +407,19 @@ public class SDKMaterialPackingServiceImpl extends CommonServiceDAO<MaterialPack
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public void updateUndoIdInByList (List<MaterialPacking> list,String UNDOID,EventInfo eventInfo, String opCode) {
|
||||||
|
for (MaterialPacking mp : list) {
|
||||||
|
SetEventInfo setEventInfo = new SetEventInfo();
|
||||||
|
Map<String, Object> bindMap = new HashMap<String, Object>();
|
||||||
|
bindMap.put("unDoID",UNDOID);
|
||||||
|
bindMap.put("packingState","Released");
|
||||||
|
bindMap.put("stockState","Stocked");
|
||||||
|
bindMap.put("messageId",opCode);
|
||||||
|
setEventInfo.setUserColumns(bindMap);
|
||||||
|
MaterialPackingKey materialPackingKey = new MaterialPackingKey("SDK", mp.getMaterialPackingName().toString());
|
||||||
|
MaterialPackingServiceProxy.getMaterialPackingService().setEvent(materialPackingKey, eventInfo, setEventInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void updateUndoIdByList (List<MaterialPacking> list,String UNDOID,EventInfo eventInfo, String opCode) {
|
public void updateUndoIdByList (List<MaterialPacking> list,String UNDOID,EventInfo eventInfo, String opCode) {
|
||||||
for (MaterialPacking mp : list) {
|
for (MaterialPacking mp : list) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user