| | |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.data.ApiCommonDevice; |
| | | import com.fzzy.api.data.DepotType; |
| | | import com.fzzy.api.data.GatewayDeviceType; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.gateway.GatewayUtils; |
| | |
| | | |
| | | if (null == data2.getStatus()) { |
| | | data.setStatus(Constant.YN_Y); |
| | | |
| | | if (GatewayDeviceType.TYPE_07.equals(data2.getType())) { |
| | | data.setStatus(Constant.YN_N); |
| | | } |
| | | |
| | | } |
| | | |
| | | if (null == data2.getDeviceSn()) { |
| | |
| | | } else { |
| | | data.setDeviceSn(data2.getDeviceId()); |
| | | } |
| | | } |
| | | |
| | | if (null == data2.getDepotType()) { |
| | | data2.setDepotType(DepotType.TYPE_01.getCode()); |
| | | } |
| | | |
| | | if (null == data2.getId()) { |
| | |
| | | device.setPort(commonDevice.getPort()); |
| | | device.setOnlineTime(new Date()); |
| | | device.setStatus(Constant.YN_Y); |
| | | |
| | | device.setDeviceSn(commonDevice.getSn()); |
| | | GatewayUtils.add2Cache(device); |
| | | } |
| | | } |