New file |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.GlassPriceBasic; |
| | | import com.example.erp.service.sd.GlassPriceBasicService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 产品价格计算 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/glassPriceBasic") |
| | | @Api(value="产品价格controller",tags={"产品价格计算操作接口"}) |
| | | public class GlassPriceBasicController { |
| | | private final GlassPriceBasicService glassPriceBasicService; |
| | | |
| | | public GlassPriceBasicController(GlassPriceBasicService glassPriceBasicService) { |
| | | this.glassPriceBasicService = glassPriceBasicService; |
| | | } |
| | | |
| | | @ApiOperation("保存产品价格数据") |
| | | @PostMapping("/save") |
| | | public Result save(@RequestBody Map<String,Object> prams ){ |
| | | |
| | | return Result.seccess(glassPriceBasicService.save(prams)); |
| | | } |
| | | |
| | | @ApiOperation("计算成品价格") |
| | | @PostMapping("/glassPriceComputed/{productId}") |
| | | public Result glassPriceComputed(@PathVariable String productId){ |
| | | return Result.seccess(glassPriceBasicService.glassPriceComputed(productId)); |
| | | } |
| | | |
| | | @ApiOperation("玻璃价格查询") |
| | | @PostMapping("/searchGlassPrice") |
| | | public Result searchGlassPrice(){ |
| | | return Result.seccess(glassPriceBasicService.searchGlassPrice()); |
| | | } |
| | | |
| | | @ApiOperation("玻璃价格修改") |
| | | @PostMapping("/updateGlassPriceById") |
| | | public Result updateGlassPriceById(@RequestBody GlassPriceBasic glassPriceBasic){ |
| | | return Result.seccess(glassPriceBasicService.updateGlassPriceById(glassPriceBasic)); |
| | | } |
| | | |
| | | @ApiOperation("玻璃价格删除") |
| | | @PostMapping("/deleteGlassPriceById/{id}") |
| | | public Result deleteGlassPriceById(@PathVariable String id){ |
| | | return Result.seccess(glassPriceBasicService.deleteGlassPriceById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |