| | |
| | | import com.zy.asrs.entity.BasLift; |
| | | import com.zy.asrs.service.BasLiftService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | |
| | | @Autowired |
| | | private BasLiftService basLiftService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | private CommonService commonService; |
| | | |
| | | @PostMapping("/table/lift/state") |
| | | @ManagerAuth(memo = "提升机信息表") |
| | |
| | | |
| | | LiftAssignCommand assignCommand = new LiftAssignCommand(); |
| | | assignCommand.setLiftNo(liftSlave.getId().shortValue()); // 提升机编号 |
| | | assignCommand.setTaskNo((short) 9999); |
| | | assignCommand.setTaskNo((short) commonService.getWorkNo(3));//获取任务号 |
| | | assignCommand.setTaskMode(param.getLiftTaskMode().shortValue()); |
| | | assignCommand.setAuto(false);//手动模式 |
| | | assignCommand.setLev(param.getLev());//移动楼层 |
| | |
| | | return R.error(); |
| | | } |
| | | |
| | | @PostMapping("/detl/update") |
| | | @ManagerAuth(memo = "修改数据") |
| | | public R liftUpdate(@RequestParam Integer liftNo, |
| | | @RequestParam Short workNo, |
| | | @RequestParam String pakMk){ |
| | | for (LiftSlave liftSlave : slaveProperties.getLift()) { |
| | | LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, liftSlave.getId()); |
| | | if (liftThread == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | LiftProtocol liftProtocol = liftThread.getLiftProtocol(); |
| | | if (liftProtocol == null) { |
| | | return R.error("plc已掉线"); |
| | | } |
| | | if (workNo != null) { |
| | | liftProtocol.setTaskNo(workNo); |
| | | } |
| | | if (pakMk != null) { |
| | | liftProtocol.setPakMk(pakMk.equals("Y")); |
| | | } |
| | | } |
| | | return R.error("plc已掉线"); |
| | | } |
| | | |
| | | } |