| | |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.CommonPage; |
| | | import com.sandu.common.domain.ResponseVO; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Wrapper; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public ResponseVO<Object> bindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) { |
| | | boolean result = poleService.bindPole(poleId, param); |
| | | if (result) { |
| | | //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助 |
| | | //设备类型,0路灯,1nove,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯 |
| | | switch (param.getDeviceType()) { |
| | | case 0: |
| | | Pole pole = poleService.getById(poleId); |
| | | if (!pole.getDeviceCode().equals(param.getDeviceCode())) { |
| | | pole.setPoleName(param.getDeviceName()); |
| | | pole.setDeviceCode(param.getDeviceCode()); |
| | | poleService.updateById(pole); |
| | | } |
| | | break; |
| | | case 1: |
| | | break; |
| | |
| | | break; |
| | | case 9: |
| | | break; |
| | | case 10: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | * 灯杆绑定设备 |
| | | */ |
| | | @PostMapping("/unBind/{poleId}") |
| | | public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody @Validated PoleBindingParam param) { |
| | | public ResponseVO<Object> unBindPole(@PathVariable Long poleId, @RequestBody PoleBindingParam param) { |
| | | boolean result = poleService.unBindPole(poleId, param.getDeviceCode()); |
| | | if (result) { |
| | | //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助 |
| | | //设备类型,0路灯,1led屏幕,2充电桩,3大气监测,4水质监测,5ip音柱,6lcd广告机,7摄像头,8杆体倾测,9一键救助, 10熙讯 |
| | | switch (param.getDeviceType()) { |
| | | case 0: |
| | | break; |
| | |
| | | break; |
| | | case 9: |
| | | break; |
| | | case 10: |
| | | break; |
| | | default: |
| | | break; |
| | | } |