| | |
| | | import com.zy.asrs.domain.vo.*; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.LocMastMapper; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.common.CodeRes; |
| | |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.properties.SystemProperties; |
| | | import com.zy.core.thread.*; |
| | | import com.zy.system.entity.license.LicenseVerify; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private LocMastMapper locMastMapper; |
| | | |
| | | @PostMapping("/system/running/status") |
| | | @ManagerAuth(memo = "系统运行状态") |
| | | // @ManagerAuth(memo = "系统运行状态") |
| | | public R systemRunningStatus(){ |
| | | return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | | @PostMapping("/system/switch") |
| | | @ManagerAuth(memo = "系统运行开关操作") |
| | | // @ManagerAuth(memo = "系统运行开关操作") |
| | | public R systemSwitch(SystemSwitchParam param) throws InterruptedException { |
| | | if (Cools.isEmpty(param.getOperatorType())){ |
| | | return R.error(); |
| | |
| | | } |
| | | } |
| | | Thread.sleep(200L); |
| | | SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE); |
| | | //验证许可证是否有效 |
| | | try{ |
| | | if (new LicenseVerify().verify()){ |
| | | SystemProperties.WCS_RUNNING_STATUS.set(param.getOperatorType()==1?Boolean.TRUE:Boolean.FALSE); |
| | | return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("许可证验证失败!!异常:{}",e.getMessage()); |
| | | } |
| | | SystemProperties.WCS_RUNNING_STATUS.set(Boolean.FALSE); |
| | | return R.ok().add(Cools.add("status", SystemProperties.WCS_RUNNING_STATUS.get())); |
| | | } |
| | | |
| | |
| | | vo.setIoType(wrkMast.getIoType$()); // 入出库类型 |
| | | vo.setSourceStaNo(wrkMast.getSourceStaNo$()); |
| | | vo.setStaNo(wrkMast.getStaNo$()); |
| | | vo.setSourceLocNo(wrkMast.getSourceLocNo$()); |
| | | vo.setLocNo(wrkMast.getLocNo$()); |
| | | } |
| | | } |
| | | |