| | |
| | | package com.zy.core; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasLift; |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.service.BasLiftService; |
| | | import com.zy.asrs.service.DeviceConfigService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.action.ShuttleAction; |
| | | import com.zy.core.cache.MessageQueue; |
| | |
| | | private DeviceMsgUtils deviceMsgUtils; |
| | | @Autowired |
| | | private BasLiftService basLiftService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | |
| | | @PostConstruct |
| | | @Async |
| | |
| | | new Thread(thread).start(); |
| | | SlaveConnection.put(SlaveType.Lift, deviceConfig.getDeviceNo(), thread); |
| | | |
| | | deviceConfig.setOtherData(basLift.getPoint$()); |
| | | String locNo = Utils.getLocNo(basLift.getPoint$().getRow(), basLift.getPoint$().getBay(), 1); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", locNo)); |
| | | JSONObject point = JSON.parseObject(locMast.getQrCodeValue()); |
| | | deviceConfig.setOtherData(point.getInteger("x") + "-" + point.getInteger("y")); |
| | | if (deviceConfig.getFake() == 1) { |
| | | fakeDevices.add(deviceConfig); |
| | | }else { |