|
|
@@ -254,6 +254,7 @@ class report {
|
|
|
$access_type = common::check_input($_POST['access_type']);
|
|
|
$party_ids = $_POST['party_ids'];
|
|
|
$group_names = $_POST['group_names'];
|
|
|
+ $system_account = $_POST['system_account'];
|
|
|
|
|
|
//单独处理字段id
|
|
|
$fieldsList = $_POST['fieldsList'];
|
|
|
@@ -294,6 +295,10 @@ class report {
|
|
|
$ids_filed = common::toPgTextArrayLiteral($field_ids);
|
|
|
$updateSqlSet.= ", field_ids = $ids_filed";
|
|
|
}
|
|
|
+ if (!empty($system_account)) {
|
|
|
+ $system_account_filed = common::toPgTextArrayLiteral($system_account);
|
|
|
+ $updateSqlSet.= ", system_account = $system_account_filed";
|
|
|
+ }
|
|
|
//代表update
|
|
|
$sql .= "update public.kln_report_template set ".$updateSqlSet."
|
|
|
where serial_no = '$serial_no';";
|
|
|
@@ -313,13 +318,18 @@ class report {
|
|
|
$ids_filed = common::toPgTextArrayLiteral($field_ids);
|
|
|
}
|
|
|
|
|
|
+ $system_account_filed = "NULL";
|
|
|
+ if (!empty($system_account)) {
|
|
|
+ $system_account_filed = common::toPgTextArrayLiteral($system_account);
|
|
|
+ }
|
|
|
+
|
|
|
$serial_no = common::uuid();
|
|
|
$sql .= "INSERT INTO public.kln_report_template(
|
|
|
serial_no,name, description, level, field_ids, access_type, report_sql,count_sql,
|
|
|
- party_ids, group_names, create_by, created_time, modify_by, update_time )
|
|
|
+ party_ids, group_names, system_account, create_by, created_time, modify_by, update_time )
|
|
|
VALUES ('$serial_no','$name', '$description', '$level', $ids_filed, '$access_type',
|
|
|
'".common::check_input($report_sql_data['sql'])."','".common::check_input($report_sql_data['count_sql'])."',
|
|
|
- $party_ids_filed, $group_names_filed , '"._getLoginName()."', now(), '"._getLoginName()."', now());";
|
|
|
+ $party_ids_filed, $group_names_filed ,$system_account_filed,'"._getLoginName()."', now(), '"._getLoginName()."', now());";
|
|
|
}
|
|
|
//先删除,后添加
|
|
|
$sql .= "delete from public.kln_report_field_config where template_serial_no = '$serial_no';";
|
|
|
@@ -483,7 +493,6 @@ class report {
|
|
|
$report_sql = str_replace('<{CustomFiled}>', $CustomFiled, $report_sql);
|
|
|
$report_sql = str_replace('<{vvSearchKLN}>', $filterSQLArr['vvSearchKLN'], $report_sql);
|
|
|
$report_sql = str_replace('<{orderby}>', $this->returnSortBySql(), $report_sql);
|
|
|
- error_log($reportFiled['name'].": report_detail_search, ".$report_sql);
|
|
|
|
|
|
//查询data
|
|
|
$cp = common::check_input($_POST ['cp']); //current_page
|
|
|
@@ -501,6 +510,7 @@ class report {
|
|
|
if ($rc > 0) {
|
|
|
$tmp_search_without_limit = $report_sql;
|
|
|
$report_sql .= " limit " . $ps . " offset " . ($cp - 1) * $ps;
|
|
|
+ error_log($reportFiled['name'].": report_detail_search, ".$report_sql);
|
|
|
|
|
|
$rs = common::excuteListSql($report_sql);
|
|
|
$arrTmp = array('searchData' => $rs,
|
|
|
@@ -748,7 +758,6 @@ class report {
|
|
|
$report_sql = str_replace('<{CustomFiled}>', $CustomFiled, $report_sql);
|
|
|
$report_sql = str_replace('<{vvSearchKLN}>', " ", $report_sql);
|
|
|
$report_sql = str_replace('<{orderby}>', $orderby, $report_sql);
|
|
|
- error_log($schedule_search['name'].": report_schedule_search, ".$report_sql);
|
|
|
|
|
|
//查询sql
|
|
|
$cp = common::check_input($_POST ['cp']); //current_page
|
|
|
@@ -766,6 +775,7 @@ class report {
|
|
|
if ($rc > 0) {
|
|
|
$tmp_search_without_limit = $report_sql;
|
|
|
$report_sql .= " limit " . $ps . " offset " . ($cp - 1) * $ps;
|
|
|
+ error_log($schedule_search['name'].": report_schedule_search, ".$report_sql);
|
|
|
|
|
|
$rs = common::excuteListSql($report_sql);
|
|
|
$arrTmp = array('searchData' => $rs,
|