| | |
| | | import com.zy.asrs.entity.BasLift; |
| | | import com.zy.asrs.service.BasLiftService; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.ForkLiftUtils; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.action.ForkLiftAction; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.ForkLiftProtocolStatusType; |
| | |
| | | import com.zy.core.enums.RedisKeyType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.ForkLiftSlave; |
| | | import com.zy.core.model.LiftSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.*; |
| | | import com.zy.core.model.protocol.ForkLiftProtocol; |
| | | import com.zy.core.model.protocol.LiftStaProtocol; |
| | | import com.zy.core.model.protocol.ForkLiftStaProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.thread.ForkLiftThread; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | continue; |
| | | } |
| | | JSONObject data = JSON.parseObject(JSON.toJSONString(forkLiftProtocol)); |
| | | List<ForkLiftStaProtocol> forkLiftStaProtocols = forkLiftThread.getForkLiftStaProtocols(); |
| | | data.put("forkLiftStaProtocols", forkLiftStaProtocols); |
| | | baseObj.putAll(data); |
| | | } |
| | | return R.ok().add(list); |
| | |
| | | continue; |
| | | } |
| | | |
| | | vo.setWorkNo(forkLiftProtocol.getTaskNo().intValue());//任务号 |
| | | vo.setWorkNo(forkLiftProtocol.getTaskNo());//任务号 |
| | | vo.setPakMk(forkLiftProtocol.getPakMk()?"Y" : "N"); // 作业标记 |
| | | vo.setForkLiftStaProtocols(forkLiftThread.getForkLiftStaProtocols()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |
| | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth(memo = "修改数据") |
| | | public R liftUpdate(@RequestParam Integer liftNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam String pakMk, |
| | | @RequestParam Integer token) { |
| | | @RequestParam Short workNo) { |
| | | ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, liftNo); |
| | | if (forkLiftThread == null) { |
| | | return R.error("plc已掉线"); |