| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.InventoryDto; |
| | | import com.ruoyi.system.dto.InventoryGoodsDto; |
| | | import com.ruoyi.system.dto.WarehousingGoodsDto; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.TErpGoodsWarehouseQuery; |
| | | import com.ruoyi.system.query.*; |
| | | import com.ruoyi.system.service.TErpGoodsService; |
| | | import com.ruoyi.system.service.TErpSupplierWarehousingService; |
| | | import com.ruoyi.system.vo.TErpGoodsVO; |
| | | import com.ruoyi.system.vo.TErpGoodsWarehouseLastVO; |
| | | import com.ruoyi.system.vo.TErpGoodsWarehouseRecordLastVO; |
| | | import com.ruoyi.system.vo.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class TErpSupplierWarehousingController { |
| | | |
| | | private final TErpSupplierWarehousingService erpSupplierWarehousingService; |
| | | private final TErpGoodsService erpGoodsService; |
| | | private final TokenService tokenService; |
| | | |
| | | @Autowired |
| | | public TErpSupplierWarehousingController(TErpSupplierWarehousingService erpSupplierWarehousingService, TokenService tokenService) { |
| | | public TErpSupplierWarehousingController(TErpSupplierWarehousingService erpSupplierWarehousingService, TErpGoodsService erpGoodsService, TokenService tokenService) { |
| | | this.erpSupplierWarehousingService = erpSupplierWarehousingService; |
| | | this.erpGoodsService = erpGoodsService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "供应商库存详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<List<TErpGoodsWarehouseLastVO>> detail(String id, String warehouseName) { |
| | | public R<List<TErpGoodsWarehouseLastVO>> detail(@RequestParam String id, String warehouseName) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpSupplierWarehousingService.detail(id,warehouseName,user)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "有效期预警") |
| | | @PostMapping(value = "/validityPeriodWarning") |
| | | public R<PageInfo<ValidityPeriodWarningVo>> validityPeriodWarning(@RequestBody ValidityPeriodWarningQuery query) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | PageInfo<ValidityPeriodWarningVo> pageInfo =erpSupplierWarehousingService.validityPeriodWarning(query,user); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "供应商 盘点") |
| | | @PostMapping(value = "/pageInventoryList") |
| | | public R<PageInfo<PageInventoryListVo>> pageInventoryList(@RequestBody TErpInventoryQuery query) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpSupplierWarehousingService.pageInventoryList(query,user)); |
| | | } |
| | | |
| | | @ApiOperation(value = "供应商 盘点详情") |
| | | @GetMapping(value = "/detailInventory/{id}") |
| | | public R<List<InventoryDetailVo>> detailInventory(@PathVariable String id) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpSupplierWarehousingService.detailInventory(id,user)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "供应商 盘点 商品选择") |
| | | @PostMapping(value = "/pageInventoryGoodsPageList") |
| | | public R<PageInfo<TErpGoodsInventoryVO>> pageInventoryGoodsPageList(@RequestBody @Valid TErpGoodsInventoryQuery query) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | return R.ok(erpGoodsService.pageInventoryGoodsPageList(query,user)); |
| | | } |
| | | |
| | | @ApiOperation(value = "供应商 确认盘点") |
| | | @PostMapping(value = "/inventoryGoods") |
| | | public R<?> inventoryGoods(@RequestBody @Valid InventoryDto dto) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | erpGoodsService.inventoryGoods(dto,user); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |