cl
2024-07-12 997e697edaf59893248bc2467223058b221a4de2
修改参数采集
已修改3个文件
40 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/da/paramCollection/service/impl/DaParamCollectionServiceImpl.java
@@ -313,7 +313,8 @@
                    try{
                        CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                            logger.info("OP100报工开始-工厂MES异步方法");
                            String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), daParamCollection.getLocationCode(), format.format(new Date()));
                            String stationCode = "M1OP100";
                            String reportResult = RestfulService.getWorkReportResultFeedback(daParamCollection.getProductBarcode(), stationCode, format.format(new Date()));
                            JSONObject jsonObject = new JSONObject(reportResult);
                            String code = jsonObject.getStr("code");
                            if("success".equals(code)){
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -123,7 +123,7 @@
                        if (ObjectUtil.isNotNull(value1)){
                            String cellCode = value1.toString();
                            //反馈电芯ocv检测结果
                            boolean b = OCVResultFeedBack(thoroughfare, device,cellCode);
                            boolean b = OCVResultFeedBack(thoroughfare, device,cellCode);//对替换电芯校验
                            //四个电芯的状态
                            if (b){
                                scanResult = 11;
@@ -146,7 +146,7 @@
                    //1:告知MES托盘已到站,请求下发进站状态
                    if (Constants.OP030.equals(device)){
                        //反馈电芯ocv检测结果
                        boolean b = OCVResultFeedBack(thoroughfare, device);
                        boolean b = OCVResultFeedBack(thoroughfare, device);//进站对4个电芯校验
                        //四个电芯的状态
                        if (b){
                            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build());
@@ -504,13 +504,19 @@
                CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                    //插入参数采集表
                    daParamCollectionService.insertBatch(collectionList);
                    //如果220工位,进行报工
                    if("M1OP220".equals(device)) {
                        RestfulService.getWorkReportResultFeedback(moduleCode, "M1OP220", format.format(new Date()));
                    }
                    //上传到工厂mes
                    ParentVO parentVO = new ParentVO();
                    parentVO.setStationCode(device);//工位
                    parentVO.setSiteCode("3983");
                    parentVO.setRecordId(UUID.randomUUID().toString());
                    if("2".equals(stationStatus)){
                    if("2".equals(stationStatus)){//工站状态
                        parentVO.setTotalResult("0");
                    }else {
                        parentVO.setTotalResult("1");
@@ -898,5 +904,29 @@
        return flag;
    }
    /**
     * AMES报工结果回传
     * @param productNum
     * @param stationCode
     * @param confirmTime
     * @return
     */
    //{"code":"success","data":{"productNum":"LCV123456P0600036","stationCode":"1HZ01","resultCode":"S","resultText":"报工成功"},"message":"API调用成功"}
    public static String getWorkReportResultFeedback(String productNum,String stationCode,String confirmTime)
    {
        String result = "";
        try {
            String url = Constants.FACTORY_EMS_UAT_GET_RUL + "workReportResultFeedback?siteCode="+Constants.FACTORY_EMS_SITE_CODE+"&stationCode="+stationCode+"&productNum="+productNum+"&confirmTime="+confirmTime;
            HttpResponse response = HttpRequest.get(url).execute();
            HttpRequest httpRequest = HttpRequest.get(url);
            result =  response.body();
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            return result;
        }
    }
}
jcdm-main/src/main/java/com/jcdm/main/restful/factoryMes/service/RestfulService.java
@@ -45,7 +45,6 @@
            return result;
        }
    }
    /**