|
@ -5,6 +5,8 @@ import com.win.framework.common.pojo.PageResult; |
|
|
import com.win.framework.dict.core.util.DictFrameworkUtils; |
|
|
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.system.api.user.AdminUserApi; |
|
|
|
|
|
import com.win.module.system.api.user.dto.AdminUserRespDTO; |
|
|
import com.win.module.wms.controller.dock.vo.*; |
|
|
import com.win.module.wms.controller.dock.vo.*; |
|
|
import com.win.module.wms.convert.dock.DockConvert; |
|
|
import com.win.module.wms.convert.dock.DockConvert; |
|
|
import com.win.module.wms.dal.dataobject.dock.DockDO; |
|
|
import com.win.module.wms.dal.dataobject.dock.DockDO; |
|
@ -41,6 +43,9 @@ public class DockController { |
|
|
@Resource |
|
|
@Resource |
|
|
private DockService dockService; |
|
|
private DockService dockService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
private AdminUserApi userApi; |
|
|
|
|
|
|
|
|
@Resource |
|
|
@Resource |
|
|
private DockMapper dockMapper; |
|
|
private DockMapper dockMapper; |
|
|
|
|
|
|
|
@ -103,6 +108,11 @@ public class DockController { |
|
|
List<DockDO> list = dockService.getDockList(exportReqVO); |
|
|
List<DockDO> list = dockService.getDockList(exportReqVO); |
|
|
// 导出 Excel
|
|
|
// 导出 Excel
|
|
|
List<DockExcelVO> datas = DockConvert.INSTANCE.convertList02(list); |
|
|
List<DockExcelVO> datas = DockConvert.INSTANCE.convertList02(list); |
|
|
|
|
|
for(DockExcelVO vo : datas) { |
|
|
|
|
|
AdminUserRespDTO user = userApi.getUser(Long.valueOf(vo.getCreator())); |
|
|
|
|
|
//后端创建个字段作为前端展示的虚拟字段
|
|
|
|
|
|
vo.setCreator(user.getNickname()); |
|
|
|
|
|
} |
|
|
ExcelUtils.write(response, "月台.xls", "数据", DockExcelVO.class, datas); |
|
|
ExcelUtils.write(response, "月台.xls", "数据", DockExcelVO.class, datas); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -114,7 +124,7 @@ public class DockController { |
|
|
Map<Integer, String[]> mapDropDown = new HashMap<>(); |
|
|
Map<Integer, String[]> mapDropDown = new HashMap<>(); |
|
|
String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.DOCK_TYPE); |
|
|
String[] type = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.DOCK_TYPE); |
|
|
mapDropDown.put(5, type); |
|
|
mapDropDown.put(5, type); |
|
|
String[] available = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.PACK_UNIT); |
|
|
String[] available = DictFrameworkUtils.dictTypeDictDataValue(DictTypeConstants.TRUE_FALSE); |
|
|
mapDropDown.put(10, available);; |
|
|
mapDropDown.put(10, available);; |
|
|
// 输出
|
|
|
// 输出
|
|
|
ExcelUtils.write(response, "月台导入模板.xls", "月台列表", DockImportExcelVO.class, list,mapDropDown); |
|
|
ExcelUtils.write(response, "月台导入模板.xls", "月台列表", DockImportExcelVO.class, list,mapDropDown); |
|
|