| | |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.common.annotation.IntegrationAuth; |
| | | import com.zy.acs.manager.core.domain.TaskPosDto; |
| | | import com.zy.acs.manager.core.domain.type.NamespaceType; |
| | | import com.zy.acs.manager.core.integrate.dto.ConveyorQueryParam; |
| | | import com.zy.acs.manager.core.integrate.dto.ConveyorQueryResult; |
| | | import com.zy.acs.manager.manager.entity.Segment; |
| | | import com.zy.acs.manager.manager.entity.Sta; |
| | | import com.zy.acs.manager.manager.entity.Task; |
| | | import com.zy.acs.manager.manager.enums.SegmentStateType; |
| | | import com.zy.acs.manager.manager.enums.StatusType; |
| | | import com.zy.acs.manager.manager.service.SegmentService; |
| | | import com.zy.acs.manager.manager.service.StaService; |
| | | import com.zy.acs.manager.manager.service.TaskService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | |
| | | @Autowired |
| | | private StaService staService; |
| | | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Autowired |
| | | private SegmentService segmentService; |
| | | |
| | | @PostMapping("/station/convey") |
| | | @IntegrationAuth(name = NamespaceType.RCS_STA_QUERY) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/station/checkTakeComplete") |
| | | @IntegrationAuth(name = NamespaceType.RCS_STA_QUERY) |
| | | public R checkTakeComplete(@RequestBody ConveyorQueryParam param) { |
| | | String seqNum = param.getSeqNum(); |
| | | Task task = taskService.selectBySeqNum(null, seqNum); |
| | | if (null == task) { |
| | | return R.error("task not found"); |
| | | } |
| | | List<Segment> list = segmentService.list(new LambdaQueryWrapper<Segment>().eq(Segment::getTaskId, task.getId()).eq(Segment::getPosType, TaskPosDto.PosType.ORI_STA.toString())); |
| | | for (Segment segment : list){ |
| | | if (segment.getState().equals(SegmentStateType.FINISH.toString())){ |
| | | return R.ok().add(true); |
| | | } |
| | | } |
| | | return R.ok().add(false); |
| | | } |
| | | } |