mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 07:25:54 +08:00
Compare commits
2 commits
89aaa89acc
...
a7eff5554b
Author | SHA1 | Date | |
---|---|---|---|
a7eff5554b | |||
7fd64bec9d |
2
@rbv
2
@rbv
|
@ -1 +1 @@
|
|||
Subproject commit 50c7123533ab4ff3c20ee82e34526f92a95c5ea9
|
||||
Subproject commit 09bee75598a4741080b039b7259d0ab32d68f4f1
|
|
@ -508,6 +508,25 @@ public class AdvFilterParser extends SetUser {
|
|||
}
|
||||
op = ParseHelper.BW;
|
||||
|
||||
} else if (ParseHelper.YYY.equalsIgnoreCase(op)
|
||||
|| ParseHelper.MMM.equalsIgnoreCase(op)) {
|
||||
|
||||
int xValue = NumberUtils.toInt(value);
|
||||
Calendar now = CalendarUtils.getInstance();
|
||||
|
||||
if (ParseHelper.YYY.equalsIgnoreCase(op)) {
|
||||
now.add(Calendar.YEAR, xValue);
|
||||
value = now.get(Calendar.YEAR) + "-01-01";
|
||||
valueEnd = now.get(Calendar.YEAR) + "-12-31";
|
||||
} else {
|
||||
now.set(Calendar.DAY_OF_MONTH, 1);
|
||||
now.add(Calendar.MONTH, xValue);
|
||||
|
||||
value = CalendarUtils.getUTCDateFormat().format(now.getTime());
|
||||
Moment last = Moment.moment(now.getTime()).endOf(Moment.UNIT_MONTH);
|
||||
valueEnd = CalendarUtils.getUTCDateFormat().format(last.date());
|
||||
}
|
||||
op = ParseHelper.BW;
|
||||
}
|
||||
|
||||
} else if (dt == DisplayType.TIME) {
|
||||
|
|
|
@ -95,6 +95,8 @@ public class ParseHelper {
|
|||
public static final String PUY = "PUY"; // 本年-
|
||||
public static final String CUY = "CUY"; // 本年
|
||||
public static final String NUY = "NUY"; // 本年+
|
||||
public static final String YYY = "YYY"; // 指定年+-
|
||||
public static final String MMM = "MMM"; // 指定月+-
|
||||
public static final String DDD = "DDD"; // 指定天+-
|
||||
public static final String HHH = "HHH"; // 指定时+-
|
||||
public static final String EVW = "EVW"; // 每周几
|
||||
|
@ -185,7 +187,8 @@ public class ParseHelper {
|
|||
} else if (
|
||||
CUW.equalsIgnoreCase(token) || CUM.equalsIgnoreCase(token) || CUQ.equalsIgnoreCase(token) || CUY.equalsIgnoreCase(token) ||
|
||||
PUW.equalsIgnoreCase(token) || PUM.equalsIgnoreCase(token) || PUQ.equalsIgnoreCase(token) || PUY.equalsIgnoreCase(token) ||
|
||||
NUW.equalsIgnoreCase(token) || NUM.equalsIgnoreCase(token) || NUQ.equalsIgnoreCase(token) || NUY.equalsIgnoreCase(token)) {
|
||||
NUW.equalsIgnoreCase(token) || NUM.equalsIgnoreCase(token) || NUQ.equalsIgnoreCase(token) || NUY.equalsIgnoreCase(token) ||
|
||||
YYY.equalsIgnoreCase(token) || MMM.equalsIgnoreCase(token)) {
|
||||
return "between";
|
||||
} else if (DDD.equalsIgnoreCase(token) || HHH.equalsIgnoreCase(token)
|
||||
|| EVW.equalsIgnoreCase(token) || EVM.equalsIgnoreCase(token)) {
|
||||
|
|
|
@ -342,6 +342,8 @@ const OP_TYPE = {
|
|||
NUY: $L('明年'),
|
||||
EVW: $L('本周..'),
|
||||
EVM: $L('本月..'),
|
||||
YYY: $L('指定..年'),
|
||||
MMM: $L('指定..月'),
|
||||
DDD: $L('指定..天'),
|
||||
HHH: $L('指定..时'),
|
||||
REP: $L('重复'),
|
||||
|
@ -349,7 +351,7 @@ const OP_TYPE = {
|
|||
// prettier-ignore
|
||||
const OP_NOVALUE = ['NL', 'NT', 'SFU', 'SFB', 'SFD', 'YTA', 'TDA', 'TTA', 'PUW', 'CUW', 'NUW', 'PUM', 'CUM', 'NUM', 'PUQ', 'CUQ', 'NUQ', 'PUY', 'CUY', 'NUY']
|
||||
// prettier-ignore
|
||||
const OP_DATE_NOPICKER = ['TDA', 'YTA', 'TTA', 'RED', 'REM', 'REY', 'FUD', 'FUM', 'FUY', 'BFD', 'BFM', 'BFY', 'AFD', 'AFM', 'AFY', 'PUW', 'CUW', 'NUW', 'PUM', 'CUM', 'NUM', 'PUQ', 'CUQ', 'NUQ', 'PUY', 'CUY', 'NUY', 'EVW', 'EVM', 'DDD', 'HHH', 'REP']
|
||||
const OP_DATE_NOPICKER = ['TDA', 'YTA', 'TTA', 'RED', 'REM', 'REY', 'FUD', 'FUM', 'FUY', 'BFD', 'BFM', 'BFY', 'AFD', 'AFM', 'AFY', 'PUW', 'CUW', 'NUW', 'PUM', 'CUM', 'NUM', 'PUQ', 'CUQ', 'NUQ', 'PUY', 'CUY', 'NUY', 'EVW', 'EVM', 'YYY', 'MMM', 'DDD', 'HHH', 'REP']
|
||||
const REFENTITY_CACHE = {}
|
||||
const PICKLIST_CACHE = {}
|
||||
|
||||
|
@ -406,7 +408,7 @@ class FilterItem extends React.Component {
|
|||
op = ['GT', 'LT', 'EQ', 'BW', 'GE', 'LE']
|
||||
} else if (fieldType === 'DATE' || fieldType === 'DATETIME') {
|
||||
// prettier-ignore
|
||||
op = ['TDA', 'YTA', 'TTA', 'GT', 'LT', 'EQ', 'BW', 'RED', 'REM', 'REY', 'FUD', 'FUM', 'FUY', 'BFD', 'BFM', 'BFY', 'AFD', 'AFM', 'AFY', 'PUW', 'CUW', 'NUW', 'PUM', 'CUM', 'NUM', 'PUQ', 'CUQ', 'NUQ', 'PUY', 'CUY', 'NUY', 'EVW', 'EVM', 'DDD']
|
||||
op = ['TDA', 'YTA', 'TTA', 'GT', 'LT', 'EQ', 'BW', 'RED', 'REM', 'REY', 'FUD', 'FUM', 'FUY', 'BFD', 'BFM', 'BFY', 'AFD', 'AFM', 'AFY', 'PUW', 'CUW', 'NUW', 'PUM', 'CUM', 'NUM', 'PUQ', 'CUQ', 'NUQ', 'PUY', 'CUY', 'NUY', 'EVW', 'EVM', 'YYY', 'MMM', 'DDD']
|
||||
if (fieldType === 'DATETIME') op.push('HHH')
|
||||
} else if (fieldType === 'TIME') {
|
||||
op = ['GT', 'LT', 'EQ', 'BW']
|
||||
|
|
Loading…
Reference in a new issue