function Toend() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; if (strpos("[UD]", $_RESULT->GetField("RowST")) >= 1) { $Fo002 = $_RESULT->GetField("f_wire_1507142038_002_OLD"); $Fn002 = $_RESULT->GetField("f_wire_1507142038_002"); $Fo004 = $_RESULT->GetField("f_wire_1507142038_004_OLD"); $Fn004 = $_RESULT->GetField("f_wire_1507142038_004"); $cUSql = "update t_wire_1507142038 set "; $cUSql .= $Fo002 != "" ? "f_wire_1507142038_002=replace(f_wire_1507142038_002,\"" . $Fo002 . "\",\"" . $Fn002 . "\")," : ""; $cUSql .= $Fo002 != "" ? "f_wire_1507142038_005=replace(f_wire_1507142038_005,\"" . $Fo002 . "\",\"" . $Fn002 . "\") " : ""; $cUSql .= $Fo002 != "" && $Fo004 != "" ? "," : ""; $cUSql .= $Fo004 != "" ? "f_wire_1507142038_004=replace(f_wire_1507142038_004,\"" . $Fo004 . "\",\"" . $Fn004 . "\") " : ""; $cUSql .= "where f_wire_1507142038_002 like \"" . ($Fo002 != "" ? $Fo002 : $Fn002) . ".%\""; $cDSql = "delete from t_wire_1507142038 where f_wire_1507142038_002 like \"" . ($Fo002 != "" ? $Fo002 : $Fn002) . ".%\""; if ($_RESULT->GetField("RowST") == "U") { array_push($_OBJECT["DB"]->Querys, $cUSql); } if ($_RESULT->GetField("RowST") == "D") { array_push($_OBJECT["DB"]->Querys, $cDSql); } $_OBJECT["DB"]->FillBatch(); } return parent::Toend(); }
function Toend() { $_OBJECT =& $this->APPObj; $_IMPORT =& $this->IMPORT; $_RESULT =& $this->Result; $cCSql = ""; //用户分组统计更新SQL if (strpos("[ID]", $_RESULT->GetField("RowST")) >= 1) { foreach ($_RESULT->Resgrd as $iKey => $iVal) { $cOpe = $_RESULT->GetField("RowST") == "D" ? "-1" : "+1"; if (strpos("[ID]", $_RESULT->GetField("RowST")) >= 1) { $cCSql = "UPDATE t_wire_1507142038 SET f_wire_1507142038_006=f_wire_1507142038_006" . $cOpe; $cCSql .= " WHERE f_wire_1507142038_P01 IN('" . str_replace(".", "','", $iVal["f_wire_1506031750_E02"]) . "');"; array_push($_OBJECT["DB"]->Querys, $cCSql); } } $_OBJECT["DB"]->FillBatch(); } return parent::Toend(); }