| ¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.pojo.vo.TechnologyTemplateVo1; |
| | | 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.web.bind.annotation.*; |
| | | import com.yuanchu.mom.service.TechnologyTemplateService; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * å·¥èºæ¨¡ç表(TechnologyTemplate)表æ§å¶å± |
| | | * |
| | | * @author zss |
| | | * @since 2023-08-09 11:20:20 |
| | | */ |
| | | @Api(tags = "åºç¡æ°æ®-->å·¥åº") |
| | | @RestController |
| | | @RequestMapping("/technologyTemplate") |
| | | public class TechnologyTemplateController { |
| | | |
| | | @Autowired |
| | | private TechnologyTemplateService technologyTemplateService; |
| | | |
| | | @ApiOperation(value = "æ°å¢å·¥åºæ¨¡ç") |
| | | @PostMapping("/addTech") |
| | | public Result addTech(@RequestBody TechnologyTemplateDto technologyTemplateDto){ |
| | | technologyTemplateService.addTech(technologyTemplateDto); |
| | | return Result.success("æ°å¢æå!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢ææç±»å") |
| | | @GetMapping("/seleType") |
| | | public Result seleType(){ |
| | | return Result.success(technologyTemplateService.seleType()); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å·¥åºæ¨¡çå表(äºçº§æ )") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "element", value = "å
ä»¶", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "father", value = "å·¥åº(ç¶ç±»)", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "type", value = "ç±»å", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @GetMapping("/selTech") |
| | | public Result selTech(String element,String father,Integer type){ |
| | | List<TechnologyTemplateVo1> map = technologyTemplateService.selTech(element, father, type); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢å·¥åºæ¨¡ç详æ
") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "å·¥åºid", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @GetMapping("/selTechById") |
| | | public Result selTechById(Integer id){ |
| | | return Result.success(technologyTemplateService.selTechById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç¼è¾") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "å·¥åºid", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/updaTechById") |
| | | public Result updaTechById(Integer id,@RequestBody TechnologyTemplateDto technologyTemplateDto){ |
| | | technologyTemplateService.updaTechById(id,technologyTemplateDto); |
| | | return Result.success("ä¿®æ¹æå!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®éå®åidå é¤") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "å·¥åºid", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delTech") |
| | | public Result delTech(Integer id) { |
| | | technologyTemplateService.delTech(id); |
| | | return Result.success("å 餿å!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¹éå é¤") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "éå®åid", dataTypeClass = Integer.class, dataType = "List", required = true) |
| | | }) |
| | | @PostMapping("/delAllTech") |
| | | public Result delAllTech(@RequestParam("ids") List<Integer> ids) { |
| | | technologyTemplateService.delAllTech(ids); |
| | | return Result.success("æ¹éå 餿å!"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |