From a33396e17dd847f31b62f416f7d9c5a58b79126b Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 28 七月 2023 09:02:29 +0800
Subject: [PATCH] LIMS管理系统框架-开发7-28早上
---
inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java | 69 +++++++++++++++++++++++++++++++++-
1 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java b/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java
index b587e5c..d6651db 100644
--- a/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java
+++ b/inspection-server/src/main/java/com/yuanchu/limslaboratory/controller/PlanController.java
@@ -1,9 +1,20 @@
package com.yuanchu.limslaboratory.controller;
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.yuanchu.limslaboratory.pojo.InspectionProductList;
+import com.yuanchu.limslaboratory.pojo.Instrument;
+import com.yuanchu.limslaboratory.pojo.Product;
+import com.yuanchu.limslaboratory.pojo.dto.InspectionProductListDto;
+import com.yuanchu.limslaboratory.service.PlanService;
+import com.yuanchu.limslaboratory.service.ProductService;
+import com.yuanchu.limslaboratory.vo.Result;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
/**
* <p>
@@ -13,8 +24,62 @@
* @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
* @since 2023-07-17
*/
+@Api(tags = "妫�楠屾ā鍧�-->妫�楠岃鍒�")
@RestController
@RequestMapping("/plan")
public class PlanController {
+ @Resource
+ private PlanService planService;
+
+ @Resource
+ ProductService productService;
+
+ @ApiOperation("鏌ヨ鎵�鏈夋楠岃鍒掑垎閰�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "pageSize", value = "椤垫暟", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "countSize", value = "鏉℃暟/椤�", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "state", value = "鐘舵��(涓虹┖=寰呭垎閰�)", dataTypeClass = Integer.class)
+ })
+ @GetMapping("/selectAllPlan")
+ public Result selectAllPlan(int pageSize, int countSize, Integer state) {
+ return Result.success(planService.selectAllPlan(pageSize, countSize, state));
+ }
+
+ @ApiOperation("鏍规嵁椤圭洰鍚嶆煡璇㈡墍鏈夎瘯楠屾柟娉�")
+ @GetMapping("/selectInstrumentByProname")
+ public Result selectInstrumentByProname(String name) {
+ return Result.success(productService.selectInstrumentByProname(name));
+ }
+
+ @ApiOperation("鍒嗛厤妫�楠岃鍒掍腑鍒嗛厤椤圭洰")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "妫�楠屾牱鍝両D", dataTypeClass = Integer.class, required = true),
+ })
+ @PutMapping("/upPlan/{id}")
+ public Result upPlan(@PathVariable Integer id ,@RequestBody InspectionProductListDto inspectionProductListDto) {
+ planService.upPlan(id,inspectionProductListDto);
+ return Result.success();
+ }
+
+ @ApiOperation("浣滃簾妫�楠岃鍒�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "妫�楠岃鍒扞D", dataTypeClass = Integer.class, required = true),
+ })
+ @PutMapping("/delPlan/{id}")
+ public Result delPlan(@PathVariable Integer id) {
+ planService.delPlan(id);
+ return Result.success();
+ }
+
+ @ApiOperation("鏌ヨ鎴愬搧妫�楠�")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "pageSize", value = "椤垫暟", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "countSize", value = "鏉℃暟/椤�", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "state", value = "鐘舵��(涓虹┖=鍏ㄩ儴)", dataTypeClass = Integer.class)
+ })
+ @GetMapping("/selectInspection")
+ public Result selectInspection(int pageSize, int countSize, Integer state) {
+ return Result.success(planService.selectInspection(pageSize,countSize,state));
+ }
}
--
Gitblit v1.9.3