wu
2024-08-02 928fa3682fcd0bcb59e3ca3da8770ecbb06cf315
hangzhoumesParent/moduleService/GlassStorageModule/src/main/java/com/mes/rawusage/controller/RawUsageController.java
@@ -1,5 +1,6 @@
package com.mes.rawusage.controller;
import com.mes.shelfrack.entity.request.RawUsageAndShelfRack;
import com.mes.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
@@ -80,8 +81,8 @@
     */
    @ApiOperation(value = "修改", notes = "修改数据")
    @ApiResponses({@ApiResponse(code = 200, message = "操作成功")})
    @PutMapping
    public Result update( @RequestBody RawUsage rawUsage) {
    @PostMapping("/updaterawUsage")
    public Result updaterawUsage(@RequestBody RawUsage rawUsage) {
        boolean result = rawUsageService.updateById(rawUsage);
        return Result.success(result);
    }
@@ -89,14 +90,30 @@
    /**
     * 删除
     *
     * @param id
     * @param
     * @return
     */
    @ApiOperation(value = "删除", notes = "删除数据")
    @DeleteMapping("/{id}")
    public Result delete(@PathVariable("id") Long id) {
        int result = rawUsageService.getBaseMapper().deleteById(id);
        return Result.success(result);
    @PostMapping("/id")
    public Result delete(@RequestBody RawUsage rawUsage) {
         rawUsageService.updateRawPackageAndStorageRack(rawUsage);
        return Result.success();
    }
    @ApiOperation(value = "入库", notes = "入库")
    @PostMapping("/inStorage")
    public Result inStorage(@RequestBody RawUsageAndShelfRack rawUsage) {
        rawUsageService.inStorage(rawUsage);
        return Result.success();
    }
    @ApiOperation(value = "出库", notes = "出库")
    @PostMapping("/outStorage")
    public Result outStorage(@RequestBody RawUsageAndShelfRack rawUsage) {
        rawUsageService.outStorage(rawUsage);
        return Result.success();
    }
}