| | |
| | | import com.zy.core.model.protocol.CrnProtocol; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | import com.zy.core.properties.SystemProperties; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | private MainServiceImpl mainService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | |
| | | @ManagerAuth(memo = "进行中的命令") |
| | |
| | | @PostMapping("/table/crn/msg") |
| | | @ManagerAuth(memo = "堆垛机数据表") |
| | | public R crnMsgTable(){ |
| | | Config crnSearchDetectTaskCountConfig = configService.selectOne(new EntityWrapper<Config>() |
| | | .eq("code", "crnSearchDetectTaskCount") |
| | | ); |
| | | int crnSearchDetectTaskCount = Integer.parseInt(crnSearchDetectTaskCountConfig.getValue()); |
| | | |
| | | Config applyInTaskTotalCountConfig = configService.selectOne(new EntityWrapper<Config>() |
| | | .eq("code", "applyInTaskTotalCount") |
| | | ); |
| | | int applyInTaskTotalCount = Integer.parseInt(applyInTaskTotalCountConfig.getValue()); |
| | | |
| | | List<CrnMsgTableVo> list = new ArrayList<>(); |
| | | List<BasCrnp> crnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().orderBy("crn_no")); |
| | | for (BasCrnp basCrnp : crnps) { |
| | |
| | | vo.setYdistance(crnProtocol.getYDistance()); // 升降距离(Km) |
| | | vo.setXduration(crnProtocol.getXDuration()); // 走行时长(H) |
| | | vo.setYduration(crnProtocol.getYDuration()); // 升降时长(H) |
| | | vo.setCrnSearchDetectTaskCount(crnSearchDetectTaskCount); |
| | | vo.setApplyInTaskTotalCount(applyInTaskTotalCount); |
| | | |
| | | List<WrkMast> inWrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .eq("crn_no", basCrnp.getCrnNo()) |
| | | .in("io_type", 1, 10, 53, 57) |
| | | ); |
| | | vo.setCurrentInTask(inWrkMasts.size()); |
| | | |
| | | List<WrkMast> wrkMastsList = wrkMastService.selectList(new EntityWrapper<WrkMast>() |
| | | .eq("crn_no", basCrnp.getCrnNo()) |
| | | .in("io_type", 1, 10, 53, 57, 101, 103, 107, 110) |
| | | ); |
| | | vo.setCurrentTotalTask(wrkMastsList.size()); |
| | | } |
| | | return R.ok().add(list); |
| | | } |