| | |
| | | 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; |
| | |
| | | /** |
| | | * 扫码确认 |
| | | */ |
| | | @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) |
| | | { |