billion-admin/src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
billion-main/src/main/java/com/billion/main/api/domain/IGBT.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
billion-main/src/main/java/com/billion/main/plc/constant/Constants.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
billion-main/src/main/java/com/billion/main/plc/controller/MesPlcControl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
billion-main/src/main/java/com/billion/main/plc/sub/OPCUaSubscription.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
billion-ui/src/views/main/wc/IGBTStationWork.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
billion-admin/src/main/resources/application.yml
@@ -16,7 +16,7 @@ # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 port: 8080 port: 8083 servlet: # 应用的访问路径 context-path: / billion-main/src/main/java/com/billion/main/api/domain/IGBT.java
@@ -5,11 +5,11 @@ @Data public class IGBT extends SyDomanBase{ private String sfcCode; // IGBT物料码 private String SolderJointHeightResult_1; // 焊点高度检测结果1 private String TightenData_Angle_1; // 拧紧角度数据1 private String resistanceValue_1; // 电阻值1 private String TightenData_Status_1; // 拧紧状态数据1 private String WeldingPointAdhesionResult_1; // WeldingPointAdhesionResult_1 private Boolean SolderJointHeightResult_1; // 焊点高度检测结果1 private Integer TightenData_Angle_1; // 拧紧角度数据1 private Double resistanceValue_1; // 电阻值1 private Byte TightenData_Status_1; // 拧紧状态数据1 private Boolean WeldingPointAdhesionResult_1; // WeldingPointAdhesionResult_1 } billion-main/src/main/java/com/billion/main/plc/constant/Constants.java
@@ -6,11 +6,8 @@ import java.util.Map; public class Constants { public static final String SY_MES_URL = "http://192.168.0.204:8610/v1/report"; // public static final String SY_MES_URL = "http://127.0.0.1:8085/bs/processesInfo/v1/report"; public static final String WC_TEST_MES_URL = "http://10.0.11.40:9000/open/saveTwoPlant"; //测试环境接口地址 public static final String SY_FORMAL_MES_URL = "http://mes4api.weichai.com/open/saveTwoPlant"; //正式环境接口地址: public static final String IN_BOUND_TIME_CODE = "PAT_INT"; public static final String OUT_BOUND_TIME_CODE = "PAT_INT"; billion-main/src/main/java/com/billion/main/plc/controller/MesPlcControl.java
@@ -26,7 +26,7 @@ { Integer result = 21; try { miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("wc.IGBT.mesAllowWork").value("21").build()); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("wc.IGBT.mesAllowWork").value(result).build()); miloService.writeToOpcUa(ReadWriteEntity.builder().identifier("wc.IGBT.sfcCode").value(mesToPlcVo.getIgbtMateral()).build()); } catch (Exception e) { throw new RuntimeException("写入plc允许工作错误!请检查"); billion-main/src/main/java/com/billion/main/plc/sub/OPCUaSubscription.java
@@ -223,6 +223,8 @@ return Long.parseLong(value); } else if (type == Boolean.class || type == boolean.class) { return Boolean.parseBoolean(value); } else if (type == Byte.class || type == byte.class) { return Byte.parseByte(value); } else if (type == Date.class) { try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -240,22 +242,23 @@ WebSocketUsers.sendMessageToUserByText(map.get("IGBT"), "21"); // 发送HTTP请求 // HttpResponse response = HttpRequest.post(Constants.SY_MES_URL) // HttpResponse response = HttpRequest.post(Constants.WC_TEST_MES_URL) // .header("token", "XNY") // .body(JSONUtil.toJsonStr(stationObject)) // .timeout(5000) // 设置超时时间 // .execute(); // System.out.println("--------------------------"+response.body()); // log.info("发送数益MES结果{}", response.body()); // log.info("发送潍柴MES结果{}", response.body()); // // 解析响应 // if (response.isOk()) { // 请求成功 // JSONObject jsonResponse = JSONUtil.parseObj(response.body()); // String message = jsonResponse.getStr("message"); // Integer code = jsonResponse.getInt("code"); // // if ("ok".equals(message)) { // // 响应不是ok,保存失败记录 // saveMesFailRecord(stationObject, device, "响应正常:" + message, "1"); // if (code == 200) { // // 响应不是200,保存失败记录 // saveMesFailRecord(stationObject, device, "响应正常:" + code, "1"); // }else { // saveMesFailRecord(stationObject, device, "响应异常:" + message,Constants.ZERO); // saveMesFailRecord(stationObject, device, "响应异常:" + code,Constants.ZERO); // } // } else { // // HTTP请求失败,保存失败记录 @@ -306,15 +309,15 @@ // 清理已处理的历史数据 List<DaFailRecord> unHandledList = failRecordService.list(new LambdaQueryWrapper<DaFailRecord>().eq(DaFailRecord::getStatus, "0")); for (DaFailRecord daFailRecord : unHandledList) { HttpResponse response = HttpRequest.post(Constants.SY_MES_URL) HttpResponse response = HttpRequest.post(Constants.WC_TEST_MES_URL) .body(JSONUtil.toJsonStr(daFailRecord.getRequestData())) .timeout(5000) // 设置超时时间 .execute(); // 解析响应 if (response.isOk()) { // 请求成功 JSONObject jsonResponse = JSONUtil.parseObj(response.body()); String message = jsonResponse.getStr("message"); if ("ok".equals(message)) { Integer code = jsonResponse.getInt("code"); if (code == 200) { failRecordService.deleteDaFailRecordById(daFailRecord.getId()); }else { this.updateFailRecordRetryCount(daFailRecord); billion-ui/src/views/main/wc/IGBTStationWork.vue
@@ -196,7 +196,7 @@ data() { return { operationProgress: '等待扫描物料码...', url: "ws://192.168.10.105:8083/websocket/message/", url: "ws://192.168.0.240:8083/websocket/message/", message: "", text_content: "", ws: null, @@ -205,7 +205,7 @@ open1: false, keepReading: true, form1: { baudRate: "115200", baudRate: "9600", dataBits: "8", stopBits: "1", parity: "none",