| | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pmsGlobal.pojoBa.BaUser; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductionLine; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProduct; |
| | | import com.dy.pmsGlobal.pojoPlt.PltStation; |
| | | import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; |
| | | import com.dy.pmsGlobal.pojoPr.PrProductionNode; |
| | | import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast; |
| | | import jakarta.validation.Valid; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping(path="checkStationUsed") |
| | | public BaseResponse<StaAssemblyWorkLast> checkStationUsed(QueryVo last){ |
| | | StaAssemblyWorkLast stationInfo = sv.checkStationUsed(last); |
| | | public BaseResponse<StaAssemblyWorkLast> checkStationUsed(String stationId){ |
| | | StaAssemblyWorkLast stationInfo = sv.checkStationUsed(stationId); |
| | | return BaseResponseUtils.buildSuccess(stationInfo); |
| | | } |
| | | /** |
| | |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | /** |
| | | * 添加单个辅助人员 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping(path="addAssistant") |
| | | public BaseResponse<Boolean> addAssistant(String workId ,String assistant){ |
| | | log.info("WorkOrderCtrl.addAssistant()"); |
| | | int count = sv.addAssistant(workId,assistant); |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | /** |
| | | * 删除单个辅助人员 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping(path="removeAssistant") |
| | | public BaseResponse<Boolean> removeAssistant(String workId ,String assistant){ |
| | | log.info("WorkOrderCtrl.removeAssistant()"); |
| | | int count = sv.removeAssistant(workId,assistant); |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | | } else { |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | /** |
| | | * 查询辅助人员信息表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path="getAssistantList") |
| | | public BaseResponse<List<BaUser>> getAssistantList(String workId){ |
| | | List<BaUser> result = sv.getAssistantList(workId); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | |
| | | /** |
| | | * 保存登录信息 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping(path="updateAssistant") |
| | | public BaseResponse<List<BaUser>> updateAssistant(@RequestBody QueryVo vo){ |
| | | List<BaUser> result = sv.updateAssistant(vo); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | /** |
| | | * 根据节点的查出节点作业指导书 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path="getSopByNodeId") |
| | | public BaseResponse<PrProductionNode> getSopByNodeId(String nodeId){ |
| | | PrProductionNode result = sv.getSopByNodeId(nodeId); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | /** |
| | | * 根据产品查出产品文件 主要技术参数 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path="getFileByProId") |
| | | public BaseResponse<PltProduct> getFileByProId(String proId){ |
| | | PltProduct result = sv.getFileByProId(proId); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | @GetMapping(path = "test") |
| | | public BaseResponse test() { |
| | | log.info("test"); |