Browse Source

検索条件の修正

develop
sosuke.iwabuchi 2 years ago
parent
commit
88ff717522
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php

+ 11
- 3
app/Repositories/Custom/HelloTechno/ReceiptIssuingOrderRepository.php View File

@@ -121,6 +121,10 @@ class ReceiptIssuingOrderRepository extends BaseRepository


// 運営会社 // 運営会社
$this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_CODE])); $this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_CODE]));
$customerCode = data_get($condition, static::CONDITION_CUSTOMER_CODE);
if ($customerCode) {
$table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_CODE]), $customerCode);
}
$customerName = data_get($condition, static::CONDITION_CUSTOMER_NAME); $customerName = data_get($condition, static::CONDITION_CUSTOMER_NAME);
if ($customerName) { if ($customerName) {
$table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_NAME]), 'like', "%{$customerName}%"); $table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_CUSTOMER_NAME]), 'like', "%{$customerName}%");
@@ -128,9 +132,13 @@ class ReceiptIssuingOrderRepository extends BaseRepository


// 駐車場 // 駐車場
$this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_MANAGEMENT_CODE])); $this->where($table, $condition, $this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_MANAGEMENT_CODE]));
$parkihngName = data_get($condition, static::CONDITION_PARKING_NAME);
if ($parkihngName) {
$table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_NAME]), 'like', "%{$parkihngName}%");
$parkingManagementCode = data_get($condition, static::CONDITION_PARKING_NAME);
if ($parkingManagementCode) {
$table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_MANAGEMENT_CODE]), $parkingManagementCode);
}
$parkingName = data_get($condition, static::CONDITION_PARKING_NAME);
if ($parkingName) {
$table->where($this->makeColumnName([static::TABLE_CUSTOM_ORDER, CustomOrder::COL_NAME_PARKING_NAME]), 'like', "%{$parkingName}%");
} }






Loading…
Cancel
Save