修复数据选择错误

This commit is contained in:
wlx 2014-06-23 03:23:26 +00:00
parent 4e8f3ff414
commit bb1ca45def
1 changed files with 1 additions and 13 deletions

View File

@ -312,17 +312,7 @@ class Order
public function pdfPrint($formData,$userid = 0,$save = false,$returnpdf = false)
{
$sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d
RIGHT JOIN normalmetadata m ON d.uuid=m.uuid
WHERE d.status=2 AND d.userid=?";
$list = $this->db->fetchAll($sql,array($userid));
foreach($list as $i=>$row){
@$formData['heihelist'].=($i+1).". ".$row['title'].";";
}
$sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d
RIGHT JOIN normalmetadata m ON d.uuid=m.uuid WHERE d.uuid not in (select uuid from normalmetadata) AND d.status=2 AND d.userid=?";
RIGHT JOIN normalmetadata m ON d.uuid=m.uuid WHERE d.status=2 AND d.userid=?";
$list = $this->db->fetchAll($sql,array($userid));
foreach($list as $i=>$row){
@ -333,12 +323,10 @@ class Order
$pdf->template = $this->config->offline->template;
$pdf->heihetemplate = $this->config->offline->heihetemplate;
$formData['project'].='['.$formData['project_title'].' | '.$formData['project_type'].' | '.$formData['project_id'].' | ' . $formData['project_leader'] . ']';
$pdf->data = $formData;
if (isset($formData['westdclist'])) $pdf->drawWestdc();
if (isset($formData['heihelist'])) $pdf->drawHeihe();
$pdf->addRef($this->pdfData);
$pdf->addSelection($this->pdfData);