|
@@ -180,8 +180,10 @@ class Study extends Backend |
|
@@ -180,8 +180,10 @@ class Study extends Backend |
180
|
}
|
180
|
}
|
181
|
$result = $this->model->allowField(true)->save($params);
|
181
|
$result = $this->model->allowField(true)->save($params);
|
182
|
$id = $this->model->id;
|
182
|
$id = $this->model->id;
|
183
|
- $brpath = Resource::StudyBar($id);
|
|
|
184
|
- $this->model->save(['barcode'=>$brpath],['id'=>$id]);
|
183
|
+ $unique = time();
|
|
|
184
|
+ $brpath = Resource::StudyBar($unique);
|
|
|
185
|
+ $time = date('YmdHi',time());
|
|
|
186
|
+ $this->model->save(['barcode'=>$brpath],['sno'=>$time],['id'=>$id]);
|
185
|
Db::commit();
|
187
|
Db::commit();
|
186
|
} catch (ValidateException|PDOException|Exception $e) {
|
188
|
} catch (ValidateException|PDOException|Exception $e) {
|
187
|
Db::rollback();
|
189
|
Db::rollback();
|