| | |
| | | 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
|
| | |
| | | '''æ¥è¯¢æ¡ä»¶ä¸ä¸å¯¹åºæ¥è¯¢å段åèå¼ç¸è¿çæ°æ®å®ä¾ï¼åèå¼å°äºé
置表æå°å¼æ¶è¿ånoneï¼å¤§äºæå¤§å¼æ¶è¿åæå¤§å¼å¯¹åºçå®ä¾
|
| | | @param dtName: 表åï¼ä¸å«tag
|
| | | @param keyName: åèåæ®µå
|
| | | @param keyValue: åèåæ®µå¼
|
| | | @param keyValue: åèåæ®µå¼ï¼å¤§äºçäºåæ®µå¼æ¶è¿åå¯¹åºæ°æ®
|
| | | @param conditionDict: æ¥è¯¢æ¡ä»¶ï¼{æ¥è¯¢å段å:åæ®µå¼, ...}
|
| | | @return: æ¾ä¸å°æ°æ®è¿å None ï¼ å¦åè¿å对åºç ipyData æ°æ®å®ä¾
|
| | | '''
|
| | |
| | | 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:
|