出库单据
This commit is contained in:
@@ -85,20 +85,20 @@ public class BasStockServiceImpl implements IBasStockService
|
||||
}
|
||||
|
||||
private void insertMaintainRecord(BasStock oldStock, BasStock basStock, String operate) {
|
||||
if (oldStock != null && !oldStock.getQuantity().equals(basStock.getQuantity())) {
|
||||
if (oldStock != null && (!oldStock.getQuantity().equals(basStock.getQuantity())||!oldStock.getProductId().equals(basStock.getProductId()))) {
|
||||
BasStockMaintainRecord basStockMaintainRecord = new BasStockMaintainRecord();
|
||||
basStockMaintainRecord.setWhGuid(IdUtil.fastSimpleUUID());
|
||||
basStockMaintainRecord.setStockId(basStock.getStockId());
|
||||
basStockMaintainRecord.setCargoSpaceId(basStock.getCargoSpaceId());
|
||||
basStockMaintainRecord.setLotNo(basStock.getLotNo());
|
||||
basStockMaintainRecord.setLotNo(oldStock.getCargoSpaceId());
|
||||
basStockMaintainRecord.setTrayCode(basStock.getTrayCode());
|
||||
basStockMaintainRecord.setProductGuid(basStock.getProductGuid());
|
||||
basStockMaintainRecord.setProductGuid(oldStock.getProductName());
|
||||
basStockMaintainRecord.setCreateBy(SecurityUtils.getLoginUser().getUsername());
|
||||
basStockMaintainRecord.setCreateTime(new Date());
|
||||
basStockMaintainRecord.setOldQuantity(oldStock.getQuantity());
|
||||
basStockMaintainRecord.setQuantity(basStock.getQuantity());
|
||||
basStockMaintainRecord.setProductId(basStock.getExtraField().getProductId());
|
||||
basStockMaintainRecord.setProductName(basStock.getExtraField().getMaterialDesc());
|
||||
basStockMaintainRecord.setProductId(basStock.getProductId());
|
||||
basStockMaintainRecord.setProductName(basStock.getProductName());
|
||||
basStockMaintainRecord.setWarehouseId(basStock.getWarehouseId());
|
||||
basStockMaintainRecord.setMethod(operate);
|
||||
basStockMaintainRecordService.insertBasStockMaintainRecord(basStockMaintainRecord);
|
||||
|
||||
Reference in New Issue
Block a user