正在显示
1 个修改的文件
包含
6 行增加
和
6 行删除
@@ -132,6 +132,12 @@ class Study extends Backend | @@ -132,6 +132,12 @@ class Study extends Backend | ||
132 | $row[$fieldArr[$k]] = $v; | 132 | $row[$fieldArr[$k]] = $v; |
133 | } | 133 | } |
134 | } | 134 | } |
135 | + $id = \db('study')->max('id'); | ||
136 | + $ids = $allRow+$id-1; | ||
137 | + $res = str_pad($ids,8,"0",STR_PAD_LEFT); | ||
138 | + $barpath = Resource::StudyBar($res); | ||
139 | + $row['barcode'] = $barpath; | ||
140 | + $row['unique'] = $res; | ||
135 | if ($row) { | 141 | if ($row) { |
136 | $insert[] = $row; | 142 | $insert[] = $row; |
137 | } | 143 | } |
@@ -160,12 +166,6 @@ class Study extends Backend | @@ -160,12 +166,6 @@ class Study extends Backend | ||
160 | } | 166 | } |
161 | } | 167 | } |
162 | } | 168 | } |
163 | - $id = \db('study')->max('id'); | ||
164 | - $ids = $allRow+$id-1; | ||
165 | - $res = str_pad($ids,8,"0",STR_PAD_LEFT); | ||
166 | - $barpath = Resource::StudyBar($res); | ||
167 | - $insert['barcode'] = $barpath; | ||
168 | - $insert['unique'] = $res; | ||
169 | $this->model->saveAll($insert); | 169 | $this->model->saveAll($insert); |
170 | } catch (PDOException $exception) { | 170 | } catch (PDOException $exception) { |
171 | $msg = $exception->getMessage(); | 171 | $msg = $exception->getMessage(); |
-
请 注册 或 登录 后发表评论