| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.pojo.EquipmentPoint; |
| | | import com.yuanchu.limslaboratory.pojo.dto.UpdateEquipmentPointDto; |
| | | import com.yuanchu.limslaboratory.service.EquipmentPointService; |
| | |
| | | |
| | | @ApiOperation("添加设备码点") |
| | | @PostMapping("/add") |
| | | @AuthHandler |
| | | public Result<?> addEquipmentPointInformation(@RequestHeader("X-Token") String token, @RequestBody EquipmentPoint equipmentPoint) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |
| | |
| | | @ApiImplicitParam(name = "InstrumentId", value = "仪器模块Id", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/list") |
| | | @AuthHandler |
| | | public Result<?> getListEquipmentPointInformation(String InstrumentId) { |
| | | List<Map<String, Object>> list = equipmentPointService.getListEquipmentPointInformation(InstrumentId); |
| | | return Result.success(list); |
| | |
| | | @ApiImplicitParam(name = "equipmentPointId", value = "设备码点Id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @DeleteMapping("/delete") |
| | | @AuthHandler |
| | | public Result<?> deleteEquipmentPointInformation(Integer equipmentPointId) { |
| | | Integer isDeleteSuccess = equipmentPointService.deleteEquipmentPointInformation(equipmentPointId); |
| | | if (isDeleteSuccess == 1){ |
| | |
| | | |
| | | @ApiOperation("根据码点Id更新数据") |
| | | @PutMapping("/update") |
| | | @AuthHandler |
| | | public Result<?> updateEquipmentPointInformation(@RequestHeader("X-Token") String token, @RequestBody UpdateEquipmentPointDto updateEquipmentPointDto) throws Exception { |
| | | Object object = RedisUtil.get(token); |
| | | Map<String, Object> unmarshal = JackSonUtil.unmarshal(JackSonUtil.marshal(object), Map.class); |