huminmin
昨天 8b3c7885598f323b7fd86ba58f31a974a3d7b933
src/main/java/com/ruoyi/stock/service/impl/StockOutRecordServiceImpl.java
@@ -63,6 +63,9 @@
    @Override
    public int add(StockOutRecordDto stockOutRecordDto) {
        if (stockOutRecordDto.getCreateTime() == null) {
            stockOutRecordDto.setCreateTime(LocalDateTime.now());
        }
        String no = OrderUtils.countTodayByCreateTime(stockOutRecordMapper, "CK","outbound_batches", stockOutRecordDto.getCreateTime() != null ? stockOutRecordDto.getCreateTime() : LocalDateTime.now());
        stockOutRecordDto.setOutboundBatches(no);
        if (StockOutQualifiedRecordTypeEnum.SALE_SHIP_STOCK_OUT.getCode().equals(stockOutRecordDto.getRecordType())){
@@ -142,10 +145,19 @@
    public void exportStockOutRecord(HttpServletResponse response, StockOutRecordDto stockOutRecordDto) {
        List<StockOutRecordExportData> list = stockOutRecordMapper.listStockOutRecordExportData(stockOutRecordDto);
        for (StockOutRecordExportData stockInRecordExportData : list) {
            if (stockInRecordExportData.getType().equals("0")) {
                stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockOutQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue());
            }else {
                stockInRecordExportData.setRecordType(EnumUtil.fromCode(StockInQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType())).getValue());
            if (StringUtils.isEmpty(stockInRecordExportData.getRecordType())) {
                continue;
            }
            StockOutQualifiedRecordTypeEnum outRecordTypeEnum =
                    EnumUtil.fromCode(StockOutQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType()));
            if (outRecordTypeEnum != null) {
                stockInRecordExportData.setRecordType(outRecordTypeEnum.getValue());
                continue;
            }
            StockInQualifiedRecordTypeEnum inRecordTypeEnum =
                    EnumUtil.fromCode(StockInQualifiedRecordTypeEnum.class, Integer.parseInt(stockInRecordExportData.getRecordType()));
            if (inRecordTypeEnum != null) {
                stockInRecordExportData.setRecordType(inRecordTypeEnum.getValue());
            }
        }
        ExcelUtil<StockOutRecordExportData> util = new ExcelUtil<>(StockOutRecordExportData.class);