wu
2025-02-27 597694f4d57a16aeb1bdccdebfcb5375abc1fce9
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/temperingglass/controller/TemperingGlassInfoController.java
@@ -1,9 +1,12 @@
package com.mes.temperingglass.controller;
import com.mes.damage.entity.Damage;
import com.mes.damage.service.DamageService;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.temperingglass.entity.TemperingGlassInfo;
import com.mes.temperingglass.service.TemperingGlassInfoService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +18,7 @@
/**
 * @author SNG-010
 */
@Api(tags = "钢化显示")
@RestController
@RequestMapping("/temperingGlassInfo")
@Slf4j
@@ -50,13 +54,26 @@
        temperingGlassInfo.setState(damage.getStatus());
        temperingGlassInfo.setGlassId(damage.getGlassId());
        int result=temperingGlassInfoService.updateTemperingState(temperingGlassInfo);
//        if(damage.getStatus()>5) {
//            damage.setType(damage.getStatus());
//            damage.setStatus(1);
//            damageService.insertDamage(damage);
//        }
        if (damage.getStatus() > 5) {
            damageService.autoSubmitReport(damage.getGlassId(), damage.getLine()
                    , damage.getWorkingProcedure(), "钢化炉", damage.getStatus());
        }
        return Result.build(200, "破损成功", result);
    }
    @ApiOperation("//查询当前工程号所有的炉号")
    @PostMapping("/selectTempering") //查询当前工程号所有的炉号
    public Result<GlassInfo> selectTempering(@RequestBody GlassInfo glassInfo) {
        GlassInfo glass = temperingGlassInfoService.selectTempering(glassInfo);
        return Result.build(200, "查询成功", glass);
    }
    @ApiOperation("//查询当前工程号的钢化版图")
    @PostMapping("/selectTemperingGlass") //查询当前工程号所有的炉号
    public Result<List<GlassInfo>> selectTemperingGlass(@RequestBody GlassInfo glassInfo) {
        List<GlassInfo> glass = temperingGlassInfoService.selectTemperingGlass(glassInfo);
        return Result.build(200, "查询成功", glass);
    }
}