Commit cd063f1e by ice

修改下推采购订单是集团请配的现有量填充

parent 1efb21b1
...@@ -80,8 +80,10 @@ public class PurOrderHeaderController { ...@@ -80,8 +80,10 @@ public class PurOrderHeaderController {
} }
purOrderLine.setItemId(invItem.getId()); purOrderLine.setItemId(invItem.getId());
} }
Integer sumItemIdQuantity = transactionServer.findByOrgIdAndItemId(purOrderHeaderPage.getOrgId(),purOrderLine.getItemId()); if("000000006c60dba1016c60f588e00002".equals(purOrderHeaderPage.getOrderType())) {
purOrderLine.setAttribute1(String.valueOf(sumItemIdQuantity)); Integer sumItemIdQuantity = transactionServer.findByOrgIdAndItemId("2c9007626dde3f4f016deda2151f1a42", purOrderLine.getItemId());
purOrderLine.setAttribute1(String.valueOf(sumItemIdQuantity));
}
} }
PurOrderHeader purOrderHeader = new PurOrderHeader(); PurOrderHeader purOrderHeader = new PurOrderHeader();
BeanUtils.copyProperties(purOrderHeaderPage, purOrderHeader); BeanUtils.copyProperties(purOrderHeaderPage, purOrderHeader);
...@@ -138,7 +140,7 @@ public class PurOrderHeaderController { ...@@ -138,7 +140,7 @@ public class PurOrderHeaderController {
List<PurOrderLine> purOrderLineList = purOrderLineService.findOrderLineByHeaderId(purOrderHeader.getId()); List<PurOrderLine> purOrderLineList = purOrderLineService.findOrderLineByHeaderId(purOrderHeader.getId());
for (PurOrderLine purOrderLine : purOrderLineList) { for (PurOrderLine purOrderLine : purOrderLineList) {
Integer quantity = Integer.valueOf(purOrderLine.getQuantity()); Integer quantity = Integer.valueOf(purOrderLine.getQuantity());
Integer newSumQuantity = transactionServer.findByOrgIdAndItemId(purOrderHeader.getOrgId(),purOrderLine.getItemId()); Integer newSumQuantity = transactionServer.findByOrgIdAndItemId("2c9007626dde3f4f016deda2151f1a42",purOrderLine.getItemId());
if(null == purOrderLine.getAttribute1() || "".equals(purOrderLine.getAttribute1())){ if(null == purOrderLine.getAttribute1() || "".equals(purOrderLine.getAttribute1())){
purOrderLineService.updateOrderLineSumQuantity(String.valueOf(newSumQuantity),purOrderLine.getId()); purOrderLineService.updateOrderLineSumQuantity(String.valueOf(newSumQuantity),purOrderLine.getId());
}else { }else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment