admin
2024-07-05 7597c63fa8a1384c452873ff1fd9d471d8ad1237
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java
@@ -5,6 +5,7 @@
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jcdm.main.constant.Constants;
import com.kangaroohy.milo.model.ReadWriteEntity;
@@ -47,6 +48,25 @@
    /**
     * 扫码确认
     */
    @GetMapping("/initializedData")
    public AjaxResult initializedData(BsFormulaChildInfo bsFormulaChildInfo)
    {
        String productNum = "";
        try {
            String str = "MOZU1."+bsFormulaChildInfo.getLocationCode()+".MES_ModuleCode";
            Object productNumObject = miloService.readFromOpcUa(str).getValue();
            if(ObjectUtil.isNotNull(productNumObject)){
                productNum = productNumObject.toString();
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return AjaxResult.success(productNum);
    }
    /**
     * 扫码确认
     */
    @GetMapping("/fistSetpNumber")
    public AjaxResult fistSetpNumber(BsFormulaChildInfo bsFormulaChildInfo)
    {