| | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | |
| | | |
| | | @Value("${file.path}") |
| | | private String filePath; |
| | | |
| | | @ValueAuth |
| | | @ApiOperation(value = "查询设备详情列表") |
| | | @PostMapping("/selectDeviceParameter") |
| | | public Result selectDeviceParameter(@RequestBody Map<String, Object> data) throws Exception { |
| | | Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class); |
| | | Device itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Device.class); |
| | | DeviceDto itemParameter = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), DeviceDto.class); |
| | | return Result.success(deviceService.selectDeviceParameter(page, itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("设备工具明细") |
| | | @ApiOperation(value = "添加设备详情参数") |
| | | @PostMapping("/addDeviceParameter") |
| | | public Result addDeviceParameter(@RequestBody Device itemParameter) { |
| | | return Result.success(deviceService.addDeviceParameter(itemParameter)); |
| | | } |
| | | |
| | | @ValueClassify("设备工具明细") |
| | | @ApiOperation(value = "删除设备详情参数") |
| | | @PostMapping("/delDeviceParameter") |
| | | public Result<?> delDeviceParameter(Integer id) { |
| | | return Result.success(deviceService.delDeviceParameter(id)); |
| | | } |
| | | |
| | | @ValueClassify("设备工具明细") |
| | | @ApiOperation(value = "修改设备详情参数") |
| | | @PostMapping("/upDeviceParameter") |
| | | public Result<?> upDeviceParameter(@RequestBody Device itemParameter) { |
| | |
| | | //图片上传 |
| | | @ApiOperation(value = "设备图片上传") |
| | | @PostMapping("/uploadFile") |
| | | @ValueAuth |
| | | public Result uploadFile(MultipartFile file) { |
| | | String urlString; |
| | | String pathName; |