liding
13 小时以前 8ce0fb006cd7041fa0555c5100565eb5b46d658e
src/main/java/com/ruoyi/stock/service/impl/StockInRecordServiceImpl.java
@@ -55,8 +55,13 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int add(StockInRecordDto stockInRecordDto) {
        String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches", stockInRecordDto.getCreateTime() != null ? stockInRecordDto.getCreateTime() : LocalDateTime.now());
        LocalDateTime createTime = stockInRecordDto.getCreateTime();
        if (createTime == null) {
            createTime = LocalDateTime.now();
        }
        String no = OrderUtils.countTodayByCreateTime(stockInRecordMapper, "RK","inbound_batches", createTime);
        stockInRecordDto.setInboundBatches(no);
        stockInRecordDto.setCreateTime(createTime);
        StockInRecord stockInRecord = new StockInRecord();
        BeanUtils.copyProperties(stockInRecordDto, stockInRecord);
        return stockInRecordMapper.insert(stockInRecord);