Commit 31899b57c0e86d231b8f7a504d9cd1f7523cd6e0
Merge remote-tracking branch 'origin/dev' into test
Showing
2 changed files
with
103 additions
and
0 deletions
fw-valhalla-dao/src/main/resources/mapper/FollowTaskMapper.xml
... | ... | @@ -68,6 +68,28 @@ |
68 | 68 | <if test="condition.startTime2 !=null"> |
69 | 69 | and t1.create_time <= #{condition.startTime2} |
70 | 70 | </if> |
71 | + <if test="condition.completeTime1 !=null or condition.completeTime2 !=null"> | |
72 | + and ( | |
73 | + t1.state = 2 | |
74 | + <if test="condition.completeTime1 !=null"> | |
75 | + and t1.close_time >= #{condition.completeTime1} | |
76 | + </if> | |
77 | + <if test="condition.completeTime2 !=null"> | |
78 | + and t1.close_time <= #{condition.completeTime2} | |
79 | + </if> | |
80 | + ) | |
81 | + </if> | |
82 | + <if test="condition.defeatTime1 !=null or condition.defeatTime2 !=null"> | |
83 | + and ( | |
84 | + t1.state = 3 | |
85 | + <if test="condition.defeatTime1 !=null"> | |
86 | + and t1.close_time >= #{condition.defeatTime1} | |
87 | + </if> | |
88 | + <if test="condition.defeatTime2 !=null"> | |
89 | + and t1.close_time <= #{condition.defeatTime2} | |
90 | + </if> | |
91 | + ) | |
92 | + </if> | |
71 | 93 | <if test="condition.closeTime1 !=null"> |
72 | 94 | and t1.close_time >= #{closeTime1} |
73 | 95 | </if> |
... | ... | @@ -137,6 +159,28 @@ |
137 | 159 | <if test="condition.startTime2 !=null"> |
138 | 160 | and t1.create_time <= #{condition.startTime2} |
139 | 161 | </if> |
162 | + <if test="condition.completeTime1 !=null or condition.completeTime2 !=null"> | |
163 | + and ( | |
164 | + t1.state = 2 | |
165 | + <if test="condition.completeTime1 !=null"> | |
166 | + and t1.close_time >= #{condition.completeTime1} | |
167 | + </if> | |
168 | + <if test="condition.completeTime2 !=null"> | |
169 | + and t1.close_time <= #{condition.completeTime2} | |
170 | + </if> | |
171 | + ) | |
172 | + </if> | |
173 | + <if test="condition.defeatTime1 !=null or condition.defeatTime2 !=null"> | |
174 | + and ( | |
175 | + t1.state = 3 | |
176 | + <if test="condition.defeatTime1 !=null"> | |
177 | + and t1.close_time >= #{condition.defeatTime1} | |
178 | + </if> | |
179 | + <if test="condition.defeatTime2 !=null"> | |
180 | + and t1.close_time <= #{condition.defeatTime2} | |
181 | + </if> | |
182 | + ) | |
183 | + </if> | |
140 | 184 | <if test="condition.closeTime1 !=null"> |
141 | 185 | and t1.close_time >= #{closeTime1} |
142 | 186 | </if> | ... | ... |
fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/FollowPoolQueryVO.java
... | ... | @@ -47,6 +47,11 @@ public class FollowPoolQueryVO extends PoolQuery { |
47 | 47 | /** |
48 | 48 | * 区间 |
49 | 49 | */ |
50 | + private String completeTime; | |
51 | + /** | |
52 | + * 区间 | |
53 | + */ | |
54 | + private String defeatTime; | |
50 | 55 | private String closeTime; |
51 | 56 | /** |
52 | 57 | * 是否关单 |
... | ... | @@ -101,6 +106,60 @@ public class FollowPoolQueryVO extends PoolQuery { |
101 | 106 | return null; |
102 | 107 | } |
103 | 108 | |
109 | + public Date getCompleteTime1() { | |
110 | + if (StringUtils.isBlank(completeTime)) { | |
111 | + return null; | |
112 | + } | |
113 | + String[] times = completeTime.split(","); | |
114 | + if (StringUtils.isNotBlank(times[0]) && NumberUtils.isDigits(times[0])) { | |
115 | + LocalDateTime localDateTime = Instant.ofEpochMilli(NumberUtils.toLong(times[0])).atZone(ZoneId.systemDefault()).toLocalDateTime(); | |
116 | + return DateUtil.getBeginInTime(DateUtil.localDateTime2Date(localDateTime)); | |
117 | + } | |
118 | + return null; | |
119 | + } | |
120 | + | |
121 | + public Date getCompleteTime2() { | |
122 | + if (StringUtils.isBlank(completeTime)) { | |
123 | + return null; | |
124 | + } | |
125 | + String[] times = completeTime.split(","); | |
126 | + if (times.length < 2) { | |
127 | + return null; | |
128 | + } | |
129 | + if (StringUtils.isNotBlank(times[1]) && NumberUtils.isDigits(times[1])) { | |
130 | + LocalDateTime localDateTime = Instant.ofEpochMilli(NumberUtils.toLong(times[1])).atZone(ZoneId.systemDefault()).toLocalDateTime(); | |
131 | + return DateUtil.getEndInTime(DateUtil.localDateTime2Date(localDateTime)); | |
132 | + } | |
133 | + return null; | |
134 | + } | |
135 | + | |
136 | + public Date getDefeatTime1() { | |
137 | + if (StringUtils.isBlank(defeatTime)) { | |
138 | + return null; | |
139 | + } | |
140 | + String[] times = defeatTime.split(","); | |
141 | + if (StringUtils.isNotBlank(times[0]) && NumberUtils.isDigits(times[0])) { | |
142 | + LocalDateTime localDateTime = Instant.ofEpochMilli(NumberUtils.toLong(times[0])).atZone(ZoneId.systemDefault()).toLocalDateTime(); | |
143 | + return DateUtil.getBeginInTime(DateUtil.localDateTime2Date(localDateTime)); | |
144 | + } | |
145 | + return null; | |
146 | + } | |
147 | + | |
148 | + public Date getDefeatTime2() { | |
149 | + if (StringUtils.isBlank(defeatTime)) { | |
150 | + return null; | |
151 | + } | |
152 | + String[] times = defeatTime.split(","); | |
153 | + if (times.length < 2) { | |
154 | + return null; | |
155 | + } | |
156 | + if (StringUtils.isNotBlank(times[1]) && NumberUtils.isDigits(times[1])) { | |
157 | + LocalDateTime localDateTime = Instant.ofEpochMilli(NumberUtils.toLong(times[1])).atZone(ZoneId.systemDefault()).toLocalDateTime(); | |
158 | + return DateUtil.getEndInTime(DateUtil.localDateTime2Date(localDateTime)); | |
159 | + } | |
160 | + return null; | |
161 | + } | |
162 | + | |
104 | 163 | public Date getCloseTime1() { |
105 | 164 | if (StringUtils.isBlank(closeTime)) { |
106 | 165 | return null; | ... | ... |