huminmin
10 小时以前 18480213c000dfd7f6f236903f965a4d3f254597
src/main/java/com/ruoyi/stock/service/impl/StockOutRecordServiceImpl.java
@@ -142,10 +142,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);