zhoushihao
2024-12-30 2e20e85173b764e43a6e4022072bc8fb0cc61330
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageDetailsController.java
@@ -1,9 +1,19 @@
package com.mes.hollow.controller;
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * (HollowBigStorageCageDetails)表控制层
@@ -16,5 +26,29 @@
@RequestMapping("hollowBigStorageCageDetails")
public class HollowBigStorageCageDetailsController {
    @Autowired
    private HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
    @ApiOperation("理片笼详情添加")
    @PostMapping("/insertHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> insertHollowBigStorageCageDetails(@RequestBody HollowBigStorageCageDetails details) {
        hollowBigStorageCageDetailsService.insertHollowBigStorageCageDetails(details);
        return Result.build(200, "添加成功", null);
    }
    @ApiOperation("理片笼详情删除")
    @PostMapping("/deleteHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> deleteHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot) {
        hollowBigStorageCageDetailsService.deleteHollowBigStorageCageDetails(glassId, deviceId, slot);
        return Result.build(200, "删除成功", null);
    }
    @ApiOperation("理片笼笼内玻璃破损0/拿走1")
    @PostMapping("/damageHollowBigStorageCageDetails")
    public Result<List<HollowBigStorageAndDetailsDTO>> damageHollowBigStorageCageDetails(String glassId, Integer deviceId, Integer slot, int state) {
        hollowBigStorageCageDetailsService.damageHollowBigStorageCageDetails(glassId, deviceId, slot, state);
        return Result.build(200, "破损/拿走成功", null);
    }
}