|
@@ -265,21 +265,21 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
}
|
|
|
this.baseMapper.saveRdRecord01One(map);
|
|
|
//调拨单
|
|
|
- //是否委外入库 判断接收方是否有只值 宁波森语 马菲羊 森语集团
|
|
|
-// if(map.get("cVenCodeReceiver")!=null&&!String.valueOf(map.get("cVenCodeReceiver")).equals("")){
|
|
|
-// //根据接收方获取供应商信息
|
|
|
-// Map<String,Object> mapVenCode= this.baseMapper.getWhCodeByVenCode(String.valueOf(map.get("cVenCodeReceiver")));
|
|
|
-// if(mapVenCode!=null){
|
|
|
-// String cVenAbbName=String.valueOf(mapVenCode.get("cVenAbbName"));//供应商简称
|
|
|
-// //判断是否外部供应商 外部则进入下一波做调拨单 非则不做
|
|
|
-// if(!cVenAbbName.equals("宁波森语")&&!cVenAbbName.equals("马菲羊")&&!cVenAbbName.equals("森语集团")){
|
|
|
-// //保存调拨单
|
|
|
-// saveTransVouch(map,itemList);
|
|
|
-// }
|
|
|
-// }else{
|
|
|
-// throw new RuntimeException("未能找到接收方信息");
|
|
|
-// }
|
|
|
-// }
|
|
|
+ //判断接收方是否有只值 宁波森语 马菲羊 森语集团
|
|
|
+ if(map.get("cVenCodeReceiver")!=null&&!String.valueOf(map.get("cVenCodeReceiver")).equals("")){
|
|
|
+ //根据接收方获取供应商信息
|
|
|
+ Map<String,Object> mapVenCode= this.baseMapper.getWhCodeByVenCode(String.valueOf(map.get("cVenCodeReceiver")));
|
|
|
+ if(mapVenCode!=null){
|
|
|
+ String cVenAbbName=String.valueOf(mapVenCode.get("cVenAbbName"));//供应商简称
|
|
|
+ //判断是否外部供应商 外部则进入下一波做调拨单 非则不做
|
|
|
+ if(!cVenAbbName.equals("宁波森语")&&!cVenAbbName.equals("马菲羊")&&!cVenAbbName.equals("森语集团")){
|
|
|
+ //保存调拨单
|
|
|
+ saveTransVouch(map,itemList);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ throw new RuntimeException("未能找到接收方信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -487,13 +487,13 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
}
|
|
|
// transVouchMao.put("cIWhCode","");
|
|
|
//通过下游订单号获取订单数据
|
|
|
- Map<String,Object> OM_MOmainMap=this.baseMapper.getOM_MOmainBycCode(String.valueOf(rdRecord01Map.get("cOrderCode")));
|
|
|
+ Map<String,Object> OM_MOmainMap=this.baseMapper.getOM_MOmainBycCode(String.valueOf(rdRecords01List.get(0).get("downstreamOrderNumber")));
|
|
|
if(OM_MOmainMap==null){
|
|
|
throw new RuntimeException("未找到下游订单");
|
|
|
}
|
|
|
//订单号
|
|
|
- transVouchMao.put("cMPoCode",rdRecord01Map.get("cOrderCode"));//1
|
|
|
- transVouchMao.put("cDefine13",rdRecord01Map.get("cOrderCode"));//1
|
|
|
+ transVouchMao.put("cMPoCode",rdRecords01List.get(0).get("downstreamOrderNumber"));//1
|
|
|
+ transVouchMao.put("cDefine13",rdRecords01List.get(0).get("downstreamOrderNumber"));//1
|
|
|
//业务员
|
|
|
transVouchMao.put("cPersonCode",OM_MOmainMap.get("cPersonCode"));
|
|
|
this.baseMapper.saveTransVouch(transVouchMao);
|
|
@@ -504,7 +504,7 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
|
|
|
for(Map<String,Object> recordsMap:rdRecords01List){
|
|
|
Map<String,Object> vouchsMap=new HashMap<>();
|
|
|
//获取下游委外订单行数据
|
|
|
- Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails("");//1
|
|
|
+ Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails(String.valueOf(recordsMap.get("downstreamRowId")));//1
|
|
|
if(mapOMMODetails==null){
|
|
|
throw new RuntimeException("第"+vI+"行未找到对应下游委外订单表体行");
|
|
|
}
|