public function updateByImport($importData = null) { $d2 = $importData; if ($d2 == null) { $d2 = $this->getImportInfo(); } //获取部门编号 $dept = new Dept($this->conn, $this->conn_im); $d_r = $dept->getIdByName($d2["eno"], trim($d2["dept_id"])); $deptId = ""; if (!empty($d_r)) { $deptId = $d_r["deptid"]; } if (!empty($d2["mobile"])) { $sql = "update we_staff set dept_id=?,duty=?,mobile=?,mobile_bind=?,sex_id=?,work_phone=? where login_account=?"; $this->conn->ExecSql($sql, array((string) $deptId, (string) $d2["duty"], (string) $d2["mobile"], (string) $d2["mobile"], (string) $d2["sex_id"], (string) $d2["work_phone"], $this->account)); } else { $sql = "update we_staff set dept_id=?,duty=?,sex_id=?,work_phone=? where login_account=?"; $this->conn->ExecSql($sql, array((string) $deptId, (string) $d2["duty"], (string) $d2["sex_id"], (string) $d2["work_phone"], $this->account)); } if (!empty($d_r)) { $empInfo = $this->getInfo(); $sql = "update im_employee set deptid=? where loginname=?"; $this->conn_im->ExecSql($sql, array((string) $d_r["fafa_deptid"], $empInfo["fafa_jid"])); //更新IM库 $this->conn_im->ExecSQL("call dept_emp_stat(?)", array((string) $d2["eno"])); } }