启源领料接口调整
This commit is contained in:
parent
d25831d6ba
commit
9401a7b4be
|
|
@ -432,13 +432,17 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain {
|
|||
for (MaterialOutVO outVO : outVOS) {
|
||||
MaterialOutBodyVO[] bodys = outVO.getBodys();
|
||||
for (MaterialOutBodyVO body : bodys) {
|
||||
sourceIds.add(body.getCfirstbillhid());
|
||||
sourceIds.add(body.getCsourcebillhid());
|
||||
}
|
||||
}
|
||||
// 查询备料计划行上的成套套数 nbsetpartsnum
|
||||
AggPickmVO[] newPickmVOS = queryService.queryBillsByPks(sourceIds.toArray(new String[0]));
|
||||
if (newPickmVOS == null) {
|
||||
throw new BusinessException("没有查询到材料出库关联的备料计划!");
|
||||
}
|
||||
// 获取备料计划行上的成套套数的合计值
|
||||
Double sum = 0d;
|
||||
if (newPickmVOS != null) {
|
||||
for (AggPickmVO newPickmVO : newPickmVOS) {
|
||||
PickmItemVO[] pickmItemVOS = (PickmItemVO[]) newPickmVO.getChildren(PickmItemVO.class);
|
||||
for (PickmItemVO pickmItemVO : pickmItemVOS) {
|
||||
|
|
@ -446,8 +450,10 @@ public class APIMaterialOutMaintainImpl implements IAPIMaterialOutMaintain {
|
|||
sum += nbsetpartsnum;
|
||||
}
|
||||
}
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("vbillcode", paramMap.get("vbillcode"));// 生产订单号
|
||||
result.put("outcode", outVOS[0].getHead().getVbillcode());// 材料出库单号
|
||||
result.put("batchId", paramMap.get("batchId"));// 领料批次id
|
||||
result.put("nbsetpartsnum", sum);// 累计领料套数
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue