コード例 #1
0
ファイル: ActPusher.php プロジェクト: jocoonopa/lubri
 protected function getInsertProcQuery(PosMemberImportContent $content)
 {
     $sql = "exec dbo.sp_InsertHBMember ";
     $sql .= "{$this->getWrapVal($content->serno)}";
     $sql .= ", {$this->getWrapVal($content->code)}";
     $sql .= ", {$this->getWrapVal($content->sernoi)}";
     $sql .= ",{$this->getWrapVal($content->name)},";
     $sql .= "'" . Import::FEMALE_SEX_TEXT . "'" === $this->getWrapVal($content->sex) ? '0' : '1';
     $sql .= ",{$this->getWrapVal($content->birthday)}";
     $sql .= ",{$this->getWrapVal($content->hometel)}";
     $sql .= ",{$this->getWrapVal($content->officetel)}";
     $sql .= ",{$this->getWrapVal($content->cellphone)}";
     $sql .= ",{$this->getWrapVal($content->email)}";
     $sql .= ",{$this->getWrapVal($content->getZipcode())}";
     $sql .= ",{$this->getWrapVal($content->getCityName())}";
     $sql .= ",{$this->getWrapVal($content->getStateName())}";
     $sql .= ",{$this->getWrapVal($content->homeaddress)}";
     $sql .= ",{$this->getWrapVal($content->category)}";
     $sql .= ",{$this->getWrapVal($content->salepoint_serno)}";
     $sql .= ",{$this->getWrapVal($content->employee_serno)}";
     $sql .= ",{$this->getWrapVal($content->exploit_serno)}";
     $sql .= ",{$this->getWrapVal($content->exploit_emp_serno)}";
     $sql .= ",{$this->getWrapVal($content->distinction)}";
     $sql .= ",{$this->getWrapVal($content->member_level_ec)}";
     $sql .= ",{$this->getWrapVal($content->employ_code)}";
     $sql .= ",{$this->getWrapVal($content->memo)}";
     return $sql;
 }
コード例 #2
0
 protected function getRowDataFromContent(PosMemberImportContent $content)
 {
     $row = [$content->serno, $content->code, $content->pos_member_import_task->category, $content->pos_member_import_task->distinction, $content->name, $content->birthday, $content->getZipcode(), $content->getCityName(), $content->getStateName(), $content->homeaddress, $content->cellphone, $content->hometel, $content->officetel, $content->email, $content->period_at, $content->hospital, $content->memo];
     return array_merge($row, array_values($this->getContentFlags($content)));
 }