From 4e91ae3c1ff41d0bf9f65d444c90c2583e69cdb7 Mon Sep 17 00:00:00 2001 From: admin <15939171744@163.com> Date: 星期五, 27 九月 2024 17:16:10 +0800 Subject: [PATCH] 下线打印报告优化 --- jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java index 4dfcc1e..7c70c94 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/controller/BsFormulaChildInfoController.java @@ -53,6 +53,30 @@ private MiloService miloService; /** + * 杩斾慨淇℃伅鍐欏叆plc + */ + @GetMapping("/writeRepairInformationIntoPlc") + public AjaxResult writeRepairInformationIntoPlc(BsFormulaChildInfo bsFormulaChildInfo) + { + String thoroughfare = Constants.thoroughfareMap.get(bsFormulaChildInfo.getProcessesCode());//鑾峰彇閫氶亾 + try { + String prefix = thoroughfare+".OP165."; + miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(prefix+"SNCode").value(bsFormulaChildInfo.getSfcCode()).build()); + miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(prefix+"WorkOrderNumber").value(bsFormulaChildInfo.getWorkOrderNo()).build()); + miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(prefix+"ProcessesCode").value(bsFormulaChildInfo.getProcessesCode()).build()); + miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(prefix+"EngravingStatus").value(bsFormulaChildInfo.getEngravingStatus()).build()); + } catch (Exception e) { + throw new RuntimeException(e); + } + return AjaxResult.success(); + } + + public static void main(String[] args) { + String str = "TZ180XSDSZX012409120000001"; + System.out.println(str.length()); + } + + /** * 鏈仛瀹屽伐搴忓洖澶峱lc淇″彿 */ @GetMapping("/unfinishedProcess") -- Gitblit v1.9.3