privada vacío processGetPreviousPeriodFunc (Map <String, String> expressionInfo, List <Condición> conditionList) { Cadena expressionFunc = expressionInfo.get ( este .expression); si (expressionFunc =! nula && expressionFunc.contains ( "getPreviousPeriod" )) { cadena regex = "(getPreviousPeriod \\ () ([\\, \\ \\ + - \\ * \\ / \\ (\\) _A-Za-z0-9 \\ u4e00 - \\ u9fa5 \\] +) (,) ([0-9] +)". ; modelo mODELO = Pattern.compile (regex); Matcher matcher = pattern.matcher ( expressionFunc); // getPreviousPeriod (sum (Fields.prime_cost_07), 1) para (; matcher.find ();) { Expresión de cadena = matcher.group (2 ); Cadena tbAndHbNum = matcher.group (4); // 分组字段, 1代表同比, 2代表环比 para ( int i = 0; i <conditionList.size (); i ++ ) { Condition = conditionList.get (i); si (condition.getDataType (). contiene ( "fecha" )) { si (condition.getValues ()! = NULL && condition.getValues (). size () == 1 ) { Cadena currDate = condition.getValues (). obtener (0); si ( "1" .equals (tbAndHbNum)) { // 同比 currDate = DateUtil.yearAddNum (currDate, -1 ); } Demás si ( "2" .equals (tbAndHbNum)) { // 环比 currDate = DateUtil.monthAddNum (currDate, -1 ); } Condition.getValues () conjunto (. 0 , currDate); condition.setValue (currDate); } } } ExpressionInfo.put (este .expression, expresión); volver ; } } }