|
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.yxt.common.base.utils.StringUtils; |
|
|
|
import com.yxt.common.core.result.ResultBean; |
|
|
|
import com.yxt.supervise.monitor.api.entity.Device; |
|
|
|
import com.yxt.supervise.monitor.api.entity.WareHouse; |
|
|
@ -213,10 +214,12 @@ public class YDeviceService extends ServiceImpl<YDeviceMapper, Device> { |
|
|
|
public ResultBean createDevice(Device device) { |
|
|
|
ResultBean rb = ResultBean.fireSuccess(); |
|
|
|
if ("1".equals(device.getType())) { //摄像头
|
|
|
|
Device nvrDevice = this.getById(device.getNvrId()); |
|
|
|
device.setNvrCode(nvrDevice.getNvrCode()); |
|
|
|
device.setNvrSerial(nvrDevice.getSerialNumber()); |
|
|
|
device.setCkId(nvrDevice.getCkId()); |
|
|
|
if(device.getNvrId()!=null){ |
|
|
|
Device nvrDevice = this.getById(device.getNvrId()); |
|
|
|
device.setNvrCode(nvrDevice.getNvrCode()); |
|
|
|
device.setNvrSerial(nvrDevice.getSerialNumber()); |
|
|
|
device.setCkId(nvrDevice.getCkId()); |
|
|
|
} |
|
|
|
} |
|
|
|
if ("2".equals(device.getType())) { //电子围栏
|
|
|
|
Device nvrDevice = this.getById(device.getBjzjId()); |
|
|
|