1
zhang
1 天以前 5d8216a8d79aeb7b22a86478580018a3d9628406
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -98,8 +98,7 @@
    private StaReserveService staReserveService;
    @Autowired
    private ConveyorStationService conveyorStationService;
    @Autowired
    private FuncTaskService funcTaskService;
    @SuppressWarnings("all")
    @Transactional
@@ -1989,14 +1988,12 @@
            if (taskComplete) {
                // 在充电任务行走到终点,同时判断充电桩的类型
                if (segment.getPosType().equals(TaskPosDto.PosType.TO_CHARGE)){
                    // 保存一条数据
                    FuncTask funcTask = new FuncTask();
                    FuncSta destFuncSta = funcStaService.getByCodeAndType(task.getDestCode(), FuncStaType.CHARGE.toString());
                    funcTask.setFuncStaId(destFuncSta.getId());
                    funcTask.setAgvId(segment.getAgvId());
                    funcTask.setTaskId(segment.getTaskId());
                    funcTask.setFuncTaskSts(TaskStsType.INIT.val());
                    funcTaskService.save(funcTask);
                    if (destFuncSta != null) {
                        if (Cools.isEmpty(destFuncSta.getProtocol()) && destFuncSta.getProtocol().equalsIgnoreCase(ProtocolType.MODBUS.toString())) {
                            redis.setMap(RedisConstant.AGV_CHARGE_FLAG,segment.getAgvId$(),1);
                        }
                    }
                }
                task.setTaskSts(TaskStsType.COMPLETE.val());
                task.setEndTime(now);