|
|
@ -139,21 +139,13 @@ public class ItemAccountsController { |
|
|
|
@OperateLog(type = EXPORT) |
|
|
|
public void exportItemAccountsExcel(@Valid ItemAccountsExportReqVO exportReqVO, |
|
|
|
HttpServletResponse response) throws IOException { |
|
|
|
List<ItemAccountsDO> list = itemAccountsService.getItemAccountsList(exportReqVO); |
|
|
|
List<ItemAccountsExcelVO> list = itemAccountsService.getExportList(exportReqVO); |
|
|
|
// 导出 Excel
|
|
|
|
List<ItemAccountsExcelVO> datas = ItemAccountsConvert.INSTANCE.convertList02(list); |
|
|
|
for(ItemAccountsExcelVO vo:datas){ |
|
|
|
ItemDO itemDO = itemService.getByNumber(vo.getItemNumber()); |
|
|
|
vo.setItemName(itemDO.getName()); |
|
|
|
LocationDO locationDO = locationService.getByNumber(vo.getLocationNumber()); |
|
|
|
vo.setLocationName(locationDO.getName()); |
|
|
|
LocationAreaDO locationAreaDO = locationAreaService.getByNumber(vo.getAreaNumber()); |
|
|
|
vo.setAreaName(locationAreaDO.getName()); |
|
|
|
} |
|
|
|
//List<ItemAccountsExcelVO> datas = ItemAccountsConvert.INSTANCE.convertList02(list);
|
|
|
|
Map<Integer, String[]> mapDropDown = new HashMap<>(); |
|
|
|
String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.ITEM_ACCOUNT_LOCATION_TYPE); |
|
|
|
mapDropDown.put(7, type); |
|
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, datas,mapDropDown); |
|
|
|
// String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.ITEM_ACCOUNT_LOCATION_TYPE);
|
|
|
|
// mapDropDown.put(7, type);
|
|
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, list,mapDropDown); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/get-import-template") |
|
|
|