| | |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiOperation(value = "查询设备详情") |
| | | @GetMapping("/getDeviceById") |
| | | public Result getDeviceById(Integer deviceId){ |
| | | public Result getDeviceById(Integer deviceId) { |
| | | return Result.success(deviceService.getById(deviceId)); |
| | | } |
| | | |
| | |
| | | //设备工具明细 |
| | | @ApiOperation(value = "查询设备详情列表") |
| | | @GetMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull){ |
| | | public Result selectDeviceParameter(Page page, DeviceDto itemParameter, Boolean laboratoryNameIsNull) { |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter, laboratoryNameIsNull)); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "通过项目获取设备列表") |
| | | @GetMapping("/selectDeviceByCategory") |
| | | public Result selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass,String laboratory) { |
| | | return Result.success(deviceService.selectDeviceByCategory(inspectionItem, inspectionItemSubclass,laboratory)); |
| | | public Result selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass, String laboratory) { |
| | | return Result.success(deviceService.selectDeviceByCategory(inspectionItem, inspectionItemSubclass, laboratory)); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过设备编号获取设备列表") |
| | |
| | | |
| | | @ApiOperation("/数采-数据采集") |
| | | @PostMapping("/dataCollection") |
| | | public Result<?> dataAcquisition(HttpServletRequest request,@RequestBody DeviceCollectionDto dto) { |
| | | public Result<?> dataAcquisition(HttpServletRequest request, @RequestBody DeviceCollectionDto dto) { |
| | | return deviceService.dataAcquisition(request, dto); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "删除数采配置") |
| | | @DeleteMapping("/ ") |
| | | @DeleteMapping("/deleteDataAcquisitionConfiguration") |
| | | public Result<?> deleteDataAcquisitionConfiguration(@RequestParam("ids") String ids) { |
| | | List<String> split = Arrays.asList(ids.split(",")); |
| | | List<String> collect = split.stream().distinct().collect(Collectors.toList()); |
| | |
| | | |
| | | @ApiOperation(value = "设备档案导出") |
| | | @GetMapping("/exportDeviceFile") |
| | | public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response){ |
| | | deviceService.exportDeviceFile(deviceId,response); |
| | | public void exportDeviceFile(@RequestParam Integer deviceId, HttpServletResponse response) { |
| | | deviceService.exportDeviceFile(deviceId, response); |
| | | } |
| | | |
| | | @ApiOperation(value = "仪器设备一览表导出") |
| | | @GetMapping("/exportEquipmentDetails") |
| | | public void exportEquipmentDetails(HttpServletResponse response){ |
| | | public void exportEquipmentDetails(HttpServletResponse response) { |
| | | deviceService.exportEquipmentDetails(response); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载设备导入模板") |
| | | @GetMapping("/importTemplate") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | deviceService.downloadImportTemplate(response); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入设备") |
| | | @PostMapping("/importDevice") |
| | | public Result importDevice(MultipartFile file) { |
| | | return Result.success(deviceService.importDevice(file)); |
| | | } |
| | | } |