| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.enums.InterfaceType; |
| | | import com.yuanchu.limslaboratory.enums.MenuEnums; |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddMaterialDto; |
| | | import com.yuanchu.limslaboratory.service.MaterialService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | |
| | | @Autowired |
| | | private MaterialService materialService; |
| | | |
| | | @ApiOperation("添加物料") |
| | | @ApiOperation(value = "添加指标-->选择样品名称") |
| | | @GetMapping("/selectmater") |
| | | @AuthHandler |
| | | public Result selectmater() { |
| | | return Result.success(materialService.selectmater()); |
| | | } |
| | | |
| | | @ApiOperation("添加指标") |
| | | @PostMapping("/add") |
| | | @AuthHandler |
| | | public Result<?> addMaterialInformation(@Validated @RequestBody AddMaterialDto addMaterialDto) { |
| | | Integer isMaterialSuccess = materialService.addMaterialInformation(addMaterialDto); |
| | | if (isMaterialSuccess == 1) { |
| | |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "物料ID", name = "materialId", dataTypeClass = Integer.class) |
| | | }) |
| | | @AuthHandler |
| | | public Result<?> deleteMaterialInformation(Integer materialId) { |
| | | Integer isDeleteMaterialSuccess = materialService.deleteMaterialInformation(materialId); |
| | | if (isDeleteMaterialSuccess == 1) { |
| | |
| | | return Result.fail("删除失败!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "标准库-->物料-->侧边栏四级展开", tags = "⭐⭐⭐后端调整") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "型号/型号名称", name = "specificationName", dataTypeClass = String.class) |
| | | }) |
| | | @ApiOperation(value = "标准库-->物料-->侧边栏四级展开") |
| | | @GetMapping("/list") |
| | | public Result<?> getFourLevelInformation(String specificationName) { |
| | | List<Map<String, Object>> fourLevelInformation = materialService.getFourLevelInformation(specificationName); |
| | | @AuthHandler |
| | | public Result<?> getFourLevelInformation() { |
| | | List<Map<String, Object>> fourLevelInformation = materialService.getFourLevelInformation(); |
| | | return Result.success(fourLevelInformation); |
| | | } |
| | | |
| | | @ApiOperation(value = "标准库-->下拉基础数据样品") |
| | | @GetMapping("/getSample") |
| | | @AuthHandler(type = InterfaceType.SELECT,menuId = MenuEnums.index,isAdd = true) |
| | | public Result<?> getSample() { |
| | | return Result.success(materialService.getSample()); |
| | | } |
| | | } |