hxp
2019-06-22 d0f5f9922f17f5bff4288173f18a9ed827d95db8
PySysDB/Éú³ÉIpyGameDataPY/IpyGameDataPYTemp.py
@@ -153,22 +153,26 @@
        for i, strValue in enumerate(rowList):
            if i == 0:
                continue
            fieldName = fieldList[i][1]
            strValue = strValue.lstrip().rstrip()
            if strValue.isdigit():
                configValue = int(strValue)
            elif (strValue.startswith("{") and strValue.endswith("}")) \
                or (strValue.startswith("[") and strValue.endswith("]")) \
                or (strValue.startswith("(") and strValue.endswith(")")):
                configValue = eval(strValue)
            elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                configValue = self.__StrToDict(strValue)
            elif ChConfig.Def_Str_Montant in strValue:
                configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
            elif strValue in ["-", ""]:
                configValue = ""
            else:
                configValue = self.__ToFloat(strValue)
            try:
                fieldName = fieldList[i][1]
                strValue = strValue.lstrip().rstrip()
                if strValue.isdigit():
                    configValue = int(strValue)
                elif (strValue.startswith("{") and strValue.endswith("}")) \
                    or (strValue.startswith("[") and strValue.endswith("]")) \
                    or (strValue.startswith("(") and strValue.endswith(")")):
                    configValue = eval(strValue)
                elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                    configValue = self.__StrToDict(strValue)
                elif ChConfig.Def_Str_Montant in strValue:
                    configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
                elif strValue in ["-", ""]:
                    configValue = ""
                else:
                    configValue = self.__ToFloat(strValue)
            except BaseException:
                ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
                raise
            setattr(funcConfigObj, fieldName, configValue)
        self.ipyFuncConfigDict[key] = funcConfigObj
        return
@@ -419,7 +423,7 @@
    '''查询条件下与对应查询字段参考值相近的数据实例;参考值小于配置表最小值时返回none,大于最大值时返回最大值对应的实例
    @param dtName: è¡¨åï¼Œä¸å«tag
    @param keyName: å‚考字段名
    @param keyValue: å‚考字段值
    @param keyValue: å‚考字段值,大于等于字段值时返回对应数据
    @param conditionDict: æŸ¥è¯¢æ¡ä»¶ï¼Œ{查询字段名:字段值, ...}
    @return: æ‰¾ä¸åˆ°æ•°æ®è¿”回 None ï¼Œ å¦åˆ™è¿”回对应的 ipyData æ•°æ®å®žä¾‹
    '''
@@ -451,7 +455,7 @@
        for i in xrange(near - 1, low - 1, -1):
            nearData = dataList[i]
            nearValue = getattr(nearData, "%s" % keyName)
            if nearValue < keyValue:
            if nearValue <= keyValue:
                return nearData
            
    elif keyValue > nearValue: