change - 同步原材料退库信息给ERP:其他入库改为其他出库

master
yinq 3 months ago
parent 9d5f52b611
commit 9abc8cf69c

@ -477,6 +477,7 @@ public class KingdeeErpService {
String F_JSJY_SCDX = objectParams.containsKey("F_JSJY_SCDX") ? (String) objectParams.get("F_JSJY_SCDX") : null; //来源于该物料bom成品如果是半成品那还需要找到该半成品的成品
String F_TOND_Base1 = objectParams.containsKey("F_TOND_Base1") ? (String) objectParams.get("F_TOND_Base1") : null; //来源于成品bom所在销售订单的项目号
String tips = objectParams.containsKey("tips") ? (String) objectParams.get("tips") : null; //明细备注
String FStockDirect = objectParams.containsKey("FStockDirect") ? (String) objectParams.get("FStockDirect") : "GENERAL" ; //库存方向
try {
//业务对象标识
String formId = KingdeeConfig.STK_MisDelivery;
@ -526,7 +527,7 @@ public class KingdeeErpService {
model.put("FBillTypeID", KingdeeConfig.getFBillTypeIDOtherOutStorage()); //单据类型(必填项)
model.put("FStockOrgId", KingdeeConfig.getFApplicationOrgId()); //收料组织(必填项)
model.put("FPickOrgId", KingdeeConfig.getFApplicationOrgId()); //领用组织
model.put("FStockDirect", "GENERAL"); //库存方向(必填项)
model.put("FStockDirect", FStockDirect); //库存方向(必填项)
model.put("FDate", FDate); //日期(必填项)
model.put("FOwnerTypeIdHead", "BD_OwnerOrg"); //货主类型(必填项)
model.put("FOwnerIdHead", KingdeeConfig.getFApplicationOrgId()); //货主(必填项)

@ -137,6 +137,17 @@ public class WmsRawReturnDetail extends BaseEntity
*/
private String tips;
/** 成品bom所在销售订单的项目号 */
private String tondBaseId;
public String getTondBaseId() {
return tondBaseId;
}
public void setTondBaseId(String tondBaseId) {
this.tondBaseId = tondBaseId;
}
public String getTips() {
return tips;
}

@ -257,6 +257,7 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FPrice", outstockDetail.getPrice());
data.put("FStockId", wmsConfig.getfStockId());
data.put("tips", outstockDetail.getTips());
data.put("FStockDirect", "GENERAL");
if (StringUtils.isNotNull(outstockDetail.getProductId())) {
data.put("F_JSJY_SCDX", outstockDetail.getProductId());
}
@ -350,8 +351,17 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FAuxPropId", specificationParameter);
data.put("FUnitID", rawReturnDetail.getUnitCode());
data.put("FQty", FRealQty);
// data.put("FPrice", rawReturnDetail.getPrice());
data.put("FStockId", wmsConfig.getfStockId());
data.put("FTONDCombo", "一般领料");
data.put("tips", rawReturnDetail.getTips());
if (StringUtils.isNotNull(rawReturnDetail.getMaterialCode())) {
data.put("F_JSJY_SCDX", rawReturnDetail.getMaterialCode());
}
if (StringUtils.isNotNull(rawReturnDetail.getTondBaseId())) {
data.put("F_TOND_Base1", rawReturnDetail.getTondBaseId());
}
data.put("FStockDirect", "RETURN");
// data.put("FSrcBillNo", srcBillNo);
// data.put("FRealQty", FRealQty);
// data.put("FSupplierCode", supplierCode);
@ -360,7 +370,7 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
// data.put("FSId", rawReturnDetail.getFsId());
String params = data.toJSONString();
try {
R<AjaxResult> paramsResult = remoteJindieService.saveOtherInStorage(params, SecurityConstants.INNER);
R<AjaxResult> paramsResult = remoteJindieService.saveOtherOutStorage(params, SecurityConstants.INNER);
Gson gson = new Gson();
String paramsResulJson = gson.toJson(paramsResult);
log.info("+++++++++paramsResult+++++++" + paramsResulJson);
@ -523,6 +533,7 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FPrice", outstock.getPrice());
data.put("FStockId", wmsConfig.getfStockId());
data.put("FTONDCombo", "一般领料");
data.put("FStockDirect", "GENERAL");
if (StringUtils.isNotNull(outstock.getMaterialCode())) {
data.put("F_JSJY_SCDX", outstock.getMaterialCode());
}

Loading…
Cancel
Save