春风项目四线(合箱线、总装线)
wujian
2024-07-21 a4c4c1f611bd79695e121b88762a64433bd3a94c
jcdm-main/src/main/java/com/jcdm/main/da/tileMatchMiddleware/controller/DaTileMatchMiddlewareController.java
@@ -5,6 +5,8 @@
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.jcdm.common.core.domain.R;
import com.jcdm.main.da.paramCollection.domain.DaParamCollection;
import com.jcdm.main.da.passingStationCollection.domain.ProductNewPassStation;
import com.jcdm.main.da.passingStationCollection.service.ProductNewPassStationService;
@@ -188,4 +190,20 @@
//        InitCallback.miloService.writeToOpcByte(entity2);//写完成
        return rMiddleware;
    }
    @GetMapping("/getSfcCodeByConnectCode")
    public R getSfcCodeByConnectCode(String connectCode){
        DaTileMatchMiddleware tileMatchMiddleware = new DaTileMatchMiddleware();
        if (StrUtil.isBlank(connectCode)){
            return R.fail("连杆码不能为空");
        }
        DaTileMatchMiddleware daTileMatchMiddleware = new DaTileMatchMiddleware();
        daTileMatchMiddleware.setConnectingrodNo(connectCode);
        List<DaTileMatchMiddleware> daTileMatchMiddlewares = daTileMatchMiddlewareService.selectDaTileMatchMiddlewareList(daTileMatchMiddleware);
        if (CollUtil.isNotEmpty(daTileMatchMiddlewares)){
            tileMatchMiddleware = daTileMatchMiddlewares.get(0);
        }
        return R.ok(tileMatchMiddleware);
    }
}