guoyuji
2024-10-22 020fcb1311aa00e29f473c001104ee3756321b03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.example.erp.controller.sd;
 
import com.example.erp.common.Result;
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));
    }
 
}