|
@@ -226,9 +226,11 @@ class report {
|
|
|
$description = common::check_input($_POST['report_description']);
|
|
$description = common::check_input($_POST['report_description']);
|
|
|
$level = common::check_input($_POST['report_level']);
|
|
$level = common::check_input($_POST['report_level']);
|
|
|
$access_type = common::check_input($_POST['access_type']);
|
|
$access_type = common::check_input($_POST['access_type']);
|
|
|
- $party_ids = $_POST['party_ids'];
|
|
|
|
|
- $group_names = $_POST['group_names'];
|
|
|
|
|
- $system_account = $_POST['system_account'];
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //Specific Roles 和 对应有值的时候,才取,否则取空数组更新
|
|
|
|
|
+ $party_ids = $access_type == "Specific Roles" && !empty($_POST['party_ids']) ? $_POST['party_ids'] : array();
|
|
|
|
|
+ $group_names = $access_type == "Specific Roles" && !empty($_POST['group_names']) ? $_POST['group_names'] : array();
|
|
|
|
|
+ $system_account = $access_type == "Specific Roles" && !empty($_POST['system_account']) ? $_POST['system_account'] : array();
|
|
|
|
|
|
|
|
//单独处理字段id
|
|
//单独处理字段id
|
|
|
$fieldsList = $_POST['fieldsList'];
|
|
$fieldsList = $_POST['fieldsList'];
|
|
@@ -257,18 +259,16 @@ class report {
|
|
|
if (!empty($access_type)) {
|
|
if (!empty($access_type)) {
|
|
|
$updateSqlSet.= ", access_type = '$access_type' ";
|
|
$updateSqlSet.= ", access_type = '$access_type' ";
|
|
|
}
|
|
}
|
|
|
- if (!empty($party_ids)) {
|
|
|
|
|
- $party_ids_filed= common::toPgTextArrayLiteral($party_ids);
|
|
|
|
|
- $updateSqlSet.= ", party_ids = $party_ids_filed";
|
|
|
|
|
- }
|
|
|
|
|
- if (!empty($group_names)) {
|
|
|
|
|
- $group_names_filed = common::toPgTextArrayLiteral($group_names);
|
|
|
|
|
- $updateSqlSet.= ", group_names = $group_names_filed";
|
|
|
|
|
- }
|
|
|
|
|
- if (!empty($field_ids)) {
|
|
|
|
|
- $ids_filed = common::toPgTextArrayLiteral($field_ids);
|
|
|
|
|
- $updateSqlSet.= ", field_ids = $ids_filed";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $party_ids_filed= common::toPgTextArrayLiteral($party_ids);
|
|
|
|
|
+ $updateSqlSet.= ", party_ids = $party_ids_filed";
|
|
|
|
|
+
|
|
|
|
|
+ $group_names_filed = common::toPgTextArrayLiteral($group_names);
|
|
|
|
|
+ $updateSqlSet.= ", group_names = $group_names_filed";
|
|
|
|
|
+
|
|
|
|
|
+ $ids_filed = common::toPgTextArrayLiteral($field_ids);
|
|
|
|
|
+ $updateSqlSet.= ", field_ids = $ids_filed";
|
|
|
|
|
+
|
|
|
if (!empty($system_account)) {
|
|
if (!empty($system_account)) {
|
|
|
$system_account_filed = common::toPgTextArrayLiteral($system_account);
|
|
$system_account_filed = common::toPgTextArrayLiteral($system_account);
|
|
|
$updateSqlSet.= ", system_account = $system_account_filed";
|
|
$updateSqlSet.= ", system_account = $system_account_filed";
|