| | |
| | | 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); |