|
@@ -131,25 +131,59 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
|
|
|
if(syShippingDetailsEntity.getState().equals("1")){
|
|
|
throw new JeecgBootException("提交单据不能修改!");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
List<SyShippingDetailsItem> list = entity.getSyShippingDetailsItemList();
|
|
|
- for (SyShippingDetailsItem li:list) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ for(SyShippingDetailsItem li :list){
|
|
|
+
|
|
|
SyOrderDataItem orderDataItem = syOrderDataItemService.getById(li.getSyOrderDataItemId());
|
|
|
+
|
|
|
if (oConvertUtils.isNotEmpty(orderDataItem)) {
|
|
|
- BigDecimal suerBox = orderDataItem.getSurplusNum().subtract(li.getShipmentQuantity());
|
|
|
+
|
|
|
+ BigDecimal suerBox = orderDataItem.getQuantity().subtract(li.getShipmentQuantity());
|
|
|
orderDataItem.setSurplusNum(suerBox);
|
|
|
syOrderDataItemService.updateById(orderDataItem);
|
|
|
+
|
|
|
+ li.setOrderRemainingQuantity(suerBox);
|
|
|
+
|
|
|
+ li.setSurplusQuantity(li.getShipmentQuantity());
|
|
|
}
|
|
|
+
|
|
|
+ syShippingDetailsItemService.updateById(li);
|
|
|
}
|
|
|
-
|
|
|
- syShippingDetailsMapper.syshippingDetailsItemUpdate(id);
|
|
|
-
|
|
|
- syShippingDetailsEntity.setDelFlag("1");
|
|
|
- updateById(syShippingDetailsEntity);
|
|
|
-
|
|
|
- syShippingDetailsAdd(entity);
|
|
|
-
|
|
|
return entity;
|
|
|
}
|
|
|
|