| | |
| | | package com.zy.client.controller; |
| | | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.client.constant.WcsSystemPropety; |
| | | import com.zy.client.domain.enums.SiteStatusType; |
| | | import com.zy.client.domain.param.SystemSwitchParam; |
| | | import com.zy.client.domain.vo.CrnLatestDataVo; |
| | | import com.zy.client.domain.vo.SiteLatestDataVo; |
| | | import com.zy.client.domain.enums.SiteStatusType; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @RequestMapping("/console") |
| | | public class ConsoleController { |
| | | |
| | | @PostMapping("/system/running/status") |
| | | @ManagerAuth(memo = "系统运行状态") |
| | | public R systemRunningStatus(){ |
| | | return R.ok().add(Cools.add("status", WcsSystemPropety.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | | @PostMapping("/system/switch") |
| | | @ManagerAuth(memo = "系统运行开关操作") |
| | | public R systemSwitch(SystemSwitchParam param) throws InterruptedException { |
| | | if (Cools.isEmpty(param.getOperatorType())){ |
| | | return R.error(); |
| | | } |
| | | if (param.getOperatorType() == 0) { |
| | | if (Cools.isEmpty(param.getPassword())){ |
| | | return R.error("请输入口令"); |
| | | } |
| | | if (!param.getPassword().equals(WcsSystemPropety.WCS_PASSWORD)){ |
| | | return R.error("口令错误"); |
| | | } |
| | | } |
| | | Thread.sleep(2000L); |
| | | WcsSystemPropety.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE); |
| | | return R.ok().add(Cools.add("status", WcsSystemPropety.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | | @PostMapping("/site/detail") |
| | | @ManagerAuth(memo = "输送设备数据详情") |
| | | public R siteDetail(){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/crn/detail") |
| | | @ManagerAuth(memo = "堆垛机设备数据详情") |
| | | public R crnDetail(){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/site/update") |
| | | @ManagerAuth(memo = "输送设备数据修改") |
| | | public R updateSite(){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/crn/update") |
| | | @ManagerAuth(memo = "堆垛机数据修改") |
| | | public R updateCrn(){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | /****************************************************************/ |
| | | /************************** 实时数据 ******************************/ |
| | | /****************************************************************/ |
| | | |
| | | @PostMapping("/latest/data/site") |
| | | @ManagerAuth(memo = "站点实时数据") |
| | | public R siteLatestData(){ |