| | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | import com.yuanchu.limslaboratory.mapper.LinkDetectionMapper; |
| | | import com.yuanchu.limslaboratory.pojo.LinkBasicInformation; |
| | | import com.yuanchu.limslaboratory.pojo.LinkDetection; |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectionVo; |
| | | import com.yuanchu.limslaboratory.service.InspectionService; |
| | | import com.yuanchu.limslaboratory.service.LinkBasicInformationService; |
| | |
| | | |
| | | @Resource |
| | | private InspectionService inspectionService; |
| | | |
| | | @Resource |
| | | private LinkDetectionMapper linkDetectionMapper; |
| | | |
| | | @ApiOperation("链接-->获取链接") |
| | | @GetMapping("/link") |
| | |
| | | @ApiOperation("选择版本") |
| | | @GetMapping("/chooseVer") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "name", value = "产品名称", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "mcode", value = "产品编号", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "specifications", value = "规格型号", dataTypeClass = String.class, required = true) |
| | | @ApiImplicitParam(name = "id", value = "id", dataTypeClass = String.class, required = true), |
| | | }) |
| | | @AuthHandler(type = InterfaceType.SELECT,menuId = MenuEnums.commissionInspection,isAdd = true) |
| | | public Result<?> chooseVer(String name, String mcode, String specifications) { |
| | | return Result.success(inspectionService.chooseVer(name, mcode, specifications)); |
| | | public Result<?> chooseVer(String name, String id, String specifications) { |
| | | LinkDetection linkDetection = linkDetectionMapper.selectById(id); |
| | | return Result.success(linkBasicInformationService.chooseVer(linkDetection)); |
| | | } |
| | | |
| | | |
| | |
| | | public Result addInspect(@RequestHeader("X-Token") String token, @Validated @RequestBody InspectionVo inspectionVo) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |
| | | LinkDetection linkDetection = linkDetectionMapper.selectById(inspectionVo.getId()); |
| | | return Result.success(inspectionService.addInspect((Integer) unmarshal.get("id"), inspectionVo)); |
| | | } |
| | | |