Browse Source

Updated public

north 6 years ago
parent
commit
981e231dc9

+ 8 - 8
www/protected/commands/GetKennelDetailWorkCommand.php

@@ -30,25 +30,25 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
             $item->status = 2;
             $item->save();
         }
-        $type_name = '全部';
+        $type_name = 'all';
         $res=Service::factory('JRecordService')->push($parsedRows,$type_name,['start' => $start_time, 'end' => $end_time],1);
         $mail = Yii::app()->mailer;
         try {
             $mail->SMTPDebug = 2;                                 // Enable verbose debug output
             $mail->isSMTP();                                      // Set mailer to use SMTP
-            $mail->Host = 'smtp.qq.com';  // Specify main and backup SMTP servers
+            $mail->Host = 'smtp.163.com';  // Specify main and backup SMTP servers
             $mail->SMTPAuth = true;                               // Enable SMTP authentication
-            $mail->Username = '1340652578@qq.com';                 // SMTP username
-            $mail->Password = 'iaycligvfccmjdcf';                           // SMTP password
-            $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
+            $mail->Username = 'insur_zhq1@163.com';                 // SMTP username
+            $mail->Password = 'JgCoupon365';                           // SMTP password
+            $mail->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
             $mail->Port = 587;                                    // TCP port to connect to
 
-            $mail->setFrom('1340652578@qq.com', '巾帼家政');
-            $mail->AddAddress('1340652578@qq.com');
+            $mail->setFrom('insur_zhq1@163.com', 'JinGuo365');
+            $mail->AddAddress('sh.zhq@163.com');
             $mail->addAttachment(Yii::app()->basePath.'/export/'.$res);         // Add attachments
 
             $mail->isHTML(true);                                  // Set email format to HTML
-            $mail->Subject = '提货记录';
+            $mail->Subject = 'Pick up record';
             $mail->Body    = $res;
             $mail->AltBody = $res;
 

BIN
www/protected/export/2018-09-13record-exportall.xls


BIN
www/protected/export/2018-09-13提货记录导出记录-全部.xls


+ 1 - 0
www/protected/services/JRecordService.php

@@ -77,6 +77,7 @@ class JRecordService extends Service
             $objWriter->save('php://output');
             exit;
         } else {
+            $name = date('Y-m-d').'record-export'.$type;
             $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
             $objWriter->save("./export/{$name}.xls");
             return "{$name}.xls";