| | |
| | | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; |
| | | import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 生产任务认领控制器 |
| | |
| | | @RestController |
| | | @RequestMapping(path = "workOrder") |
| | | public class WorkOrderCtrl { |
| | | private WorkOrderSv sv; |
| | | @Autowired |
| | | public void setWorkOrderSv(WorkOrderSv workOrderSv) { |
| | | this.sv = workOrderSv; |
| | | } |
| | | /** |
| | | * 查询工站是否已经被占用 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path="isStationUsed") |
| | | public BaseResponse<Boolean> isStationUsed(StaAssemblyWorkLast last){ |
| | | String message = sv.checkStationIsUsed(last); |
| | | if ("OK".equals(message.split("^")[0])) { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } else { |
| | | return BaseResponseUtils.buildFail(message); |
| | | } |
| | | } |
| | | /** |
| | | * 查询全部执行中的组装任务清单 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path="planList") |
| | | public BaseResponse<List<PrAssemblyPlan>> selectOnLineList(){ |
| | | PrAssemblyPlan params = new PrAssemblyPlan(); |
| | | params.setStatus(1); |
| | | List<PrAssemblyPlan> list = sv.selectList(params); |
| | | return BaseResponseUtils.buildSuccess(list); |
| | | } |
| | | |
| | | |
| | | @GetMapping(path = "test") |
| | | public BaseResponse test() { |