|
@ -139,21 +139,13 @@ public class ItemAccountsController { |
|
|
@OperateLog(type = EXPORT) |
|
|
@OperateLog(type = EXPORT) |
|
|
public void exportItemAccountsExcel(@Valid ItemAccountsExportReqVO exportReqVO, |
|
|
public void exportItemAccountsExcel(@Valid ItemAccountsExportReqVO exportReqVO, |
|
|
HttpServletResponse response) throws IOException { |
|
|
HttpServletResponse response) throws IOException { |
|
|
List<ItemAccountsDO> list = itemAccountsService.getItemAccountsList(exportReqVO); |
|
|
List<ItemAccountsExcelVO> list = itemAccountsService.getExportList(exportReqVO); |
|
|
// 导出 Excel
|
|
|
// 导出 Excel
|
|
|
List<ItemAccountsExcelVO> datas = ItemAccountsConvert.INSTANCE.convertList02(list); |
|
|
//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()); |
|
|
|
|
|
} |
|
|
|
|
|
Map<Integer, String[]> mapDropDown = new HashMap<>(); |
|
|
Map<Integer, String[]> mapDropDown = new HashMap<>(); |
|
|
String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.ITEM_ACCOUNT_LOCATION_TYPE); |
|
|
// String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.ITEM_ACCOUNT_LOCATION_TYPE);
|
|
|
mapDropDown.put(7, type); |
|
|
// mapDropDown.put(7, type);
|
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, datas,mapDropDown); |
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, list,mapDropDown); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/get-import-template") |
|
|
@GetMapping("/get-import-template") |
|
|