数据下发调试

qifengyuze
zhaocheng 5 years ago
parent fb1ca27dd7
commit b49fb911eb
  1. 116
      frontend/controllers/DatabaseController.php
  2. 6
      frontend/views/database/a-index.php
  3. 8
      frontend/views/database/b-index.php
  4. 8
      frontend/views/database/c-index.php
  5. 8
      frontend/views/database/d-index.php

@ -61,10 +61,10 @@ class DatabaseController extends BaseController
$register_end = $request->post('register_end');
$insurer1_begin = $request->post('insurer1_begin');
$insurer1_end = $request->post('insurer1_end');
$insurer1_month = $request->post('insurer1_month');
$insurer1_day = $request->post('insurer1_day');
$insurer1_month1 = $request->post('insurer1_month1');
$insurer1_day1 = $request->post('insurer1_day1');
$insurer1_month = $request->post('insurer_month_begin');
$insurer1_day = $request->post('insurer_day_begin');
$insurer1_month1 = $request->post('insurer_month_end');
$insurer1_day1 = $request->post('insurer_day_end');
$b_lib = $request->post('b_lib');
$c_lib = $request->post('c_lib');
$d_lib = $request->post('d_lib');
@ -89,10 +89,10 @@ class DatabaseController extends BaseController
$register_end = $request->get('register_end');
$insurer1_begin = $request->get('insurer1_begin');
$insurer1_end = $request->get('insurer1_end');
$insurer1_month = $request->get('insurer1_month');
$insurer1_day = $request->get('insurer1_day');
$insurer1_month1 = $request->get('insurer1_month1');
$insurer1_day1 = $request->get('insurer1_day1');
$insurer1_month = $request->get('insurer_month_begin');
$insurer1_day = $request->get('insurer_day_begin');
$insurer1_month1 = $request->get('insurer_month_end');
$insurer1_day1 = $request->get('insurer_day_end');
$b_lib = $request->get('b_lib');
$c_lib = $request->get('c_lib');
$d_lib = $request->get('d_lib');
@ -186,17 +186,19 @@ class DatabaseController extends BaseController
if($insurer1_end != '') {
$query->andWhere('insurer1_date<="'.$insurer1_end.'"');
}
if($insurer1_month != '') {
$query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
}
if($insurer1_day != '') {
$query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
if($insurer1_month != '' && $insurer1_day == '') {
$query = $query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
} else if ($insurer1_month == '' && $insurer1_day != '') {
$query = $query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
} else if ($insurer1_month != '' && $insurer1_day != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") >= "' . substr('0' . $insurer1_month, -2) . '-' . substr('0' . $insurer1_day, -2) . '"');
}
if($insurer1_month1 != '') {
$query->andWhere('month(car_t.insurer1_date)<="'.$insurer1_month1.'"');
}
if($insurer1_day1 != '') {
$query->andWhere('day(car_t.insurer1_date)<="'.$insurer1_day1.'"');
if($insurer1_month1 != '' && $insurer1_day1 == '') {
$query = $query->andWhere('month(car_t.insurer1_date) <="'.$insurer1_month1.'"');
} else if ($insurer1_month1 == '' && $insurer1_day1 != '') {
$query = $query->andWhere('day(car_t.insurer1_date) <="'.$insurer1_day1.'"');
} else if ($insurer1_month1 != '' && $insurer1_day1 != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") <= "' . substr('0' . $insurer1_month1, -2) . '-' . substr('0' . $insurer1_day1, -2) . '"');
}
if($clean_right != '') {
$query->andWhere('car_t.clean_right="'.$clean_right.'"');
@ -1051,10 +1053,10 @@ class DatabaseController extends BaseController
$print_end = $request->post('print_end');
$insurer1_begin = $request->post('insurer1_begin');
$insurer1_end = $request->post('insurer1_end');
$insurer1_month = $request->post('insurer1_month');
$insurer1_day = $request->post('insurer1_day');
$insurer1_month1 = $request->post('insurer1_month1');
$insurer1_day1 = $request->post('insurer1_day1');
$insurer1_month = $request->post('insurer_month_begin');
$insurer1_day = $request->post('insurer_day_begin');
$insurer1_month1 = $request->post('insurer_month_end');
$insurer1_day1 = $request->post('insurer_day_end');
$status = $request->post('status');
$username = $request->post('username');
@ -1072,10 +1074,10 @@ class DatabaseController extends BaseController
$print_end = $request->get('print_end');
$insurer1_begin = $request->get('insurer1_begin');
$insurer1_end = $request->get('insurer1_end');
$insurer1_month = $request->get('insurer1_month');
$insurer1_day = $request->get('insurer1_day');
$insurer1_month1 = $request->get('insurer1_month1');
$insurer1_day1 = $request->get('insurer1_day1');
$insurer1_month = $request->get('insurer_month_begin');
$insurer1_day = $request->get('insurer_day_begin');
$insurer1_month1 = $request->get('insurer_month_end');
$insurer1_day1 = $request->get('insurer_day_end');
$status = $request->get('status');
$username = $request->get('username');
@ -1110,17 +1112,19 @@ class DatabaseController extends BaseController
if($insurer1_end != '') {
$query->andWhere('car_t.insurer1_date<="'.$insurer1_end.'"');
}
if($insurer1_month != '') {
$query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
if($insurer1_month != '' && $insurer1_day == '') {
$query = $query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
} else if ($insurer1_month == '' && $insurer1_day != '') {
$query = $query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
} else if ($insurer1_month != '' && $insurer1_day != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") >= "' . substr('0' . $insurer1_month, -2) . '-' . substr('0' . $insurer1_day, -2) . '"');
}
if($insurer1_day != '') {
$query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
}
if($insurer1_month1 != '') {
$query->andWhere('month(car_t.insurer1_date)<="'.$insurer1_month1.'"');
}
if($insurer1_day1 != '') {
$query->andWhere('day(car_t.insurer1_date)<="'.$insurer1_day1.'"');
if($insurer1_month1 != '' && $insurer1_day1 == '') {
$query = $query->andWhere('month(car_t.insurer1_date) <="'.$insurer1_month1.'"');
} else if ($insurer1_month1 == '' && $insurer1_day1 != '') {
$query = $query->andWhere('day(car_t.insurer1_date) <="'.$insurer1_day1.'"');
} else if ($insurer1_month1 != '' && $insurer1_day1 != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") <= "' . substr('0' . $insurer1_month1, -2) . '-' . substr('0' . $insurer1_day1, -2) . '"');
}
if($status == 1) {
@ -1743,10 +1747,10 @@ class DatabaseController extends BaseController
$car_no = $request->post('car_no');
$insurer1_begin = $request->post('insurer1_begin');
$insurer1_end = $request->post('insurer1_end');
$insurer1_month = $request->post('insurer1_month');
$insurer1_day = $request->post('insurer1_day');
$insurer1_month1 = $request->post('insurer1_month1');
$insurer1_day1 = $request->post('insurer1_day1');
$insurer1_month = $request->post('insurer_month_begin');
$insurer1_day = $request->post('insurer_day_begin');
$insurer1_month1 = $request->post('insurer_month_end');
$insurer1_day1 = $request->post('insurer_day_end');
$status = $request->post('status');
$username = $request->post('username');
$sort_key = $request->post('sort_key');
@ -1761,10 +1765,10 @@ class DatabaseController extends BaseController
$car_no = $request->get('car_no');
$insurer1_begin = $request->get('insurer1_begin');
$insurer1_end = $request->get('insurer1_end');
$insurer1_month = $request->get('insurer1_month');
$insurer1_day = $request->get('insurer1_day');
$insurer1_month1 = $request->get('insurer1_month1');
$insurer1_day1 = $request->get('insurer1_day1');
$insurer1_month = $request->get('insurer_month_begin');
$insurer1_day = $request->get('insurer_day_begin');
$insurer1_month1 = $request->get('insurer_month_end');
$insurer1_day1 = $request->get('insurer_day_end');
$status = $request->get('status');
$username = $request->get('username');
$sort_key = $request->get('sort_key');
@ -1810,17 +1814,19 @@ class DatabaseController extends BaseController
if($insurer1_end != '') {
$query->andWhere('car_t.insurer1_date<="'.$insurer1_end.'"');
}
if($insurer1_month != '') {
$query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
}
if($insurer1_day != '') {
$query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
}
if($insurer1_month1 != '') {
$query->andWhere('month(car_t.insurer1_date)<="'.$insurer1_month1.'"');
}
if($insurer1_day1 != '') {
$query->andWhere('day(car_t.insurer1_date)<="'.$insurer1_day1.'"');
if($insurer1_month != '' && $insurer1_day == '') {
$query = $query->andWhere('month(car_t.insurer1_date)>="'.$insurer1_month.'"');
} else if ($insurer1_month == '' && $insurer1_day != '') {
$query = $query->andWhere('day(car_t.insurer1_date)>="'.$insurer1_day.'"');
} else if ($insurer1_month != '' && $insurer1_day != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") >= "' . substr('0' . $insurer1_month, -2) . '-' . substr('0' . $insurer1_day, -2) . '"');
}
if($insurer1_month1 != '' && $insurer1_day1 == '') {
$query = $query->andWhere('month(car_t.insurer1_date) <="'.$insurer1_month1.'"');
} else if ($insurer1_month1 == '' && $insurer1_day1 != '') {
$query = $query->andWhere('day(car_t.insurer1_date) <="'.$insurer1_day1.'"');
} else if ($insurer1_month1 != '' && $insurer1_day1 != '') {
$query = $query->andWhere('DATE_FORMAT(car_t.insurer1_date,"%m-%d") <= "' . substr('0' . $insurer1_month1, -2) . '-' . substr('0' . $insurer1_day1, -2) . '"');
}
if($status == 1) {
$query->andWhere('car_d_t.user_id=0');

@ -55,9 +55,11 @@ use \common\libs\MyLib;
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker2">保险日期</label>
<div class="input-group input-daterange" id="datepicker2">
<input type="text" class="input-sm form-control" id="insurer1_begin" name="insurer1_begin" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_month_begin" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_begin" value="" autocomplete="off" />
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="insurer1_end" name="insurer1_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_month_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_end" value="" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">

@ -39,10 +39,12 @@ use \common\libs\MyLib;
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker2">保险日期</label>
<div class="input-daterange input-group" id="datepicker2">
<input type="text" class="input-sm form-control" id="insurer1_begin" name="insurer1_begin" value="" autocomplete="off" />
<div class="input-group input-daterange" id="datepicker2">
<input type="text" class="input-sm form-control" name="insurer_month_begin" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_begin" value="" autocomplete="off" />
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="insurer1_end" name="insurer1_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_month_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_end" value="" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">

@ -39,10 +39,12 @@ use \common\libs\MyLib;
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker2">保险日期</label>
<div class="input-daterange input-group" id="datepicker2">
<input type="text" class="input-sm form-control" id="insurer1_begin" name="insurer1_begin" value="" autocomplete="off" />
<div class="input-group input-daterange" id="datepicker2">
<input type="text" class="input-sm form-control" name="insurer_month_begin" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_begin" value="" autocomplete="off" />
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="insurer1_end" name="insurer1_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_month_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_end" value="" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">

@ -31,10 +31,12 @@ use \common\libs\MyLib;
</div>
<div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker2">保险日期</label>
<div class="input-daterange input-group" id="datepicker2">
<input type="text" class="input-sm form-control" id="insurer1_begin" name="insurer1_begin" value="" autocomplete="off" />
<div class="input-group input-daterange" id="datepicker2">
<input type="text" class="input-sm form-control" name="insurer_month_begin" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_begin" value="" autocomplete="off" />
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" id="insurer1_end" name="insurer1_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_month_end" value="" autocomplete="off" />
<input type="text" class="input-sm form-control" name="insurer_day_end" value="" autocomplete="off" />
</div>
</div>
<div class="form-group" style="margin-bottom: 8px;">

Loading…
Cancel
Save