| @@ 189-194 (lines=6) @@ | ||
| 186 | } |
|
| 187 | ||
| 188 | // oreder_date |
|
| 189 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 190 | $date = $searchData['order_date_start']; |
|
| 191 | $qb |
|
| 192 | ->andWhere('o.create_date >= :order_date_start') |
|
| 193 | ->setParameter('order_date_start', $date); |
|
| 194 | } |
|
| 195 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 196 | $date = clone $searchData['order_date_end']; |
|
| 197 | $date = $date |
|
| @@ 195-202 (lines=8) @@ | ||
| 192 | ->andWhere('o.create_date >= :order_date_start') |
|
| 193 | ->setParameter('order_date_start', $date); |
|
| 194 | } |
|
| 195 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 196 | $date = clone $searchData['order_date_end']; |
|
| 197 | $date = $date |
|
| 198 | ->modify('+1 days'); |
|
| 199 | $qb |
|
| 200 | ->andWhere('o.create_date < :order_date_end') |
|
| 201 | ->setParameter('order_date_end', $date); |
|
| 202 | } |
|
| 203 | ||
| 204 | // create_date |
|
| 205 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 205-210 (lines=6) @@ | ||
| 202 | } |
|
| 203 | ||
| 204 | // create_date |
|
| 205 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 206 | $date = $searchData['update_date_start']; |
|
| 207 | $qb |
|
| 208 | ->andWhere('o.update_date >= :update_date_start') |
|
| 209 | ->setParameter('update_date_start', $date); |
|
| 210 | } |
|
| 211 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 212 | $date = clone $searchData['update_date_end']; |
|
| 213 | $date = $date |
|
| @@ 211-218 (lines=8) @@ | ||
| 208 | ->andWhere('o.update_date >= :update_date_start') |
|
| 209 | ->setParameter('update_date_start', $date); |
|
| 210 | } |
|
| 211 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 212 | $date = clone $searchData['update_date_end']; |
|
| 213 | $date = $date |
|
| 214 | ->modify('+1 days'); |
|
| 215 | $qb |
|
| 216 | ->andWhere('o.update_date < :update_date_end') |
|
| 217 | ->setParameter('update_date_end', $date); |
|
| 218 | } |
|
| 219 | ||
| 220 | // payment_total |
|
| 221 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|
| @@ 369-374 (lines=6) @@ | ||
| 366 | } |
|
| 367 | ||
| 368 | // oreder_date |
|
| 369 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 370 | $date = $searchData['order_date_start']; |
|
| 371 | $qb |
|
| 372 | ->andWhere('o.order_date >= :order_date_start') |
|
| 373 | ->setParameter('order_date_start', $date); |
|
| 374 | } |
|
| 375 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 376 | $date = clone $searchData['order_date_end']; |
|
| 377 | $date = $date |
|
| @@ 375-382 (lines=8) @@ | ||
| 372 | ->andWhere('o.order_date >= :order_date_start') |
|
| 373 | ->setParameter('order_date_start', $date); |
|
| 374 | } |
|
| 375 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 376 | $date = clone $searchData['order_date_end']; |
|
| 377 | $date = $date |
|
| 378 | ->modify('+1 days'); |
|
| 379 | $qb |
|
| 380 | ->andWhere('o.order_date < :order_date_end') |
|
| 381 | ->setParameter('order_date_end', $date); |
|
| 382 | } |
|
| 383 | ||
| 384 | // payment_date |
|
| 385 | if (!empty($searchData['payment_date_start']) && $searchData['payment_date_start']) { |
|
| @@ 385-390 (lines=6) @@ | ||
| 382 | } |
|
| 383 | ||
| 384 | // payment_date |
|
| 385 | if (!empty($searchData['payment_date_start']) && $searchData['payment_date_start']) { |
|
| 386 | $date = $searchData['payment_date_start']; |
|
| 387 | $qb |
|
| 388 | ->andWhere('o.payment_date >= :payment_date_start') |
|
| 389 | ->setParameter('payment_date_start', $date); |
|
| 390 | } |
|
| 391 | if (!empty($searchData['payment_date_end']) && $searchData['payment_date_end']) { |
|
| 392 | $date = clone $searchData['payment_date_end']; |
|
| 393 | $date = $date |
|
| @@ 391-398 (lines=8) @@ | ||
| 388 | ->andWhere('o.payment_date >= :payment_date_start') |
|
| 389 | ->setParameter('payment_date_start', $date); |
|
| 390 | } |
|
| 391 | if (!empty($searchData['payment_date_end']) && $searchData['payment_date_end']) { |
|
| 392 | $date = clone $searchData['payment_date_end']; |
|
| 393 | $date = $date |
|
| 394 | ->modify('+1 days'); |
|
| 395 | $qb |
|
| 396 | ->andWhere('o.payment_date < :payment_date_end') |
|
| 397 | ->setParameter('payment_date_end', $date); |
|
| 398 | } |
|
| 399 | ||
| 400 | // update_date |
|
| 401 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 401-406 (lines=6) @@ | ||
| 398 | } |
|
| 399 | ||
| 400 | // update_date |
|
| 401 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 402 | $date = $searchData['update_date_start']; |
|
| 403 | $qb |
|
| 404 | ->andWhere('o.update_date >= :update_date_start') |
|
| 405 | ->setParameter('update_date_start', $date); |
|
| 406 | } |
|
| 407 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 408 | $date = clone $searchData['update_date_end']; |
|
| 409 | $date = $date |
|
| @@ 407-414 (lines=8) @@ | ||
| 404 | ->andWhere('o.update_date >= :update_date_start') |
|
| 405 | ->setParameter('update_date_start', $date); |
|
| 406 | } |
|
| 407 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 408 | $date = clone $searchData['update_date_end']; |
|
| 409 | $date = $date |
|
| 410 | ->modify('+1 days'); |
|
| 411 | $qb |
|
| 412 | ->andWhere('o.update_date < :update_date_end') |
|
| 413 | ->setParameter('update_date_end', $date); |
|
| 414 | } |
|
| 415 | ||
| 416 | // payment_total |
|
| 417 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|
| @@ 461-466 (lines=6) @@ | ||
| 458 | } |
|
| 459 | ||
| 460 | // お届け予定日(Shipping.delivery_date) |
|
| 461 | if (!empty($searchData['shipping_delivery_date_start']) && $searchData['shipping_delivery_date_start']) { |
|
| 462 | $date = $searchData['shipping_delivery_date_start']; |
|
| 463 | $qb |
|
| 464 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 465 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 466 | } |
|
| 467 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 468 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 469 | $date = $date |
|
| @@ 467-474 (lines=8) @@ | ||
| 464 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 465 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 466 | } |
|
| 467 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 468 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 469 | $date = $date |
|
| 470 | ->modify('+1 days'); |
|
| 471 | $qb |
|
| 472 | ->andWhere('s.shipping_delivery_date < :shipping_delivery_date_end') |
|
| 473 | ->setParameter('shipping_delivery_date_end', $date); |
|
| 474 | } |
|
| 475 | ||
| 476 | // Order By |
|
| 477 | $qb->orderBy('o.update_date', 'DESC'); |
|
| @@ 147-152 (lines=6) @@ | ||
| 144 | } |
|
| 145 | ||
| 146 | // oreder_date |
|
| 147 | if (!empty($searchData['order_date_start']) && $searchData['order_date_start']) { |
|
| 148 | $date = $searchData['order_date_start']; |
|
| 149 | $qb |
|
| 150 | ->andWhere('o.order_date >= :order_date_start') |
|
| 151 | ->setParameter('order_date_start', $date); |
|
| 152 | } |
|
| 153 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 154 | $date = clone $searchData['order_date_end']; |
|
| 155 | $date = $date |
|
| @@ 153-160 (lines=8) @@ | ||
| 150 | ->andWhere('o.order_date >= :order_date_start') |
|
| 151 | ->setParameter('order_date_start', $date); |
|
| 152 | } |
|
| 153 | if (!empty($searchData['order_date_end']) && $searchData['order_date_end']) { |
|
| 154 | $date = clone $searchData['order_date_end']; |
|
| 155 | $date = $date |
|
| 156 | ->modify('+1 days'); |
|
| 157 | $qb |
|
| 158 | ->andWhere('o.order_date < :order_date_end') |
|
| 159 | ->setParameter('order_date_end', $date); |
|
| 160 | } |
|
| 161 | ||
| 162 | // shipping_delivery_date |
|
| 163 | if (!empty($searchData['shipping_delivery_date_start']) && $searchData['shipping_delivery_date_start']) { |
|
| @@ 163-168 (lines=6) @@ | ||
| 160 | } |
|
| 161 | ||
| 162 | // shipping_delivery_date |
|
| 163 | if (!empty($searchData['shipping_delivery_date_start']) && $searchData['shipping_delivery_date_start']) { |
|
| 164 | $date = $searchData['shipping_delivery_date_start']; |
|
| 165 | $qb |
|
| 166 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 167 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 168 | } |
|
| 169 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 170 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 171 | $date = $date |
|
| @@ 169-176 (lines=8) @@ | ||
| 166 | ->andWhere('s.shipping_delivery_date >= :shipping_delivery_date_start') |
|
| 167 | ->setParameter('shipping_delivery_date_start', $date); |
|
| 168 | } |
|
| 169 | if (!empty($searchData['shipping_delivery_date_end']) && $searchData['shipping_delivery_date_end']) { |
|
| 170 | $date = clone $searchData['shipping_delivery_date_end']; |
|
| 171 | $date = $date |
|
| 172 | ->modify('+1 days'); |
|
| 173 | $qb |
|
| 174 | ->andWhere('s.shipping_delivery_date < :shipping_delivery_date_end') |
|
| 175 | ->setParameter('shipping_delivery_date_end', $date); |
|
| 176 | } |
|
| 177 | ||
| 178 | // shipping_date |
|
| 179 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| @@ 179-184 (lines=6) @@ | ||
| 176 | } |
|
| 177 | ||
| 178 | // shipping_date |
|
| 179 | if (!empty($searchData['shipping_date_start']) && $searchData['shipping_date_start']) { |
|
| 180 | $date = $searchData['shipping_date_start']; |
|
| 181 | $qb |
|
| 182 | ->andWhere('s.shipping_date >= :shipping_date_start') |
|
| 183 | ->setParameter('shipping_date_start', $date); |
|
| 184 | } |
|
| 185 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 186 | $date = clone $searchData['shipping_date_end']; |
|
| 187 | $date = $date |
|
| @@ 185-192 (lines=8) @@ | ||
| 182 | ->andWhere('s.shipping_date >= :shipping_date_start') |
|
| 183 | ->setParameter('shipping_date_start', $date); |
|
| 184 | } |
|
| 185 | if (!empty($searchData['shipping_date_end']) && $searchData['shipping_date_end']) { |
|
| 186 | $date = clone $searchData['shipping_date_end']; |
|
| 187 | $date = $date |
|
| 188 | ->modify('+1 days'); |
|
| 189 | $qb |
|
| 190 | ->andWhere('s.shipping_date < :shipping_date_end') |
|
| 191 | ->setParameter('shipping_date_end', $date); |
|
| 192 | } |
|
| 193 | ||
| 194 | // update_date |
|
| 195 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 195-200 (lines=6) @@ | ||
| 192 | } |
|
| 193 | ||
| 194 | // update_date |
|
| 195 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 196 | $date = $searchData['update_date_start']; |
|
| 197 | $qb |
|
| 198 | ->andWhere('s.update_date >= :update_date_start') |
|
| 199 | ->setParameter('update_date_start', $date); |
|
| 200 | } |
|
| 201 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 202 | $date = clone $searchData['update_date_end']; |
|
| 203 | $date = $date |
|
| @@ 201-208 (lines=8) @@ | ||
| 198 | ->andWhere('s.update_date >= :update_date_start') |
|
| 199 | ->setParameter('update_date_start', $date); |
|
| 200 | } |
|
| 201 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 202 | $date = clone $searchData['update_date_end']; |
|
| 203 | $date = $date |
|
| 204 | ->modify('+1 days'); |
|
| 205 | $qb |
|
| 206 | ->andWhere('s.update_date < :update_date_end') |
|
| 207 | ->setParameter('update_date_end', $date); |
|
| 208 | } |
|
| 209 | ||
| 210 | // payment_total |
|
| 211 | if (isset($searchData['payment_total_start']) && StringUtil::isNotBlank($searchData['payment_total_start'])) { |
|
| @@ 259-264 (lines=6) @@ | ||
| 256 | } |
|
| 257 | ||
| 258 | // crate_date |
|
| 259 | if (!empty($searchData['create_date_start']) && $searchData['create_date_start']) { |
|
| 260 | $date = $searchData['create_date_start']; |
|
| 261 | $qb |
|
| 262 | ->andWhere('p.create_date >= :create_date_start') |
|
| 263 | ->setParameter('create_date_start', $date); |
|
| 264 | } |
|
| 265 | ||
| 266 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 267 | $date = clone $searchData['create_date_end']; |
|
| @@ 266-273 (lines=8) @@ | ||
| 263 | ->setParameter('create_date_start', $date); |
|
| 264 | } |
|
| 265 | ||
| 266 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 267 | $date = clone $searchData['create_date_end']; |
|
| 268 | $date = $date |
|
| 269 | ->modify('+1 days'); |
|
| 270 | $qb |
|
| 271 | ->andWhere('p.create_date < :create_date_end') |
|
| 272 | ->setParameter('create_date_end', $date); |
|
| 273 | } |
|
| 274 | ||
| 275 | // update_date |
|
| 276 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 276-281 (lines=6) @@ | ||
| 273 | } |
|
| 274 | ||
| 275 | // update_date |
|
| 276 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| 277 | $date = $searchData['update_date_start']; |
|
| 278 | $qb |
|
| 279 | ->andWhere('p.update_date >= :update_date_start') |
|
| 280 | ->setParameter('update_date_start', $date); |
|
| 281 | } |
|
| 282 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 283 | $date = clone $searchData['update_date_end']; |
|
| 284 | $date = $date |
|
| @@ 282-289 (lines=8) @@ | ||
| 279 | ->andWhere('p.update_date >= :update_date_start') |
|
| 280 | ->setParameter('update_date_start', $date); |
|
| 281 | } |
|
| 282 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 283 | $date = clone $searchData['update_date_end']; |
|
| 284 | $date = $date |
|
| 285 | ->modify('+1 days'); |
|
| 286 | $qb |
|
| 287 | ->andWhere('p.update_date < :update_date_end') |
|
| 288 | ->setParameter('update_date_end', $date); |
|
| 289 | } |
|
| 290 | ||
| 291 | // Order By |
|
| 292 | $qb |
|
| @@ 145-151 (lines=7) @@ | ||
| 142 | ->andWhere('c.birth >= :birth_start') |
|
| 143 | ->setParameter('birth_start', $searchData['birth_start']); |
|
| 144 | } |
|
| 145 | if (!empty($searchData['birth_end']) && $searchData['birth_end']) { |
|
| 146 | $date = clone $searchData['birth_end']; |
|
| 147 | $date->modify('+1 days'); |
|
| 148 | $qb |
|
| 149 | ->andWhere('c.birth < :birth_end') |
|
| 150 | ->setParameter('birth_end', $date); |
|
| 151 | } |
|
| 152 | ||
| 153 | // tel |
|
| 154 | if (isset($searchData['phone_number']) && StringUtil::isNotBlank($searchData['phone_number'])) { |
|
| @@ 191-197 (lines=7) @@ | ||
| 188 | ->andWhere('c.create_date >= :create_date_start') |
|
| 189 | ->setParameter('create_date_start', $searchData['create_date_start']); |
|
| 190 | } |
|
| 191 | if (!empty($searchData['create_date_end']) && $searchData['create_date_end']) { |
|
| 192 | $date = clone $searchData['create_date_end']; |
|
| 193 | $date->modify('+1 days'); |
|
| 194 | $qb |
|
| 195 | ->andWhere('c.create_date < :create_date_end') |
|
| 196 | ->setParameter('create_date_end', $date); |
|
| 197 | } |
|
| 198 | ||
| 199 | // update_date |
|
| 200 | if (!empty($searchData['update_date_start']) && $searchData['update_date_start']) { |
|
| @@ 205-211 (lines=7) @@ | ||
| 202 | ->andWhere('c.update_date >= :update_date_start') |
|
| 203 | ->setParameter('update_date_start', $searchData['update_date_start']); |
|
| 204 | } |
|
| 205 | if (!empty($searchData['update_date_end']) && $searchData['update_date_end']) { |
|
| 206 | $date = clone $searchData['update_date_end']; |
|
| 207 | $date->modify('+1 days'); |
|
| 208 | $qb |
|
| 209 | ->andWhere('c.update_date < :update_date_end') |
|
| 210 | ->setParameter('update_date_end', $date); |
|
| 211 | } |
|
| 212 | ||
| 213 | // last_buy |
|
| 214 | if (!empty($searchData['last_buy_start']) && $searchData['last_buy_start']) { |
|
| @@ 219-225 (lines=7) @@ | ||
| 216 | ->andWhere('c.last_buy_date >= :last_buy_start') |
|
| 217 | ->setParameter('last_buy_start', $searchData['last_buy_start']); |
|
| 218 | } |
|
| 219 | if (!empty($searchData['last_buy_end']) && $searchData['last_buy_end']) { |
|
| 220 | $date = clone $searchData['last_buy_end']; |
|
| 221 | $date->modify('+1 days'); |
|
| 222 | $qb |
|
| 223 | ->andWhere('c.last_buy_date < :last_buy_end') |
|
| 224 | ->setParameter('last_buy_end', $date); |
|
| 225 | } |
|
| 226 | ||
| 227 | // status |
|
| 228 | if (!empty($searchData['customer_status']) && count($searchData['customer_status']) > 0) { |
|