| | |
| | | import cn.hutool.core.lang.UUID; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.pojo.Device; |
| | | import com.yuanchu.mom.service.DeviceService; |
| | | import com.yuanchu.mom.utils.JackSonUtil; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | public Result selectDevicePrincipal() { |
| | | return Result.success(deviceService.selectDevicePrincipal()); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过项目获取设备列表") |
| | | @PostMapping("/selectDeviceByCategory") |
| | | @ValueAuth |
| | | public Result selectDeviceByCategory(String inspectionItem, String inspectionItemSubclass) { |
| | | return Result.success(deviceService.selectDeviceByCategory(inspectionItem, inspectionItemSubclass)); |
| | | } |
| | | |
| | | @ApiOperation(value = "通过设备编号获取设备列表") |
| | | @PostMapping("/selectDeviceByCode") |
| | | @ValueAuth |
| | | public Result selectDeviceByCode(String code) { |
| | | return Result.success(deviceService.selectDeviceByCode(code)); |
| | | } |
| | | } |
| | | |