供应商出入库记录

This commit is contained in:
谭凯凯
2024-11-06 10:01:54 +08:00
committed by Tankaikai
parent 04f844cf93
commit cd3624027c
2 changed files with 20 additions and 7 deletions

View File

@@ -1,20 +1,21 @@
package cn.ysk.cashier.controller.product; package cn.ysk.cashier.controller.product;
import cn.ysk.cashier.annotation.AnonymousAccess;
import cn.ysk.cashier.annotation.Log; import cn.ysk.cashier.annotation.Log;
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
import cn.ysk.cashier.service.TbProductStockOperateService;
import cn.ysk.cashier.dto.product.OutAndOnDto; import cn.ysk.cashier.dto.product.OutAndOnDto;
import cn.ysk.cashier.dto.product.TbProductStockOperateQueryCriteria; import cn.ysk.cashier.dto.product.TbProductStockOperateQueryCriteria;
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
import cn.ysk.cashier.service.TbProductStockOperateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/** /**
* @website https://eladmin.vip * @website https://eladmin.vip
@@ -40,6 +41,11 @@ public class TbProductStockOperateController {
return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK); return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK);
} }
@PostMapping("/page")
public ResponseEntity<Object> page(@RequestBody TbProductStockOperateQueryCriteria criteria){
return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK);
}
@GetMapping("/{id}") @GetMapping("/{id}")
public ResponseEntity<Object> queryById(@PathVariable Integer id){ public ResponseEntity<Object> queryById(@PathVariable Integer id){
return new ResponseEntity<>(tbProductStockOperateService.findById(id),HttpStatus.OK); return new ResponseEntity<>(tbProductStockOperateService.findById(id),HttpStatus.OK);

View File

@@ -15,9 +15,10 @@
*/ */
package cn.ysk.cashier.dto.product; package cn.ysk.cashier.dto.product;
import lombok.Data;
import java.util.List;
import cn.ysk.cashier.annotation.Query; import cn.ysk.cashier.annotation.Query;
import lombok.Data;
import java.util.List;
/** /**
* @website https://eladmin.vip * @website https://eladmin.vip
@@ -34,6 +35,12 @@ public class TbProductStockOperateQueryCriteria{
@Query(type = Query.Type.BETWEEN) @Query(type = Query.Type.BETWEEN)
private List<Long> createdAt; private List<Long> createdAt;
@Query(type = Query.Type.IN)
private List<Long> type;
@Query(type = Query.Type.EQUAL)
private String purveyorId;
private Integer page; private Integer page;
private Integer size; private Integer size;