| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.RgvStatusType; |
| | | import com.zy.asrs.domain.param.*; |
| | | import com.zy.asrs.domain.vo.*; |
| | | import com.zy.asrs.domain.vo.RgvMsgTableVo; |
| | | import com.zy.asrs.domain.vo.RgvStateTableVo; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.mapper.BasRgvErrMapper; |
| | | import com.zy.asrs.service.BasCircularShuttleService; |
| | | import com.zy.asrs.service.BasDevpPositionService; |
| | | import com.zy.asrs.service.BasRgvService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.MainServiceImpl; |
| | | import com.zy.asrs.utils.NumUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.OutputQueue; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.rmi.CORBA.Util; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * RGV接口 |
| | |
| | | private BasRgvErrMapper basRgvErrMapper; |
| | | @Autowired |
| | | private BasRgvService basRgvService; |
| | | @Autowired |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private MainServiceImpl mainService; |
| | | @Autowired |
| | |
| | | List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<>()); |
| | | for (BasDevpPosition basDevpPosition : basDevpPositions){ |
| | | RingThroughParam ringThroughParam = new RingThroughParam(); |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()-100); |
| | | |
| | | ringThroughParam.setModeColor("#FFFFFF"); |
| | | ringThroughParam.setStatusColor("#FFFFFF"); |
| | | try{ |
| | | BasDevp basDevp = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no",basDevpPosition.getDevNo())); |
| | | if (basDevp.getAutoing().equals("Y")){ |
| | | if (basDevp.getLoading().equals("Y")){ |
| | | ringThroughParam.setModeColor("#ab1839"); |
| | | ringThroughParam.setStatusColor("#ab1839"); |
| | | } |
| | | if (basDevp.getLoading().equals("N")){ |
| | | ringThroughParam.setModeColor("#27AE60"); |
| | | ringThroughParam.setStatusColor("#27AE60"); |
| | | } |
| | | } else { |
| | | ringThroughParam.setModeColor("#C0392B"); |
| | | ringThroughParam.setStatusColor("#C0392B"); |
| | | } |
| | | |
| | | } catch (Exception e){ |
| | | System.out.println(e.getMessage()); |
| | | ringThroughParam.setModeColor("#000000"); |
| | | ringThroughParam.setStatusColor("#000000"); |
| | | |
| | | } |
| | | ringThroughParam.setIndex(basDevpPosition.getDevNo()); |
| | | // double[] doubles = Utils.RingThroughXYSta(perimeter, perimeter-basDevpPosition.getPlcPosition()); |
| | | // ringThroughParam.setValueX(doubles[0]>50? doubles[0]+6:doubles[0]-1); |
| | | // ringThroughParam.setValueY(doubles[1]>50? doubles[1]+6:doubles[1]-1); |
| | |
| | | // @ManagerAuth(memo = "作业信息") |
| | | public R ringThroughTaskWrkMast(){ |
| | | List<RgvWrkMastParam> result = new ArrayList<>(); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<>()); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts",9,10).orderBy("wrk_sts",false) |
| | | .orderBy("rgv_no",true)); |
| | | for (WrkMast wrkMast : wrkMasts){ |
| | | RgvWrkMastParam rgvWrkMastParam = new RgvWrkMastParam(wrkMast); |
| | | if (Cools.isEmpty(rgvWrkMastParam.getRgvNo())){ |
| | |
| | | RgvProtocol rgvProtocol = rgvThread.getRgvProtocol(); |
| | | if (rgvProtocol != null) { |
| | | rgvCircularShuttleParam.setPosition(rgvProtocol.getRgvPos()); |
| | | rgvCircularShuttleParam.setTaskNo(rgvProtocol.taskNo1); |
| | | if (rgvCircularShuttleParam.getStatus()==0){ |
| | | rgvCircularShuttleParam.setStatus$(rgvProtocol.statusType.desc); |
| | | } |