|
@ -5,10 +5,16 @@ 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.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.itemaccounts.vo.ItemAccountsRespVO; |
|
|
import com.win.module.eam.controller.itemoutlocation.vo.*; |
|
|
import com.win.module.eam.controller.itemoutlocation.vo.*; |
|
|
import com.win.module.eam.convert.itemoutlocation.ItemOutLocationConvert; |
|
|
import com.win.module.eam.convert.itemoutlocation.ItemOutLocationConvert; |
|
|
|
|
|
import com.win.module.eam.dal.dataobject.item.ItemDO; |
|
|
import com.win.module.eam.dal.dataobject.itemoutlocation.ItemOutLocationDO; |
|
|
import com.win.module.eam.dal.dataobject.itemoutlocation.ItemOutLocationDO; |
|
|
|
|
|
import com.win.module.eam.dal.dataobject.location.LocationDO; |
|
|
|
|
|
import com.win.module.eam.dal.dataobject.locationarea.LocationAreaDO; |
|
|
|
|
|
import com.win.module.eam.service.item.ItemService; |
|
|
import com.win.module.eam.service.itemoutlocation.ItemOutLocationService; |
|
|
import com.win.module.eam.service.itemoutlocation.ItemOutLocationService; |
|
|
|
|
|
import com.win.module.eam.service.location.LocationService; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.Parameter; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
|
import io.swagger.v3.oas.annotations.tags.Tag; |
|
@ -36,6 +42,12 @@ public class ItemOutLocationController { |
|
|
@Resource |
|
|
@Resource |
|
|
private ItemOutLocationService itemOutLocationService; |
|
|
private ItemOutLocationService itemOutLocationService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
private ItemService itemService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
private LocationService locationService; |
|
|
|
|
|
|
|
|
@PostMapping("/create") |
|
|
@PostMapping("/create") |
|
|
@Operation(summary = "创建备件出库记录") |
|
|
@Operation(summary = "创建备件出库记录") |
|
|
@PreAuthorize("@ss.hasPermission('item:itemOutLocation:create')") |
|
|
@PreAuthorize("@ss.hasPermission('item:itemOutLocation:create')") |
|
@ -83,7 +95,14 @@ public class ItemOutLocationController { |
|
|
// @PreAuthorize("@ss.hasPermission('record:item-out-location:query')")
|
|
|
// @PreAuthorize("@ss.hasPermission('record:item-out-location:query')")
|
|
|
public CommonResult<PageResult<ItemOutLocationRespVO>> getItemOutLocationPage(@Valid ItemOutLocationPageReqVO pageVO) { |
|
|
public CommonResult<PageResult<ItemOutLocationRespVO>> getItemOutLocationPage(@Valid ItemOutLocationPageReqVO pageVO) { |
|
|
PageResult<ItemOutLocationDO> pageResult = itemOutLocationService.getItemOutLocationPage(pageVO); |
|
|
PageResult<ItemOutLocationDO> pageResult = itemOutLocationService.getItemOutLocationPage(pageVO); |
|
|
return success(ItemOutLocationConvert.INSTANCE.convertPage(pageResult)); |
|
|
PageResult<ItemOutLocationRespVO> result = ItemOutLocationConvert.INSTANCE.convertPage(pageResult); |
|
|
|
|
|
for(ItemOutLocationRespVO vo:result.getList()){ |
|
|
|
|
|
ItemDO itemDO = itemService.getByNumber(vo.getItemNumber()); |
|
|
|
|
|
vo.setItemName(itemDO.getName()); |
|
|
|
|
|
LocationDO locationDO = locationService.getByNumber(vo.getLocationNumber()); |
|
|
|
|
|
vo.setLocationName(locationDO.getName()); |
|
|
|
|
|
} |
|
|
|
|
|
return success(result); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/export-excel") |
|
|
@GetMapping("/export-excel") |
|
@ -112,6 +131,12 @@ public class ItemOutLocationController { |
|
|
public CommonResult<PageResult<ItemOutLocationRespVO>> getLocationSenior(@Valid @RequestBody CustomConditions conditions) { |
|
|
public CommonResult<PageResult<ItemOutLocationRespVO>> getLocationSenior(@Valid @RequestBody CustomConditions conditions) { |
|
|
PageResult<ItemOutLocationDO> pageResult = itemOutLocationService.getItemOutLocationSenior(conditions); |
|
|
PageResult<ItemOutLocationDO> pageResult = itemOutLocationService.getItemOutLocationSenior(conditions); |
|
|
PageResult<ItemOutLocationRespVO> result = ItemOutLocationConvert.INSTANCE.convertPage(pageResult); |
|
|
PageResult<ItemOutLocationRespVO> result = ItemOutLocationConvert.INSTANCE.convertPage(pageResult); |
|
|
|
|
|
for(ItemOutLocationRespVO vo:result.getList()){ |
|
|
|
|
|
ItemDO itemDO = itemService.getByNumber(vo.getItemNumber()); |
|
|
|
|
|
vo.setItemName(itemDO.getName()); |
|
|
|
|
|
LocationDO locationDO = locationService.getByNumber(vo.getLocationNumber()); |
|
|
|
|
|
vo.setLocationName(locationDO.getName()); |
|
|
|
|
|
} |
|
|
return success(result); |
|
|
return success(result); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|