/** * 领域层的QueryUnifiedFormat转换为南向的 * * @param queryUnifiedFormat 查询通用格式 * @return QueryUnifiedFormatSouth 南向查询通用格式 * @since eSDK IVS V100R003C00 */ public QueryUnifiedFormatSouth getUnifiedQueryModal2Soap(QueryUnifiedFormat unifiedQuery) { // modify by cWX191990,fieldNum小于0时,默认也需要初始化一个查询条件,问题单号DTS2014022507270 QueryUnifiedFormatSouth queryUnifiedFormatSouth = null; if (unifiedQuery.getQueryField().size() == 0) { queryUnifiedFormatSouth = new QueryUnifiedFormatSouth(1); } else { queryUnifiedFormatSouth = new QueryUnifiedFormatSouth(unifiedQuery.getQueryField().size()); } queryUnifiedFormatSouth.clear(); queryUnifiedFormatSouth.iFieldNum = unifiedQuery.getFieldNum(); com.huawei.esdk.ivs.domain.model.bean.IndexRange indexModal = unifiedQuery.getIndex(); if (null != indexModal) { queryUnifiedFormatSouth.index.fromIndex = indexModal.getFromIndex(); queryUnifiedFormatSouth.index.toIndex = indexModal.getToIndex(); } QueryFieldSouth[] qfSouth = null; if (unifiedQuery.getQueryField().size() == 0) { qfSouth = new QueryFieldSouth[1]; } else { qfSouth = new QueryFieldSouth[unifiedQuery.getQueryField().size()]; for (int i = 0; i < unifiedQuery.getQueryField().size(); i++) { QueryFieldSouth qfs = new QueryFieldSouth(); // 固定内存 qfs.clear(); qfs.isExactQuery = unifiedQuery.getQueryField().get(i).getExactQuery(); qfs.eFieId = unifiedQuery.getQueryField().get(i).getFieldType(); qfs.value = BytesUtils.stringToBytesForIVS(unifiedQuery.getQueryField().get(i).getValue()); qfSouth[i] = qfs; } } queryUnifiedFormatSouth.queryFields = qfSouth; OrderCondition orderConditionModal = unifiedQuery.getOrderCondition(); if (null != orderConditionModal) { queryUnifiedFormatSouth.stOrderCond.enableOrder = orderConditionModal.getEnableOrder(); queryUnifiedFormatSouth.stOrderCond.eFieId = orderConditionModal.getField(); queryUnifiedFormatSouth.stOrderCond.isAscend = orderConditionModal.getIsAscend(); } return queryUnifiedFormatSouth; }
/** * 领域层的userInfo转换为南向的对象 * * @param userInfo 领域层的用户信息 * @return UserInfoSouth 南向的用户信息 * @since eSDK IVS V100R003C00 */ public UserInfoSouth getUserInfoModal2Soap(UserInfo userInfo) { UserInfoSouth userInfoSouth = new UserInfoSouth(); userInfoSouth.clear(); if (null != userInfo.getDomainCode()) { userInfoSouth.domainCode = BytesUtils.stringToBytesForIVS(userInfo.getDomainCode()); } if (null != userInfo.getEmail()) { userInfoSouth.email = BytesUtils.stringToBytesForIVS(userInfo.getEmail()); } userInfoSouth.groupId = userInfo.getGroupId(); if (null != userInfo.getIsFirstLogin()) { userInfoSouth.isFirstLogin = userInfo.getIsFirstLogin() ? 1 : 0; } if (null != userInfo.getLockTime()) { userInfoSouth.lockTime = BytesUtils.stringToBytesForIVS(userInfo.getLockTime()); } if (null != userInfo.getLoginName()) { userInfoSouth.loginName = BytesUtils.stringToBytesForIVS(userInfo.getLoginName()); } userInfoSouth.maxSessionCount = userInfo.getMaxSessionCount(); userInfoSouth.maxVideoCount = userInfo.getMaxVideoCount(); if (null != userInfo.getPassword()) { userInfoSouth.password = BytesUtils.stringToBytesForIVS(userInfo.getPassword()); } if (null != userInfo.getPhone()) { userInfoSouth.phone = BytesUtils.stringToBytesForIVS(userInfo.getPhone()); } userInfoSouth.ptzLevel = userInfo.getPtzLevel(); if (null != userInfo.getPwdModifyDate()) { userInfoSouth.pwdModifyDate = BytesUtils.stringToBytesForIVS(userInfo.getPwdModifyDate()); } if (null != userInfo.getRegisterDate()) { userInfoSouth.registerDate = BytesUtils.stringToBytesForIVS(userInfo.getRegisterDate()); } if (null != userInfo.getReserve()) { userInfoSouth.reserve = BytesUtils.stringToBytesForIVS(userInfo.getReserve()); } userInfoSouth.roleId = userInfo.getRoleId(); userInfoSouth.sex = userInfo.getSex(); userInfoSouth.validDateFlag = userInfo.getValidDateFlag(); userInfoSouth.validDateStart = BytesUtils.stringToBytesForIVS(userInfo.getValidDateStart()); userInfoSouth.validDateEnd = BytesUtils.stringToBytesForIVS(userInfo.getValidDateEnd()); userInfoSouth.status = userInfo.getStatus(); if (null != userInfo.getUserDesc()) { userInfoSouth.userDesc = BytesUtils.stringToBytesForIVS(userInfo.getUserDesc()); } if (null != userInfo.getUserDomain()) { userInfoSouth.userDomain = BytesUtils.stringToBytesForIVS(userInfo.getUserDomain()); } userInfoSouth.userId = userInfo.getId(); if (null != userInfo.getUserName()) { userInfoSouth.userName = BytesUtils.stringToBytesForIVS(userInfo.getUserName()); } userInfoSouth.userType = userInfo.getUserType(); return userInfoSouth; }