| | |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.NotifyUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.Task; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | private CommonService commonService; |
| | | @Autowired |
| | | private NotifyUtils notifyUtils; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | |
| | | private static final boolean auth = true; |
| | | |
| | |
| | | @GetMapping("/deviceStatus") |
| | | @Transactional |
| | | public R deviceStatus() { |
| | | List<CrnStatusParam> crnStatusParams=new ArrayList<>(); |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<>()); |
| | | for (BasCrnp basCrnp:basCrnps){ |
| | | CrnStatusParam crnStatusParam=new CrnStatusParam(); |
| | | crnStatusParam.setCrnNo(basCrnp.getCrnNo()); |
| | | crnStatusParam.setCrnSts(basCrnp.getCrnSts()); |
| | | crnStatusParam.setErrorCode(basCrnp.getCrnErr()); |
| | | BasCrnError error=basCrnErrorService.selectOne(new EntityWrapper<BasCrnError>().eq("error_code",basCrnp.getCrnErr())); |
| | | if(Cools.isEmpty(error)){ |
| | | crnStatusParam.setErrorMsg(""); |
| | | }else { |
| | | crnStatusParam.setErrorMsg(error.getErrName()); |
| | | } |
| | | crnStatusParams.add(crnStatusParam); |
| | | } |
| | | return R.ok(crnStatusParams); |
| | | List<CrnStatusParam> crnStatusParams = openService.getCrnStatus(); |
| | | List<StationStatusParam> stationStatus = openService.getStationStatus(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("crn", crnStatusParams); |
| | | map.put("station", stationStatus); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | //输送站点状态查询接口 |
| | | @GetMapping("/stationStatus") |
| | | @Transactional |
| | | public R stationStatus() { |
| | | List<StationStatusParam> data = openService.getStationStatus(); |
| | | return R.ok().add(data); |
| | | } |
| | | |
| | | //模拟输送线入库 |