| @@ 187-193 (lines=7) @@ | ||
| 184 | } |
|
| 185 | ||
| 186 | // birth |
|
| 187 | if (!empty($searchData['birth_start']) && $searchData['birth_start']) { |
|
| 188 | $date = $searchData['birth_start'] |
|
| 189 | ->format('Y-m-d H:i:s'); |
|
| 190 | $qb |
|
| 191 | ->andWhere('c.birth >= :birth_start') |
|
| 192 | ->setParameter('birth_start', $date); |
|
| 193 | } |
|
| 194 | if (!empty($searchData['birth_end']) && $searchData['birth_end']) { |
|
| 195 | $date = clone $searchData['birth_end']; |
|
| 196 | $date = $date |
|
| @@ 236-242 (lines=7) @@ | ||
| 233 | } |
|
| 234 | ||
| 235 | // create_date |
|
| 236 | if (!empty($searchData['create_date_start']) && $searchData['create_date_start']) { |
|
| 237 | $date = $searchData['create_date_start'] |
|
| 238 | ->format('Y-m-d H:i:s'); |
|
| 239 | $qb |
|
| 240 | ->andWhere('c.create_date >= :create_date_start') |
|
| 241 | ->setParameter('create_date_start', $date); |
|
| 242 | } |
|
| 243 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 244 | $date = clone $searchData['create_date_end']; |
|
| 245 | $date = $date |
|
| @@ 254-260 (lines=7) @@ | ||
| 251 | } |
|
| 252 | ||
| 253 | // update_date |
|
| 254 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 255 | $date = $searchData['update_date_start'] |
|
| 256 | ->format('Y-m-d H:i:s'); |
|
| 257 | $qb |
|
| 258 | ->andWhere('c.update_date >= :update_date_start') |
|
| 259 | ->setParameter('update_date_start', $date); |
|
| 260 | } |
|
| 261 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 262 | $date = clone $searchData['update_date_end']; |
|
| 263 | $date = $date |
|
| @@ 272-278 (lines=7) @@ | ||
| 269 | } |
|
| 270 | ||
| 271 | // last_buy |
|
| 272 | if (!empty($searchData['last_buy_start']) && $searchData['last_buy_start']) { |
|
| 273 | $date = $searchData['last_buy_start'] |
|
| 274 | ->format('Y-m-d H:i:s'); |
|
| 275 | $qb |
|
| 276 | ->andWhere('c.last_buy_date >= :last_buy_start') |
|
| 277 | ->setParameter('last_buy_start', $date); |
|
| 278 | } |
|
| 279 | if (!empty($searchData['last_buy_end']) && $searchData['last_buy_end']) { |
|
| 280 | $date = clone $searchData['last_buy_end']; |
|
| 281 | $date = $date |
|
| @@ 93-97 (lines=5) @@ | ||
| 90 | } |
|
| 91 | ||
| 92 | // status |
|
| 93 | if (!empty($searchData['status']) && $searchData['status']) { |
|
| 94 | $qb |
|
| 95 | ->andWhere('o.OrderStatus = :status') |
|
| 96 | ->setParameter('status', $searchData['status']); |
|
| 97 | } |
|
| 98 | ||
| 99 | // name |
|
| 100 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
|
| @@ 195-201 (lines=7) @@ | ||
| 192 | } |
|
| 193 | ||
| 194 | // oreder_date |
|
| 195 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 196 | $date = $searchData['order_date_start'] |
|
| 197 | ->format('Y-m-d H:i:s'); |
|
| 198 | $qb |
|
| 199 | ->andWhere('o.create_date >= :order_date_start') |
|
| 200 | ->setParameter('order_date_start', $date); |
|
| 201 | } |
|
| 202 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 203 | $date = clone $searchData['order_date_end']; |
|
| 204 | $date = $date |
|
| @@ 213-219 (lines=7) @@ | ||
| 210 | } |
|
| 211 | ||
| 212 | // create_date |
|
| 213 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 214 | $date = $searchData['update_date_start'] |
|
| 215 | ->format('Y-m-d H:i:s'); |
|
| 216 | $qb |
|
| 217 | ->andWhere('o.update_date >= :update_date_start') |
|
| 218 | ->setParameter('update_date_start', $date); |
|
| 219 | } |
|
| 220 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 221 | $date = clone $searchData['update_date_end']; |
|
| 222 | $date = $date |
|
| @@ 291-296 (lines=6) @@ | ||
| 288 | ||
| 289 | // status |
|
| 290 | $filterStatus = false; |
|
| 291 | if (!empty($searchData['status']) && $searchData['status']) { |
|
| 292 | $qb |
|
| 293 | ->andWhere('o.OrderStatus = :status') |
|
| 294 | ->setParameter('status', $searchData['status']); |
|
| 295 | $filterStatus = true; |
|
| 296 | } |
|
| 297 | if (!empty($searchData['multi_status']) && count($searchData['multi_status'])) { |
|
| 298 | $qb |
|
| 299 | ->andWhere($qb->expr()->in('o.OrderStatus', ':multi_status')) |
|
| @@ 360-366 (lines=7) @@ | ||
| 357 | } |
|
| 358 | ||
| 359 | // oreder_date |
|
| 360 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 361 | $date = $searchData['order_date_start'] |
|
| 362 | ->format('Y-m-d H:i:s'); |
|
| 363 | $qb |
|
| 364 | ->andWhere('o.order_date >= :order_date_start') |
|
| 365 | ->setParameter('order_date_start', $date); |
|
| 366 | } |
|
| 367 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 368 | $date = clone $searchData['order_date_end']; |
|
| 369 | $date = $date |
|
| @@ 378-384 (lines=7) @@ | ||
| 375 | } |
|
| 376 | ||
| 377 | // payment_date |
|
| 378 | if (!empty($searchData['payment_date_start']) && $searchData['payment_date_start']) { |
|
| 379 | $date = $searchData['payment_date_start'] |
|
| 380 | ->format('Y-m-d H:i:s'); |
|
| 381 | $qb |
|
| 382 | ->andWhere('o.payment_date >= :payment_date_start') |
|
| 383 | ->setParameter('payment_date_start', $date); |
|
| 384 | } |
|
| 385 | if (!empty($searchData['payment_date_end']) && $searchData['payment_date_end']) { |
|
| 386 | $date = clone $searchData['payment_date_end']; |
|
| 387 | $date = $date |
|
| @@ 396-402 (lines=7) @@ | ||
| 393 | } |
|
| 394 | ||
| 395 | // commit_date |
|
| 396 | if (!empty($searchData['commit_date_start']) && $searchData['commit_date_start']) { |
|
| 397 | $date = $searchData['commit_date_start'] |
|
| 398 | ->format('Y-m-d H:i:s'); |
|
| 399 | $qb |
|
| 400 | ->andWhere('o.commit_date >= :commit_date_start') |
|
| 401 | ->setParameter('commit_date_start', $date); |
|
| 402 | } |
|
| 403 | if (!empty($searchData['commit_date_end']) && $searchData['commit_date_end']) { |
|
| 404 | $date = clone $searchData['commit_date_end']; |
|
| 405 | $date = $date |
|
| @@ 415-421 (lines=7) @@ | ||
| 412 | ||
| 413 | ||
| 414 | // update_date |
|
| 415 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 416 | $date = $searchData['update_date_start'] |
|
| 417 | ->format('Y-m-d H:i:s'); |
|
| 418 | $qb |
|
| 419 | ->andWhere('o.update_date >= :update_date_start') |
|
| 420 | ->setParameter('update_date_start', $date); |
|
| 421 | } |
|
| 422 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 423 | $date = clone $searchData['update_date_end']; |
|
| 424 | $date = $date |
|
| @@ 245-251 (lines=7) @@ | ||
| 242 | } |
|
| 243 | ||
| 244 | // crate_date |
|
| 245 | if (!empty($searchData['create_date_start']) && $searchData['create_date_start']) { |
|
| 246 | $date = $searchData['create_date_start'] |
|
| 247 | ->format('Y-m-d H:i:s'); |
|
| 248 | $qb |
|
| 249 | ->andWhere('p.create_date >= :create_date_start') |
|
| 250 | ->setParameter('create_date_start', $date); |
|
| 251 | } |
|
| 252 | ||
| 253 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 254 | $date = clone $searchData['create_date_end']; |
|
| @@ 264-270 (lines=7) @@ | ||
| 261 | } |
|
| 262 | ||
| 263 | // update_date |
|
| 264 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 265 | $date = $searchData['update_date_start'] |
|
| 266 | ->format('Y-m-d H:i:s'); |
|
| 267 | $qb |
|
| 268 | ->andWhere('p.update_date >= :update_date_start') |
|
| 269 | ->setParameter('update_date_start', $date); |
|
| 270 | } |
|
| 271 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 272 | $date = clone $searchData['update_date_end']; |
|
| 273 | $date = $date |
|