| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.domain.dto.AxisBean; |
| | | import com.zy.asrs.domain.dto.LocChartPie; |
| | |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.common.utils.RedisUtil; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.ShuttleProtocolStatusType; |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.LedSlave; |
| | | import com.zy.core.model.ShuttleSlave; |
| | |
| | | break; |
| | | } |
| | | if (!Cools.isEmpty(wrkMastList1)) { |
| | | String msg = "站点在入库"; |
| | | String msg = "站点在入库;"; |
| | | Set<Integer> set = new HashSet<>(); |
| | | for (WrkMast wrkMast : wrkMastList1) { |
| | | set.add(wrkMast.getSourceStaNo()); |
| | | } |
| | | return R.ok().add(set.toString() + msg); |
| | | |
| | | return R.ok().add(set.toString() + msg + DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F)); |
| | | } |
| | | if (!Cools.isEmpty(wrkMastList2)) { |
| | | String msg = "站点在出库"; |
| | | String msg = "站点在出库;"; |
| | | Set<Integer> set = new HashSet<>(); |
| | | for (WrkMast wrkMast : wrkMastList2) { |
| | | set.add(wrkMast.getStaNo()); |
| | | } |
| | | return R.ok().add(set.toString() + msg); |
| | | return R.ok().add(set.toString() + msg + DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F)); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | continue; |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | if (Cools.isEmpty(shuttleProtocol.getErrorCode())) { |
| | | continue; |
| | | } |
| | | int i = Integer.parseInt(shuttleProtocol.getErrorCode()); |
| | | if (i > 0) { |
| | | BasShuttleErr basShuttleErr = basShuttleErrService.queryByCode(i); |
| | | if (!Cools.isEmpty(shuttleProtocol.getErrorCode()) && Integer.parseInt(shuttleProtocol.getErrorCode()) > 0 && !Cools.isEmpty(shuttleProtocol.getErrorCode())) { |
| | | BasShuttleErr basShuttleErr = basShuttleErrService.queryByCode(Integer.parseInt(shuttleProtocol.getErrorCode())); |
| | | String errName = basShuttleErr == null ? "未知异常" : basShuttleErr.getErrName(); |
| | | //故障中 |
| | | map.put("deviceNo", shuttleProtocol.getShuttleNo());//设备号-小车号 |
| | | map.put("errorMsg", errName);//异常信息 |
| | | map.put("device", "四向车");//异常信息 |
| | | list.add(map); |
| | | } else if (shuttleProtocol.getMode() != 1) { |
| | | map.put("deviceNo", shuttleProtocol.getShuttleNo());//设备号-小车号 |
| | | map.put("errorMsg", shuttleProtocol.getMode$());//异常信息 |
| | | map.put("device", "四向车");//异常信息 |
| | | list.add(map); |
| | | } else if (shuttleProtocol.getProtocolStatusType() != ShuttleProtocolStatusType.IDLE) { |
| | | map.put("deviceNo", shuttleProtocol.getShuttleNo());//设备号-小车号 |
| | | map.put("errorMsg", shuttleProtocol.getProtocolStatus$());//异常信息 |
| | | map.put("device", "四向车");//异常信息 |
| | | list.add(map); |
| | | } |
| | | } |
| | | return R.ok().add(list); |