| | |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
| | | import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
|
| | | import com.genersoft.iot.vmp.utils.DateUtil;
|
| | | import org.apache.commons.lang3.math.NumberUtils;
|
| | | import org.dom4j.Attribute;
|
| | | import org.dom4j.Document;
|
| | | import org.dom4j.DocumentException;
|
| | |
| | | deviceChannel.setBusinessGroupId(businessGroupID);
|
| | | }
|
| | |
|
| | |
|
| | | if (!ObjectUtils.isEmpty(parentID)) {
|
| | | if (parentID.contains("/")) {
|
| | | String[] parentIdArray = parentID.split("/");
|
| | |
| | | if (!ObjectUtils.isEmpty(owner)) {
|
| | | deviceChannel.setOwner(owner);
|
| | | }
|
| | | if (!ObjectUtils.isEmpty(civilCode)) {
|
| | | if (!ObjectUtils.isEmpty(civilCode)
|
| | | && civilCode.length() <= 8
|
| | | && NumberUtils.isParsable(civilCode)
|
| | | && Integer.parseInt(civilCode)%2 == 0
|
| | | ) {
|
| | | deviceChannel.setCivilCode(civilCode);
|
| | | }
|
| | | if (!ObjectUtils.isEmpty(businessGroupID)) {
|
| | |
| | | if (!ObjectUtils.isEmpty(businessGroupID)) {
|
| | | deviceChannel.setParentId(businessGroupID);
|
| | | }else {
|
| | | if (!ObjectUtils.isEmpty(civilCode)) {
|
| | | deviceChannel.setParentId(civilCode);
|
| | | if (!ObjectUtils.isEmpty(deviceChannel.getCivilCode())) {
|
| | | deviceChannel.setParentId(deviceChannel.getCivilCode());
|
| | | }
|
| | | }
|
| | | }
|