| | |
| | | import org.jeecg.modules.dnc.entity.DeviceType; |
| | | import org.jeecg.modules.dnc.service.IDeviceTypeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "设备类信息") |
| | |
| | | |
| | | /** |
| | | * 根据业务id查询设备类列表 |
| | | * @param businessId |
| | | * @param type |
| | | * @param attributionId |
| | | * @param attributionType |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "设备类信息-根据业务id查询设备类列表") |
| | | @ApiOperation(value = "设备类信息-根据业务id查询设备类列表", notes = "设备类信息-根据业务id查询设备类列表") |
| | | @GetMapping("/getByBusinessId") |
| | | public Result<?> getByBusinessId(String businessId,String type){ |
| | | return deviceTypeService.getByBusinessId(businessId,type); |
| | | public Result<?> getByBusinessId(String attributionId,String attributionType){ |
| | | return deviceTypeService.getByBusinessId(attributionId,attributionType); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @AutoLog(value = "设备类信息-新增设备类") |
| | | @ApiOperation(value = "设备类信息-新增设备类", notes = "设备类信息-新增设备类") |
| | | @GetMapping("/add") |
| | | public Result<?> add(DeviceType deviceType){ |
| | | return Result.OK(deviceTypeService.add(deviceType)); |
| | | @PostMapping("/add") |
| | | public Result<?> add(@RequestBody DeviceType deviceType){ |
| | | return deviceTypeService.add(deviceType); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @AutoLog(value = "设备类信息-编辑设备类") |
| | | @ApiOperation(value = "设备类信息-编辑设备类", notes = "设备类信息-编辑设备类") |
| | | @GetMapping("/edit") |
| | | public Result<?> edit(DeviceType deviceType){ |
| | | return Result.OK(deviceTypeService.edit(deviceType)); |
| | | @PutMapping("/edit") |
| | | public Result<?> edit(@RequestBody DeviceType deviceType){ |
| | | return deviceTypeService.edit(deviceType); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @AutoLog(value = "设备类信息-根据id删除设备类") |
| | | @ApiOperation(value = "设备类信息-根据id删除设备类", notes = "设备类信息-根据id删除设备类") |
| | | @GetMapping("/delete") |
| | | public Result<?> delete(@RequestBody String id){ |
| | | return Result.OK(deviceTypeService.delete(id)); |
| | | @DeleteMapping("/delete") |
| | | public Result<?> delete(String id){ |
| | | return deviceTypeService.delete(id); |
| | | } |
| | | } |