|
@ -3,6 +3,7 @@ package com.win.module.eam.controller.itemaccounts; |
|
|
import com.win.framework.common.pojo.CommonResult; |
|
|
import com.win.framework.common.pojo.CommonResult; |
|
|
import com.win.framework.common.pojo.CustomConditions; |
|
|
import com.win.framework.common.pojo.CustomConditions; |
|
|
import com.win.framework.common.pojo.PageResult; |
|
|
import com.win.framework.common.pojo.PageResult; |
|
|
|
|
|
import com.win.framework.dict.core.util.DictFrameworkUtils; |
|
|
import com.win.framework.excel.core.util.ExcelUtils; |
|
|
import com.win.framework.excel.core.util.ExcelUtils; |
|
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
|
|
import com.win.framework.operatelog.core.annotations.OperateLog; |
|
|
import com.win.module.eam.controller.item.vo.ItemRespVO; |
|
|
import com.win.module.eam.controller.item.vo.ItemRespVO; |
|
@ -13,6 +14,7 @@ import com.win.module.eam.dal.dataobject.item.ItemDO; |
|
|
import com.win.module.eam.dal.dataobject.itemaccounts.ItemAccountsDO; |
|
|
import com.win.module.eam.dal.dataobject.itemaccounts.ItemAccountsDO; |
|
|
import com.win.module.eam.dal.dataobject.location.LocationDO; |
|
|
import com.win.module.eam.dal.dataobject.location.LocationDO; |
|
|
import com.win.module.eam.dal.dataobject.locationarea.LocationAreaDO; |
|
|
import com.win.module.eam.dal.dataobject.locationarea.LocationAreaDO; |
|
|
|
|
|
import com.win.module.eam.enums.DictTypeConstants; |
|
|
import com.win.module.eam.service.item.ItemService; |
|
|
import com.win.module.eam.service.item.ItemService; |
|
|
import com.win.module.eam.service.itemaccounts.ItemAccountsService; |
|
|
import com.win.module.eam.service.itemaccounts.ItemAccountsService; |
|
|
import com.win.module.eam.service.location.LocationService; |
|
|
import com.win.module.eam.service.location.LocationService; |
|
@ -140,7 +142,18 @@ public class ItemAccountsController { |
|
|
List<ItemAccountsDO> list = itemAccountsService.getItemAccountsList(exportReqVO); |
|
|
List<ItemAccountsDO> list = itemAccountsService.getItemAccountsList(exportReqVO); |
|
|
// 导出 Excel
|
|
|
// 导出 Excel
|
|
|
List<ItemAccountsExcelVO> datas = ItemAccountsConvert.INSTANCE.convertList02(list); |
|
|
List<ItemAccountsExcelVO> datas = ItemAccountsConvert.INSTANCE.convertList02(list); |
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, datas); |
|
|
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<>(); |
|
|
|
|
|
String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.ITEM_ACCOUNT_LOCATION_TYPE); |
|
|
|
|
|
mapDropDown.put(7, type); |
|
|
|
|
|
ExcelUtils.write(response, "备件台账.xls", "数据", ItemAccountsExcelVO.class, datas,mapDropDown); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/get-import-template") |
|
|
@GetMapping("/get-import-template") |
|
|