-
admin
2024-06-06 019f1c8bac7e8986d299aff70c123dedc1747d72
-
已修改3个文件
24 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/doman/RestFulOrder.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -279,14 +279,18 @@
                    read = read + "ModuleCode";
                    if(device.equals("OP365")){
                        try {
                            result = saveStationInfo365(thoroughfare,device);
                            return result;
//                            result = saveStationInfo365(thoroughfare,device);
//                            return result;
                            saveStationInfo365(thoroughfare,device);
//                            return result;
                        }catch (Exception e){
                            e.printStackTrace();
                        }
                    }
                }else {
                    read = read + "PACKCode";
                }
            }
                    snCode = miloService.readFromOpcUa(read).getValue().toString();
                    if(null == snCode || "".equals(snCode)){
@@ -322,8 +326,6 @@
                        }
                        result = "21";
                    }
                }
            }
@@ -553,7 +555,7 @@
    /**
     * 保存过站采集
     */
    public String saveStationInfo365(String thoroughfare,String device) throws Exception {
    public void saveStationInfo365(String thoroughfare,String device) throws Exception {
        String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
        String prefix = thoroughfare+"."+device+".";
        List<DaPassingStationCollection> passingStationCollections = new ArrayList<>();
@@ -590,11 +592,11 @@
                passingStationCollections.add(daPassingStationCollection);
            }
            daPassingStationCollectionService.saveBeachDaPassingStationCollection(passingStationCollections);
            //miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
            return "21";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
//            return "21";
        }else {
            //miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
            return "22";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
//            return "22";
        }
    }
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/doman/RestFulOrder.java
@@ -9,4 +9,5 @@
    private String materialCode;
    private String productionOrderNum;
    private Long planQty;
    private String createTime;
}
jcdm-main/src/main/java/com/jcdm/main/restful/qingYan/service/ExternalInterface.java
@@ -37,6 +37,8 @@
@RestController
@RequestMapping("/jcdmMes")
public class ExternalInterface {
    public SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    @Autowired
    private IDaTestDeviceInterfaceService daTestDeviceInterfaceService;
    @Autowired
@@ -176,6 +178,7 @@
            order.setMaterialCode(omProductionOrdeInfo.getMaterialCode());
            order.setStationCode(omProductionOrdeInfo.getStationCode());
            order.setPlanQty(omProductionOrdeInfo.getPlanQty());
            order.setCreateTime(format.format(omProductionOrdeInfo.getCreateTime()));
            restFulOrders.add(order);
        }
        return AjaxResult.success(restFulOrders);