|
@@ -0,0 +1,61 @@
|
|
|
+package com.ruoyi.bionutrition.stock;
|
|
|
+
|
|
|
+import com.ruoyi.ams.bionutrition.stock.domain.StockTakeRecord;
|
|
|
+import com.ruoyi.ams.bionutrition.stock.dto.StockTakeRecordDTO;
|
|
|
+import com.ruoyi.ams.bionutrition.stock.service.StockTakeRecordService;
|
|
|
+import com.ruoyi.common.constant.Constants;
|
|
|
+import com.ruoyi.common.core.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.framework.service.bean.PageData;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import springfox.documentation.annotations.ApiIgnore;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 盘点
|
|
|
+ *
|
|
|
+ * @author zhangx
|
|
|
+ * @date 2024-01-22
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/stock")
|
|
|
+public class StockTakeRecordController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StockTakeRecordService stockTakeRecordService;
|
|
|
+
|
|
|
+ @GetMapping("page")
|
|
|
+ @ApiOperation("分页")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = Constants.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
|
|
+ @ApiImplicitParam(name = Constants.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
|
|
+ @ApiImplicitParam(name = Constants.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = Constants.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "stockNo", value = "盘点单号", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "stockLocation", value = "盘点库位", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "skuCode", value = "物料编码", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "skuName", value = "物料名称", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "inventoryCode", value = "存货编码", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "productLotNumber", value = "产品批号", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "stockType", value = "盘点类型", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "beginTime", value = "起始时间", paramType = "query", dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
|
|
+ })
|
|
|
+ public AjaxResult page(@ApiIgnore @RequestParam Map<String, Object> params){
|
|
|
+ PageData<StockTakeRecordDTO> page = stockTakeRecordService.page(params);
|
|
|
+ return AjaxResult.success(page);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("{id}")
|
|
|
+ @ApiOperation("信息")
|
|
|
+ public AjaxResult get(@PathVariable("id") String id){
|
|
|
+ StockTakeRecord data = stockTakeRecordService.selectById(id);
|
|
|
+ return AjaxResult.success(data);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|