From 6170908b69269ee14eae05787eafe682fda00eef Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 18 八月 2023 18:06:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
base-server/src/main/java/com/yuanchu/mom/controller/TechnologyTemplateController.java | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 109 insertions(+), 0 deletions(-)
diff --git a/base-server/src/main/java/com/yuanchu/mom/controller/TechnologyTemplateController.java b/base-server/src/main/java/com/yuanchu/mom/controller/TechnologyTemplateController.java
new file mode 100644
index 0000000..ee2d9b9
--- /dev/null
+++ b/base-server/src/main/java/com/yuanchu/mom/controller/TechnologyTemplateController.java
@@ -0,0 +1,109 @@
+package com.yuanchu.mom.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.yuanchu.mom.pojo.dto.TechnologyTemplateDto;
+import com.yuanchu.mom.service.DeviceService;
+import com.yuanchu.mom.utils.JackSonUtil;
+import com.yuanchu.mom.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.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import com.yuanchu.mom.service.TechnologyTemplateService;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 宸ヨ壓璺嚎缁存姢琛�(TechnologyTemplate)琛ㄦ帶鍒跺眰
+ *
+ * @author zss
+ * @since 2023-08-18 16:59:14
+ */
+@Api(tags = "鍩虹鏁版嵁-->宸ヨ壓璺嚎缁存姢琛ㄦ帴鍙�")
+@RestController
+@RequestMapping("/technologyTemplate")
+public class TechnologyTemplateController {
+
+ @Autowired
+ private TechnologyTemplateService technologyTemplateService;
+
+
+ @ApiOperation(value = "鏂板宸ヨ壓璺嚎缁存姢-->閫夋嫨璁惧缁�")
+ @GetMapping("/chooseDevGroup")
+ public Result chooseDevGroup() {
+ return Result.success(technologyTemplateService.chooseDevGroup());
+ }
+
+ @ApiOperation(value = "鏂板宸ヨ壓璺嚎缁存姢")
+ @PostMapping("/addTechTemp")
+ public Result addSale(@Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) {
+ technologyTemplateService.addSale(technologyTemplateDto);
+ return Result.success("鏂板鎴愬姛!");
+ }
+
+ @ApiOperation(value = "鏌ヨ宸ヨ壓璺嚎鍒楄〃")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "pageSize", value = "椤垫暟", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "countSize", value = "鏉℃暟/椤�", dataTypeClass = Integer.class, required = true),
+ @ApiImplicitParam(name = "type", value = "绫诲瀷", dataTypeClass = Integer.class),
+ @ApiImplicitParam(name = "name", value = "宸ヨ壓", dataTypeClass = String.class),
+ @ApiImplicitParam(name = "father", value = "宸ュ簭", dataTypeClass = String.class)
+ })
+ @GetMapping("/selectAllTechTem")
+ public Result selectAllTechTem(int pageSize, int countSize, Integer type, String name, String father) {
+ IPage<Map<String, Object>> technologyTemplatePage = technologyTemplateService.selectAllTechTem(new Page<Object>(pageSize, countSize), type, name, father);
+ Map<String, Object> map = new HashMap<>();
+ map.put("total", technologyTemplatePage.getTotal());
+ map.put("row", technologyTemplatePage.getRecords());
+ return Result.success(map);
+ }
+
+ @ApiOperation(value = "鏍规嵁id鏌ヨ璇︽儏")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "宸ヨ壓id", dataTypeClass = Integer.class,required = true)
+ })
+ @GetMapping("/selecTechById")
+ public Result selecTechById(Integer id) {
+ return Result.success(technologyTemplateService.getById(id));
+ }
+
+ @ApiOperation(value = "缂栬緫")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "宸ヨ壓id", dataTypeClass = Integer.class,required = true)
+ })
+ @PostMapping("/writeTechById")
+ public Result writeTechById(Integer id,@RequestBody TechnologyTemplateDto technologyTemplateDto) {
+ technologyTemplateService.writeTechById(id,technologyTemplateDto);
+ return Result.success("淇敼鎴愬姛!");
+ }
+
+ @ApiOperation(value = "鍒犻櫎")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "id", value = "宸ヨ壓id", dataTypeClass = Integer.class,required = true)
+ })
+ @PostMapping("/delTechById")
+ public Result delTechById(Integer id) {
+ technologyTemplateService.delTechById(id);
+ return Result.success("鍒犻櫎鎴愬姛!");
+ }
+
+ @ApiOperation(value = "鎵归噺鍒犻櫎")
+ @ApiImplicitParams(value = {
+ @ApiImplicitParam(name = "ids", value = "宸ヨ壓id", dataTypeClass = String.class,required = true)
+ })
+ @PostMapping("/delAllTech")
+ public Result delAllTech(String ids) {
+ technologyTemplateService.delAllTech(ids);
+ return Result.success("鎵归噺鍒犻櫎鎴愬姛!");
+ }
+}
+
--
Gitblit v1.9.3