| | |
| | | import com.yuanchu.mom.annotation.ValueAuth; |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.dto.DeviceDto; |
| | | import com.yuanchu.mom.dto.DeviceDto1; |
| | | 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.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | public Result selectDeviceByCode(String code) { |
| | | return Result.success(deviceService.selectDeviceByCode(code)); |
| | | } |
| | | |
| | | @ValueClassify("设备") |
| | | @ApiOperation(value = "查询数采配置") |
| | | @PostMapping("/getNumberCollect") |
| | | public Result<?> getNumberCollect(Integer id) { |
| | | DeviceDto1 deviceDto1 = new DeviceDto1(); |
| | | BeanUtils.copyProperties(deviceService.getById(id),deviceDto1); |
| | | return Result.success(deviceDto1); |
| | | } |
| | | |
| | | @ValueClassify("设备") |
| | | @ApiOperation(value = "维护数采配置") |
| | | @PostMapping("/numberCollect") |
| | | public Result<?> numberCollect(@RequestBody DeviceDto1 deviceDto1) { |
| | | Device device = new Device(); |
| | | BeanUtils.copyProperties(deviceDto1,device); |
| | | return Result.success(deviceService.updateById(device)); |
| | | } |
| | | } |
| | | |