| | |
| | | import com.yuanchu.mom.service.DeviceService; |
| | | import com.yuanchu.mom.service.RawInsProductService; |
| | | import com.yuanchu.mom.service.UserService; |
| | | import com.yuanchu.mom.utils.MyUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | return Result.success(maps); |
| | | } |
| | | |
| | | @ApiOperation(value = "二级树", tags = "QMS管理-->实验室管理") |
| | | @ApiOperation(value = "二级树:默认生产设备", tags = "QMS管理-->实验室管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "type", value = "类型", dataTypeClass = String.class) |
| | | @ApiImplicitParam(name = "type", value = "类型", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "search_class", value = "搜索框内容", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/two_tree") |
| | | public Result<?> deviceTwoTree(@RequestParam(defaultValue = "1") Integer type){ |
| | | List<Map<String, Object>> mapList= deviceService.deviceTwoTree(type); |
| | | public Result<?> deviceTwoTree(@RequestParam(defaultValue = "1") Integer type, String search_class){ |
| | | List<Map<String, Object>> mapList= deviceService.deviceTwoTree(type, search_class); |
| | | return Result.success(mapList); |
| | | } |
| | | |
| | |
| | | IPage<Map<String, Object>> mapList = rawInsProductService.selectPageDevice(pageNo, pageSize, codeOrNameOrModel); |
| | | return Result.success(mapList); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增仪器设备:根据检验项目ID查询数据", tags = "QMS管理-->实验室管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "inspectId", value = "检验项目Id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/inspectId") |
| | | public Result<?> inspectIdSelect(Integer inspectId){ |
| | | Map<String, Object> map = rawInsProductService.inspectIdSelect(inspectId); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增仪器设备:查询父级分类", tags = "QMS管理-->实验室管理") |
| | | @GetMapping("/parent_classification") |
| | | public Result<?> parentClassification(){ |
| | | List<Map<String, Object>> map = rawInsProductService.parentClassification(); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "实验室模块表格数据", tags = "QMS管理-->实验室管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "type", value = "类型:默认生产设备", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "codeNameModel", value = "编号名称规格型号", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "deviceStatue", value = "设备状态", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "deviceId", value = "设备Id", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "fatherName", value = "父级分类", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/table_list") |
| | | public Result<?> tableData(String codeNameModel, @RequestParam(defaultValue = "1") Integer type, Integer deviceStatue, Integer deviceId, String fatherName){ |
| | | List<Map<String, Object>> map = deviceService.DevicePageList(codeNameModel, type, deviceStatue, deviceId, fatherName); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除实验室模块数据", tags = "QMS管理-->实验室管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "deviceId", value = "根据设备Id删除", dataTypeClass = Integer.class) |
| | | }) |
| | | @DeleteMapping("/delete") |
| | | public Result<?> deviceDelete(Integer deviceId){ |
| | | Integer map = deviceService.deviceDelete(deviceId); |
| | | if (map == 1){ |
| | | return Result.success("删除成功!"); |
| | | } |
| | | return Result.fail("删除失败!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除树模块数据", tags = "QMS管理-->实验室管理") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "根据设备Id删除", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "deviceFather", value = "根据设备分类删除", dataTypeClass = String.class) |
| | | }) |
| | | @DeleteMapping("/deleteIdorFather") |
| | | public Result<?> deviceDeleteIdOrFather(Integer id, String deviceFather){ |
| | | Integer map = deviceService.deviceDeleteIdOrFather(id, deviceFather); |
| | | if (map == 1){ |
| | | return Result.success("删除成功!"); |
| | | } |
| | | return Result.fail("删除失败!"); |
| | | } |
| | | } |