zhoushihao
2025-04-10 0961a4ebfeacaed4787c59e017691775a339616f
1、中空任务界面改造,新增第三条线任务判
1个文件已修改
47 ■■■■ 已修改文件
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -315,44 +315,41 @@
        }
        //获取空闲且领取任务的数据信息,没有任务直接走玻璃调度
        HashMap<Integer, ReadWriteEntity> map = new HashMap<>();
        ReadWriteEntity oneEntity = miloService.readFromOpcUa("CMJ1.CMJ1.isFree");
        ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
        ReadWriteEntity threeEntity = miloService.readFromOpcUa("ZKQ3.ZKQ3.isFree");
        map.put(930, oneEntity);
        map.put(931, twoEntity);
        map.put(932, threeEntity);
        HollowGlassOutRelationInfo hollowGlassOutRelationInfo = null;
        int cell = -1;
        //李赛克线需要获取韩江plc的线路空闲状态:10000000第8位为 1表示忙碌 0表示空闲
        if (null != oneEntity.getValue() && "1".equals(oneEntity.getValue() + "")) {
            cell = 930;
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
        ReadWriteEntity twoEntity = miloService.readFromOpcUa("ZKQ2.ZKQ2.isFree");
        if (null == hollowGlassOutRelationInfo && null != twoEntity.getValue() && Boolean.parseBoolean(twoEntity.getValue() + "")) {
            cell = 931;
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
        for (int i = 930; i < 931; i++) {
        if (null == hollowGlassOutRelationInfo) {
            cell = 930;
                ReadWriteEntity entity = map.get(i);
                cell = i;
                if (null != entity.getValue() && ("1".equals(entity.getValue() + "") || Boolean.parseBoolean(twoEntity.getValue() + ""))) {
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
            } else {
                break;
            }
        }
        for (int i = 930; i <= 932; i++) {
        if (null == hollowGlassOutRelationInfo) {
            cell = 931;
                cell = i;
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
            } else {
                break;
            }
        }
        if (null != hollowGlassOutRelationInfo) {
@@ -767,7 +764,8 @@
    }
    private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list, int targetSlot, int isPair, int totalLayer, int isForce) throws Exception {
    private <T extends HollowBigStorageCageBaseInfo> Boolean hollowOutGlassByIsPair(List<T> list,
                                                                                    int targetSlot, int isPair, int totalLayer, int isForce) throws Exception {
        List<T> resultList = new ArrayList<>();
        List<T> tempList = new ArrayList<>();
        int taskType = Const.BIG_STORAGE_AFTER_OUT;
@@ -820,7 +818,8 @@
     * @param totalLayer
     * @return
     */
    private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName, int targetSlot, int state, int taskType, int totalLayer, int isForce) {
    private <T extends HollowBigStorageCageBaseInfo> Boolean computeOutGlassInfo(List<T> list, String tableName,
                                                                                 int targetSlot, int state, int taskType, int totalLayer, int isForce) {
        //任务数据:获取车子存放玻璃最大数量,玻璃间隔
        List<T> templist = new ArrayList<>();
        //打车剩余尺寸