解决MPR运算回写备料计划报错问题-张鑫0514
This commit is contained in:
parent
1492a58adb
commit
803f6ba915
|
@ -47,22 +47,20 @@ public class PloProdDeptRule implements IRule<AggregatedPoVO> {
|
||||||
String prodDeptid = plo.getCproddeptid();
|
String prodDeptid = plo.getCproddeptid();
|
||||||
String prodDeptvid = plo.getCproddeptvid();
|
String prodDeptvid = plo.getCproddeptvid();
|
||||||
Integer posource = plo.getFposource();
|
Integer posource = plo.getFposource();
|
||||||
if (PoSourceEnum.COMPUT == posource && MMValueCheck.isEmpty(prodDeptid)
|
if (PoSourceEnum.COMPUT == posource && MMValueCheck.isEmpty(prodDeptid) && MMValueCheck.isEmpty(prodDeptvid)
|
||||||
&& MMValueCheck.isEmpty(prodDeptvid) && MMValueCheck.isNotEmpty(stockorgid)
|
&& MMValueCheck.isNotEmpty(stockorgid) && MMValueCheck.isNotEmpty(stockorgvid)) {
|
||||||
&& MMValueCheck.isNotEmpty(stockorgvid)) {
|
|
||||||
List<String> vids = map.get(stockorgid);
|
List<String> vids = map.get(stockorgid);
|
||||||
if (null == vids) {
|
if (null == vids) {
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
list.add(vid);
|
list.add(vid);
|
||||||
map.put(stockorgid, list);
|
map.put(stockorgid, list);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
vids.add(vid);
|
vids.add(vid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String vsrcbid = plo.getVsrcbid();// À´Ô´µ¥¾Ý±íÌåÖ÷¼ü
|
String vsrcbid = plo.getVsrcbid();// À´Ô´µ¥¾Ý±íÌåÖ÷¼ü
|
||||||
int fdemandbill = plo.getFdemandbill();//ÐèÇóÀ´Ô´
|
// 需求来源为备料计划的才回写
|
||||||
if (PoSourceEnum.COMPUT == posource && fdemandbill == 1) {
|
if (PoSourceEnum.COMPUT == posource && plo.getFdemandbill() != null && plo.getFdemandbill() == 1) {
|
||||||
vsrcbidList.add(vsrcbid);
|
vsrcbidList.add(vsrcbid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,8 +68,7 @@ public class PloProdDeptRule implements IRule<AggregatedPoVO> {
|
||||||
String[] vsrcbids = vsrcbidList.toArray(new String[vsrcbidList.size()]);
|
String[] vsrcbids = vsrcbidList.toArray(new String[vsrcbidList.size()]);
|
||||||
Map<String, AggPickmVO> pickmVOMap;
|
Map<String, AggPickmVO> pickmVOMap;
|
||||||
try {
|
try {
|
||||||
pickmVOMap = NCLocator.getInstance().lookup(IPickmPubQueryService.class)
|
pickmVOMap = NCLocator.getInstance().lookup(IPickmPubQueryService.class).queryPickm4Issue(vsrcbids);
|
||||||
.queryPickm4Issue(vsrcbids);
|
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
@ -103,10 +100,8 @@ public class PloProdDeptRule implements IRule<AggregatedPoVO> {
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
String key = i.next();
|
String key = i.next();
|
||||||
List<String> vids = map.get(key);
|
List<String> vids = map.get(key);
|
||||||
Map<String, MaterialProdVO> results =
|
Map<String, MaterialProdVO> results = MaterialPubService.queryMaterialProduceInfoByPks(
|
||||||
MaterialPubService.queryMaterialProduceInfoByPks(vids.toArray(new String[0]), key, new String[] {
|
vids.toArray(new String[0]), key, new String[] { MaterialProdVO.PK_PRODEPTDOC });
|
||||||
MaterialProdVO.PK_PRODEPTDOC
|
|
||||||
});
|
|
||||||
for (AggregatedPoVO agg : vos) {
|
for (AggregatedPoVO agg : vos) {
|
||||||
PoVO plo = agg.getParentVO();
|
PoVO plo = agg.getParentVO();
|
||||||
String vid = plo.getCmaterialvid();
|
String vid = plo.getCmaterialvid();
|
||||||
|
@ -147,8 +142,7 @@ public class PloProdDeptRule implements IRule<AggregatedPoVO> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (BusinessException e) {
|
||||||
catch (BusinessException e) {
|
|
||||||
ExceptionUtils.wrappException(e);
|
ExceptionUtils.wrappException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue