koushanshan 1 год назад
Родитель
Сommit
e507bad58f

+ 7 - 0
src/main/java/com/dk/mdm/model/vo/sale/OrderItemVO.java

@@ -323,6 +323,13 @@ public class OrderItemVO extends PageInfo<OrderItemVO> implements Serializable {
     @ApiModelProperty(value = "成本金额")
     private BigDecimal costAmt;
 
+    @ApiModelProperty(value = "原仓库ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String whIdPri;
+
+    @ApiModelProperty(value = "原非标号")
+    private String nonStdCodePri;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 1 - 0
src/main/java/com/dk/mdm/service/ivt/inventory/InventoryService.java

@@ -1306,6 +1306,7 @@ public class InventoryService extends BaseService<Inventory> {
                         InventoryBatchResponse inventoryBatchResponse = inventoryBatchMapper.selectById(outboundItemCostResponse.getBatchId());
                         InventoryBatch inventoryBatch = new InventoryBatch();
                         inventoryBatch.setBatchId(outboundItemCostResponse.getBatchId());
+                        //库存批次现在数据库的数量 +  上次出库成本写入的数量
                         inventoryBatch.setInvQty(inventoryBatchResponse.getInvQty().add(outboundItemCostResponse.getOutQty()));
                         inventoryBatch.setCostAmt(inventoryBatch.getInvQty().multiply(outboundItemCostResponse.getCostPrice()));
                         inventoryBatchMapper.updateAmtAndQty(inventoryBatch);

+ 4 - 0
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java

@@ -753,6 +753,10 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
                         outboundItem.setOutAmt(outboundItemVO.getOutingAmt());
                         outboundItem.setFactAmt(outboundItemVO.getFactAmt());
                         outboundItem.setFactPrice(outboundItemVO.getFactPrice());
+                        outboundItem.setCostPrice(outboundItemVO.getCostPrice() != null ?outboundItemVO.getCostPrice() : null);
+                        outboundItem.setCostAmt(outboundItemVO.getCostAmt() != null ? outboundItemVO.getCostAmt() :null );
+                        outboundItem.setWhId(outboundItemVO.getWhId());
+                        outboundItem.setNonStdCode(outboundItemVO.getNonStdCode());
                         //修改
                         outboundItemMapper.update(outboundItem,
                                 new UpdateWrapper<OutboundItem>().lambda()