def _get_by_basic_id_deep(self, pg, _id, user_id, group_id): """ :param pg: :param _id: :return: """ "" if not _id: return [] info_list = [] arl_dict = self.get_by_id(pg, _id, self.attr_list) if not arl_dict.get("user_id"): arl_dict["user_id"] = self.get_user_id_by_arl_id( arl_dict["definition_id"]) self.del_unkown_ch(arl_dict) if arl_dict: type_id = str(_id) if type_id[0] != 'B' and type_id[0] != 'C' and type_id[0] != 'D': def_id = arl_dict.get("definition_id") point_obj = PointOut("def") point_list = point_obj.get_list_by_id(pg, def_id) arl_dict["point_list"] = point_list from Source.spec2db_server.arl.analysis_service import AnalysisRecord ana_obj = AnalysisRecord() arl_dict[self.sub_list_name] = ana_obj.get_by_id_deep(pg, _id) arl_user_id = arl_dict.get("user_id") # 设置权限控制 control_list = self._get_procudure_control( pg, arl_user_id, user_id) self._set_procudure_control(arl_dict, control_list) else: def_id = arl_dict.get(self.id_col) point_obj = PointOut("def") point_list = point_obj.get_list_by_id(pg, def_id) arl_dict["point_list"] = point_list from Source.spec2db_server.arl.basic_ana import BasicAnaRecord ana_obj = BasicAnaRecord() arl_dict[self.sub_list_name] = ana_obj.get_by_id_deep(pg, _id) arl_user_id = arl_dict.get("user_id") # 设置权限控制 control_list = self._get_procudure_control( pg, arl_user_id, user_id) self._set_procudure_control(arl_dict, control_list) info_list.append(arl_dict) return info_list
def get_by_id_deep(self, pg, _id): """ :param _id: arl_id :return: """ _, def_data_list = self.get_by_def_id(pg, _id) for def_data in def_data_list: point_obj = PointOut(self.table_name) point_list = point_obj.get_list_by_id(pg, _id) def_data["point_list"] = point_list return def_data_list
def _get_by_basic_id_deep(self, pg, _id, user_id, group_id): """ :param pg: :param _id: :return: """"" if not _id: return [] info_list = [] arl_dict = self.get_by_id(pg, _id, self.attr_list) if not arl_dict.get("user_id"): arl_dict["user_id"] = self.get_user_id_by_arl_id(arl_dict["hu_id"]) self.del_unkown_ch(arl_dict) if arl_dict: type_id = str(_id) if type_id[0] != 'B' and type_id[0] != 'C' and type_id[0] != 'D': hu_id = arl_dict.get('hu_id') point_obj = PointOut("hu") point_list = point_obj.get_list_by_id(pg, hu_id) arl_dict["point_list"] = point_list from Source.spec2db_server.arl.def_server import DefRecord def_obj = DefRecord() arl_dict[self.sub_list_name] = def_obj.get_by_id_deep(pg, _id) arl_user_id = arl_dict.get("user_id") # 设置权限控制 control_list = self._get_procudure_control(pg, arl_user_id, user_id) self._set_procudure_control(arl_dict, control_list) else: hu_id = arl_dict.get('hu_id') point_obj = PointOut(self.table_name) point_list = point_obj.get_list_by_id(pg, hu_id) arl_dict["point_list"] = point_list from Source.spec2db_server.arl.basic_def import BasicDefRecord def_obj = BasicDefRecord() arl_dict[self.sub_list_name] = def_obj.get_by_id_deep(pg, hu_id) arl_user_id = arl_dict.get("user_id") # 设置权限控制 control_list = self._get_procudure_control(pg, arl_user_id, user_id) self._set_procudure_control(arl_dict, control_list) info_list.append(arl_dict) return info_list
def _get_by_basic_id_deep(self, pg, _id, user_id, group_id): """ :param pg: :param _id: :return: """ "" if not _id: return [] info_list = [] arl_dict = self.get_by_id(pg, _id, self.attr_list) if arl_dict: if not arl_dict.get("user_id"): arl_dict["user_id"] = self.get_user_id_by_arl_id( arl_dict["definition_id"]) self.del_unkown_ch(arl_dict) if arl_dict: type_id = str(_id) if type_id[0] != 'B' and type_id[0] != 'C' and type_id[ 0] != 'D': point_obj = PointOut("analysis") point_list = point_obj.get_list_by_id(pg, _id) arl_dict["point_list"] = point_list arl_user_id = arl_dict.get("user_id") # # 设置权限控制 control_list = self._get_procudure_control( pg, arl_user_id, user_id) arl_dict["control_list"] = control_list # self._set_procudure_control(arl_dict, control_list) else: point_obj = PointOut(self.table_name) point_list = point_obj.get_list_by_id(pg, _id) arl_dict["point_list"] = point_list arl_user_id = arl_dict.get("user_id") # # 设置权限控制 control_list = self._get_procudure_control( pg, arl_user_id, user_id) arl_dict["control_list"] = control_list # self._set_procudure_control(arl_dict, control_list) info_list.append(arl_dict) return info_list
def get_by_id_deep(self, pg, _id): """ :param _id: arl_id :return: """ if not _id: return [] count, hu_data_list = self._get_by_arl_id(pg, _id) from Source.spec2db_server.arl.def_server import DefRecord def_obj = DefRecord() for data_dict in hu_data_list: hu_id = data_dict.get('hu_id') point_obj = PointOut(self.table_name) point_list = point_obj.get_list_by_id(pg, hu_id) data_dict["point_list"] = point_list data_dict[self.sub_list_name] = def_obj.get_by_id_deep(pg, hu_id) return hu_data_list
def get_by_id_deep(self, pg, _id): """ :param _id: arl_id :return: """ if not _id: return [] _, def_data_list = self.get_definition_by_hu_id_deep(pg, _id) from Source.spec2db_server.arl.basic_ana import BasicAnaRecord analysis_obj = BasicAnaRecord() for data_dict in def_data_list: def_id = data_dict.get(self.id_col) point_obj = PointOut(self.table_name) point_list = point_obj.get_list_by_id(pg, def_id) data_dict["point_list"] = point_list data_dict[self.sub_list_name] = analysis_obj.get_by_id_deep( pg, def_id) return def_data_list