wms出库过账修改22--sap过账接口的修改

master
mengjiao 1 year ago
parent 9d860f9331
commit 3e861ede81

@ -46,7 +46,7 @@ import javax.servlet.http.HttpServletRequest;
/**
* Service
*
*s
* @author Open Platform
* @date 2023-07-06
*/
@ -543,7 +543,6 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
wmsOdsMateStorageNewsSnMapper.updatekdd(wmsOdsEmStorageNews);//库存调整
wmsOdsMateStorageNewsSn.setUserDefined1("1");
wmsOdsMateStorageNewsSnMapper.updateWmsOdsMateStorageNewsSn(wmsOdsMateStorageNewsSn);//库存明细
}
return null;
}
@ -565,8 +564,9 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
// List<OdsProcureOutOrder> orderList1=odsProcureOutOrderMapper.selectOdsProcureOutOrderListByIds(orderList);
List<OdsProcureOutOrder> orderList1=odsProcureOutOrderMapper.selectOdsProcureOutOrderListByu1(orderList);
//查询这个地方先暂时去掉Order_Status = '3' 条件
List<SapMaterialPosting> sapMaterialPostingList=new ArrayList<>();
//List<SapMaterialPosting> sapMaterialPostingList=new ArrayList<>();
List<OdsProcureOutOrder> orderList2=new ArrayList<>();
List<Map<String, Object>> mapList=new ArrayList<>();
List<SapBackflushMPQuery> sapMaterialPostingFCList=new ArrayList<>();//反冲
List<OdsProcureOutOrder> orderList2FC=new ArrayList<>();//反冲
for (OdsProcureOutOrder odsProcureOutOrder:
@ -584,24 +584,23 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
sapMaterialPostingFCList.add(sapBackflushMPQuery);
orderList2FC.add(odsProcureOutOrder);
}else {
SapMaterialPosting sapMaterialPosting =new SapMaterialPosting();
sapMaterialPosting.setAufnr(odsProcureOutOrder.getProduceCode());//订单号
sapMaterialPosting.setBwart("261"); //移动类型
sapMaterialPosting.setPlant(odsProcureOutOrder.getSiteCode()); //工厂
Map<String, Object> map=new HashMap<>();
map.put("AUFNR", odsProcureOutOrder.getProduceCode());
map.put("PLANT", odsProcureOutOrder.getSiteCode());
String lgort= baseWarehouseMapper.selectByCode(odsProcureOutOrder.getLocCode());
sapMaterialPosting.setLgort(lgort);//库存地点
sapMaterialPosting.setMatnr(odsProcureOutOrder.getMaterialCode());//物料号
sapMaterialPosting.setQuantity(odsProcureOutOrder.getOutNumber().toString()); //数量
sapMaterialPosting.setMeins(odsProcureOutOrder.getUnit()); //基本计量单位
sapMaterialPosting.setBatch(odsProcureOutOrder.getUserDefined2()); //批号
sapMaterialPostingList.add(sapMaterialPosting);
map.put("LGORT", lgort);
map.put("MATNR", odsProcureOutOrder.getMaterialCode());
map.put("QUANTITY", odsProcureOutOrder.getOutNumber().toString());
map.put("MEINS", odsProcureOutOrder.getUnit());
mapList.add(map);
orderList2.add(odsProcureOutOrder);
}
}
if (sapMaterialPostingList.size()>0){//非反冲过账
R result= remoteSapService.sapMaterialPosting(sapMaterialPostingList);
if (mapList.size()>0){//非反冲过账
SapMaterialPosting sapMaterialPosting =new SapMaterialPosting();
sapMaterialPosting.setPostingType("261");
sapMaterialPosting.setMapList(mapList);
R result= remoteSapService.sapMaterialPosting(sapMaterialPosting);
OdsProcureOutOrder order =new OdsProcureOutOrder();
int code= result.getCode();
String msg= result.getMsg();

Loading…
Cancel
Save