cl
2024-08-14 8bab65ae3282c70858fb4d3c6148093c7bbcf431
修改采集参数
已修改4个文件
56 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/constant/Constants.java
@@ -15,7 +15,7 @@
    public static final List<String> OP040_OP160 = new ArrayList<>();//主线人工工位
    public static final List<String> OP0170_OP230 = new ArrayList<>();//环线人工工位
    public static final List<String> OP0170_OP220 = new ArrayList<>();//环线人工工位
    public static final List<String> ModuleList = new ArrayList<>();//模组工位,用于校验是否传入模组码
jcdm-main/src/main/java/com/jcdm/main/plcserver/CustomRunner.java
@@ -95,13 +95,12 @@
        Constants.OP040_OP160.add(Constants.OP165);
        //环线人工工位
        Constants.OP0170_OP230.add(Constants.OP170);
        Constants.OP0170_OP230.add(Constants.OP180);
        Constants.OP0170_OP230.add(Constants.OP190);
        Constants.OP0170_OP230.add(Constants.OP200);
        Constants.OP0170_OP230.add(Constants.OP210);
        Constants.OP0170_OP230.add(Constants.OP220);
//        Constants.OP0170_OP230.add(Constants.OP230);
        Constants.OP0170_OP220.add(Constants.OP170);
        Constants.OP0170_OP220.add(Constants.OP180);
        Constants.OP0170_OP220.add(Constants.OP190);
        Constants.OP0170_OP220.add(Constants.OP200);
        Constants.OP0170_OP220.add(Constants.OP210);
        Constants.OP0170_OP220.add(Constants.OP220);
        OPCUaSubscription opcUaSubscription = new OPCUaSubscription(
                miloService,
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -141,7 +141,7 @@
                            }else {
                                WebSocketUsers.sendMessageToUserByText(map.get(device), "END");
                            }
                        }  else if (Constants.OP0170_OP230.contains(device)) {
                        }  else if (Constants.OP0170_OP220.contains(device)) {
                            WebSocketUsers.sendMessageToUserByText(map.get(device), "END");
                        } else{//自动工位
                            //先判断是否有产品SN
@@ -181,6 +181,12 @@
                                                    });
                                                }
                                            }
                                        }
                                        if(Constants.OP230.equals(device)){
                                            CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> {
                                                updateOrderStatus(snCode, "5","");//OP230工位更新工单状态为已完成
                                                reportFactoryMes(snCode, device, format.format(new Date()));//工厂MES报工
                                            });
                                        }
                                        if(result == 21){
                                            result = savePassingStation(thoroughfare, device, snCode, orderNumber, stationStatus);//保存过站
@@ -424,6 +430,7 @@
     * 更新工单
     * @param snCode 产品sn
     * @param orderStatus 工单状态
     * @param materialCode 壳体条码
     * @throws Exception e
     */
    private static void updateOrderStatus(String snCode,String orderStatus,String materialCode){
@@ -431,7 +438,12 @@
            //更新工单状态为已执行
            LambdaUpdateWrapper<OmProductionOrdeInfo> updateWrapper = new LambdaUpdateWrapper<>();
            updateWrapper.set(OmProductionOrdeInfo::getOrderStatus,orderStatus);
            updateWrapper.set(OmProductionOrdeInfo::getMaterialCode,materialCode);
            if(!materialCode.isEmpty()){
                updateWrapper.set(OmProductionOrdeInfo::getTrolleyYard,materialCode);//壳体条码
                updateWrapper.set(OmProductionOrdeInfo::getActualStartTime,new Date());//开始时间
            }else{
                updateWrapper.set(OmProductionOrdeInfo::getActualEndTime,new Date());//结束时间
            }
            updateWrapper.eq(OmProductionOrdeInfo::getProductNum,snCode);
            omProductionOrdeInfoService.update(new OmProductionOrdeInfo(),updateWrapper);
        } catch (Exception e) {
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -216,30 +216,39 @@
<!--            </router-link>-->
<!--          </template>-->
<!--        </el-table-column>-->
        <el-table-column label="生产工单号" width="160" align="center" prop="workOrderNo">
        </el-table-column>
<!--        <el-table-column label="订单编号" width="140" align="center" prop="salesOrderCode">-->
<!--        </el-table-column>-->
        <el-table-column :show-overflow-tooltip='true' label="pack码" width="220" align="center" prop="productNum">
        <el-table-column :show-overflow-tooltip='true' label="产品序列号" width="220" align="center" prop="productNum">
        </el-table-column>
        <el-table-column :show-overflow-tooltip='true' label="小车码" width="160" align="center" prop="trolleyYard">
        <el-table-column label="生产工单号" width="160" align="center" prop="workOrderNo">
        </el-table-column>
        <el-table-column label="产品型号" width="110" align="center" prop="productCode">
        <el-table-column :show-overflow-tooltip='true' label="壳体条码" width="180" align="center" prop="trolleyYard">
        </el-table-column>
        <el-table-column label="产品编码" width="110" align="center" prop="productCode">
        </el-table-column>
        <el-table-column label="物料编码" width="110" align="center" prop="materialCode">
        </el-table-column>
        <el-table-column  label="工单状态" align="center" prop="orderStatus">
        </el-table-column>
        <el-table-column label="产品名称" width="120" align="center" prop="productName">
        </el-table-column>
        <el-table-column label="实际开始时间" width="160" align="center" prop="actualStartTime">
        </el-table-column>
        <el-table-column label="实际开始时间" width="160" align="center" prop="actualEndTime">
        </el-table-column>
        <el-table-column label="上线是否报工" align="center" width="120">
          <template slot-scope="scope">
           <dict-tag :options="dict.type.work_reporting_status" :value="scope.row.onlineCompletionMark"/>
            <dict-tag :options="dict.type.work_reporting_status" :value="scope.row.onlineCompletionMark"/>
          </template>
        </el-table-column>
        <el-table-column label="实际开始时间" width="160" align="center" prop="actualStartTime">
        </el-table-column>
        <el-table-column label="下线是否报工" width="120" align="center">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.work_reporting_status" :value="scope.row.sfResult"/>
          </template>
        </el-table-column>
        <el-table-column label="创建时间" width="160" align="center" prop="createTime">
        </el-table-column>
<!--        <el-table-column width="240" fixed="right" label="操作" align="center" class-name="small-padding fixed-width">-->
<!--          <template slot-scope="scope">-->
<!--            <el-button-->