|
|
@@ -1146,146 +1146,175 @@ class MainController extends DooController {
|
|
|
$statisticsGet = array_reverse ( $statisticsGet );
|
|
|
$statisticsDay = array_reverse ( $statisticsDay );
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// /
|
|
|
- $districtCondition = "";
|
|
|
- $topDistrict = $district->get_lvByid ( 0, 0 );
|
|
|
- if (! empty ( $sid )) {
|
|
|
- $s = $staff->getOne ( array (
|
|
|
- 'where' => ' sid=' . $sid,
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
-
|
|
|
- $l = $lcategory->find ( array (
|
|
|
- 'where' => ' cid in(' . $s ['cid'] . ')',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- if (! empty ( $s ['othercid'] ))
|
|
|
- $l = $lcategory->find ( array (
|
|
|
- 'where' => ' cid in(' . $s ['cid'] . ',' . $s ['othercid'] . ')',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
-
|
|
|
- if (! empty ( $districtH )) {
|
|
|
- $districtCondition = " and districtid like '" . $districtH . ",%'";
|
|
|
- $sidCondition = "";
|
|
|
- $topDistrict = $district->find ( array (
|
|
|
- 'where' => ' upid=' . $districtH,
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- } else {
|
|
|
- $districtCondition = " and districtid like '" . $l [0] ['districtid'] . ",%'";
|
|
|
- $sidCondition = "";
|
|
|
- $topDistrict = $district->find ( array (
|
|
|
- 'where' => ' upid=' . $l [0] ['districtid'],
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- }
|
|
|
+// $districtCondition = "";
|
|
|
+// $topDistrict = $district->get_lvByid ( 0, 0 );
|
|
|
+// if (! empty ( $sid )) {
|
|
|
+// $s = $staff->getOne ( array (
|
|
|
+// 'where' => ' sid=' . $sid,
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+
|
|
|
+// $l = $lcategory->find ( array (
|
|
|
+// 'where' => ' cid in(' . $s ['cid'] . ')',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+// if (! empty ( $s ['othercid'] ))
|
|
|
+// $l = $lcategory->find ( array (
|
|
|
+// 'where' => ' cid in(' . $s ['cid'] . ',' . $s ['othercid'] . ')',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
|
|
|
- $str = array ();
|
|
|
- foreach ( $l as $value ) {
|
|
|
- array_push ( $str, $value ['districtid'] );
|
|
|
- }
|
|
|
- $str = implode ( ",", $str );
|
|
|
- $data ['districtHtml'] = $district->find ( array (
|
|
|
- 'where' => ' id in (' . $str . ')',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- $data ['districtH'] = $l [0] ['districtid'];
|
|
|
- if (! empty ( $districtH ))
|
|
|
- $data ['districtH'] = $districtH;
|
|
|
- }
|
|
|
+// if (! empty ( $districtH )) {
|
|
|
+// $districtCondition = " and districtid like '" . $districtH . ",%'";
|
|
|
+// $sidCondition = "";
|
|
|
+// $topDistrict = $district->find ( array (
|
|
|
+// 'where' => ' upid=' . $districtH,
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+// } else {
|
|
|
+// $districtCondition = " and districtid like '" . $l [0] ['districtid'] . ",%'";
|
|
|
+// $sidCondition = "";
|
|
|
+// $topDistrict = $district->find ( array (
|
|
|
+// 'where' => ' upid=' . $l [0] ['districtid'],
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+// }
|
|
|
+
|
|
|
+// $str = array ();
|
|
|
+// foreach ( $l as $value ) {
|
|
|
+// array_push ( $str, $value ['districtid'] );
|
|
|
+// }
|
|
|
+// $str = implode ( ",", $str );
|
|
|
+// $data ['districtHtml'] = $district->find ( array (
|
|
|
+// 'where' => ' id in (' . $str . ')',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+// $data ['districtH'] = $l [0] ['districtid'];
|
|
|
+// if (! empty ( $districtH ))
|
|
|
+// $data ['districtH'] = $districtH;
|
|
|
+// }
|
|
|
|
|
|
// Year(updatetime)=".date('Y')." and Month(updatetime)=".date('m')." and
|
|
|
- if (! empty ( $sid ))
|
|
|
- $districtClient = $action_log->find ( array (
|
|
|
- 'select' => 'city,province,COUNT(*) as count',
|
|
|
- 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
- 'groupby' => 'province',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
- else
|
|
|
- $districtClient = $action_log->find ( array (
|
|
|
- 'select' => 'city,province,COUNT(*) as count',
|
|
|
- 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
- 'groupby' => 'city',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
-
|
|
|
- $statisticsLend = array ();
|
|
|
- $statisticsCompany = array ();
|
|
|
-
|
|
|
- if (! empty ( $sid )) {
|
|
|
- foreach ( $topDistrict as $value ) {
|
|
|
- $falgLend = $falgLongle = true;
|
|
|
- foreach ( $districtClient as $v ) {
|
|
|
+// if (! empty ( $sid ))
|
|
|
+// $districtClient = $action_log->find ( array (
|
|
|
+// 'select' => 'city,province,COUNT(*) as count',
|
|
|
+// 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
+// 'groupby' => 'province',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+// else
|
|
|
+// $districtClient = $action_log->find ( array (
|
|
|
+// 'select' => 'city,province,COUNT(*) as count',
|
|
|
+// 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
+// 'groupby' => 'city',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// $statisticsLend = array ();
|
|
|
+// if (! empty ( $sid )) {
|
|
|
+// foreach ( $topDistrict as $value ) {
|
|
|
+// $falgLend = $falgLongle = true;
|
|
|
+// foreach ( $districtClient as $v ) {
|
|
|
|
|
|
- if ($value ['name'] == $v ['province']) {
|
|
|
- array_push ( $statisticsLend, array (
|
|
|
- 'value' => $v ['count'],
|
|
|
- 'name' => $value ['name']
|
|
|
- ) );
|
|
|
- $falgLend = false;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($falgLend)
|
|
|
- array_push ( $statisticsLend, array (
|
|
|
- 'value' => 0,
|
|
|
- 'name' => $value ['name']
|
|
|
- ) );
|
|
|
- }
|
|
|
- } else {
|
|
|
- foreach ( $topDistrict as $value ) {
|
|
|
- $falgLend = $falgLongle = true;
|
|
|
- foreach ( $districtClient as $v ) {
|
|
|
+// if ($value ['name'] == $v ['province']) {
|
|
|
+// array_push ( $statisticsLend, array (
|
|
|
+// 'value' => $v ['count'],
|
|
|
+// 'name' => $value ['name']
|
|
|
+// ) );
|
|
|
+// $falgLend = false;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if ($falgLend)
|
|
|
+// array_push ( $statisticsLend, array (
|
|
|
+// 'value' => 0,
|
|
|
+// 'name' => $value ['name']
|
|
|
+// ) );
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// foreach ( $topDistrict as $value ) {
|
|
|
+// $falgLend = $falgLongle = true;
|
|
|
+// foreach ( $districtClient as $v ) {
|
|
|
|
|
|
- if ($value ['name'] == $v ['city']) {
|
|
|
- array_push ( $statisticsLend, array (
|
|
|
- 'value' => $v ['count'],
|
|
|
- 'name' => $value ['name']
|
|
|
- ) );
|
|
|
- $falgLend = false;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($falgLend)
|
|
|
- array_push ( $statisticsLend, array (
|
|
|
- 'value' => 0,
|
|
|
- 'name' => $value ['name']
|
|
|
- ) );
|
|
|
- }
|
|
|
- }
|
|
|
+// if ($value ['name'] == $v ['city']) {
|
|
|
+// array_push ( $statisticsLend, array (
|
|
|
+// 'value' => $v ['count'],
|
|
|
+// 'name' => $value ['name']
|
|
|
+// ) );
|
|
|
+// $falgLend = false;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if ($falgLend)
|
|
|
+// array_push ( $statisticsLend, array (
|
|
|
+// 'value' => 0,
|
|
|
+// 'name' => $value ['name']
|
|
|
+// ) );
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// print_r($statisticsLend);die;
|
|
|
- $natureList = $action_log->find ( array (
|
|
|
- 'select' => 'cid, COUNT(*) as count,nature',
|
|
|
- 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . " and nature !=''" . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
- 'groupby' => 'nature',
|
|
|
- 'asArray' => true
|
|
|
- ) );
|
|
|
+// $natureList = $action_log->find ( array (
|
|
|
+// 'select' => 'cid, COUNT(*) as count,nature',
|
|
|
+// 'where' => " date_sub(curdate(), INTERVAL 30 DAY) <= date(updatetime) and status=" . $status . " and nature !=''" . $categoryCondition . $sidCondition . $districtCondition,
|
|
|
+// 'groupby' => 'nature',
|
|
|
+// 'asArray' => true
|
|
|
+// ) );
|
|
|
+
|
|
|
+// $statisticsNature = array ();
|
|
|
+// foreach ( $this->nature as $value ) {
|
|
|
+// $flagNature = true;
|
|
|
+// foreach ( $natureList as $v ) {
|
|
|
+// if ($value == $v ['nature']) {
|
|
|
+// array_push ( $statisticsNature, array (
|
|
|
+// 'value' => $v ['count'],
|
|
|
+// 'name' => $value
|
|
|
+// ) );
|
|
|
+// $flagNature = false;
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if ($flagNature)
|
|
|
+// array_push ( $statisticsNature, array (
|
|
|
+// 'value' => 0,
|
|
|
+// 'name' => $value
|
|
|
+// ) );
|
|
|
+// }
|
|
|
+// $data ['statisticsNature'] = json_encode ( $statisticsNature );
|
|
|
|
|
|
- $statisticsNature = array ();
|
|
|
- foreach ( $this->nature as $value ) {
|
|
|
- $flagNature = true;
|
|
|
- foreach ( $natureList as $v ) {
|
|
|
- if ($value == $v ['nature']) {
|
|
|
- array_push ( $statisticsNature, array (
|
|
|
- 'value' => $v ['count'],
|
|
|
- 'name' => $value
|
|
|
- ) );
|
|
|
- $flagNature = false;
|
|
|
- break;
|
|
|
+ // print_r($statisticsLend);die;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// $data ['statisticsLend'] = json_encode ( $statisticsLend );
|
|
|
+
|
|
|
+ $dateHtml = "";
|
|
|
+ if(empty($year)){
|
|
|
+ $year= date ( "Y" );
|
|
|
+ }
|
|
|
+ $now = date ( "Y" );
|
|
|
+ for($YEARD = 2050; $YEARD >= 2019; $YEARD --) {
|
|
|
+
|
|
|
+ if ($YEARD <= $now) {
|
|
|
+ $dateHtml .= '<option ';
|
|
|
+ if ($year == $YEARD) {
|
|
|
+ $dateHtml .= 'selected ';
|
|
|
}
|
|
|
+ $dateHtml .= 'value="' . $YEARD . '">' . $YEARD . '</option>';
|
|
|
}
|
|
|
- if ($flagNature)
|
|
|
- array_push ( $statisticsNature, array (
|
|
|
- 'value' => 0,
|
|
|
- 'name' => $value
|
|
|
- ) );
|
|
|
}
|
|
|
- $data ['statisticsNature'] = json_encode ( $statisticsNature );
|
|
|
+ $data ['dateHtml'] = $dateHtml;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- // print_r($statisticsLend);die;
|
|
|
- $data ['statisticsLend'] = json_encode ( $statisticsLend );
|
|
|
|
|
|
$data ['status'] = $status;
|
|
|
$data ['statisticsDay'] = json_encode ( $statisticsDay );
|
|
|
@@ -4922,12 +4951,16 @@ class MainController extends DooController {
|
|
|
$dhtml = "";
|
|
|
$yhtml = "";
|
|
|
|
|
|
- for($year = 2020; $year >= 2004; $year --) {
|
|
|
- if (date ( "Y" ) == $year)
|
|
|
- $yhtml .= '<option selected value="' . $year . '">' . $year . '年</option>';
|
|
|
- else
|
|
|
- $yhtml .= '<option value="' . $year . '">' . $year . '年</option>';
|
|
|
- }
|
|
|
+ require "protected/class/comm_cld.php";
|
|
|
+ $yhtml=GetYear();
|
|
|
+// for($year = 2020; $year >= 2004; $year --) {
|
|
|
+
|
|
|
+// if (date ( "Y" ) == $year){
|
|
|
+// $yhtml .= '<option selected value="' . $year . '">' . $year . '年</option>';
|
|
|
+// }else{
|
|
|
+// $yhtml .= '<option value="' . $year . '">' . $year . '年</option>';
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
for($month = 1; $month <= 12; $month ++) {
|
|
|
if (date ( "m" ) == $month)
|