zhoushihao
2024-07-11 a4cc855f17c36f6ceda20100bc491bc6a0071c27
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downworkstation/controller/DownWorkstationController.java
@@ -2,6 +2,7 @@
import com.mes.downworkstation.entity.DownWorkstation;
import com.mes.downworkstation.entity.request.DownWorkRequest;
import com.mes.downworkstation.service.DownWorkstationService;
import com.mes.glassinfo.service.GlassInfoService;
import io.swagger.annotations.Api;
@@ -74,21 +75,13 @@
    }
//绑定架子
@ApiOperation("绑定架子")
    //绑定架子
    @ApiOperation("绑定架子")
    @PostMapping("/updateFlowCardId")
    public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody Map<String, Object> requestData) {
        // 从 requestData 中获取传入的 flowCardId
        String flowCardId = (String) requestData.get("flowCardId");
        int workstationId = (int) requestData.get("workstationId");
        int layer = (int) requestData.get("layer");
    public ResponseEntity<Map<String, Object>> updateFlowCardId(@RequestBody DownWorkRequest request) {
        // 查询对应 flowCardId 的玻璃信息总数量
        int glassInfoCount = glassInfoService.getGlassInfoCountByFlowCardId(flowCardId,layer);
         int artificialnumber=0;
    // 更新 down_workstation 表中的总数量
        downWorkstationService.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId,artificialnumber);
        // 绑定架子
        downWorkstationService.updateFlowCardIdAndCount(request.getFlowCardId(),  request.getWorkstationId(), request.getLayer());
        // 构建响应数据
        Map<String, Object> responseData = new HashMap<>();