|
|
@@ -406,13 +406,18 @@ class User extends BaseController
|
|
|
return app('json')->fail("当前类型不能选择");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ //生成编码
|
|
|
$r = (new InfoAudit)->insertGetId($save);
|
|
|
- if(!$r){
|
|
|
+ if (!$r) {
|
|
|
return app('json')->fail("系统错误");
|
|
|
}
|
|
|
- $no = "MYJ".date("Ymd").$r;
|
|
|
- (new InfoAudit)->where("id",$r)->update(["no"=>$no]);
|
|
|
+ $exist = (new InfoAudit)->where('no', 'MYJ' . date("Ymd") . $r)->find();
|
|
|
+ if ($exist) {
|
|
|
+ $no = $exist['no'];
|
|
|
+ } else {
|
|
|
+ $no = "MYJ" . date("Ymd") . str_pad($r, 6, "0", STR_PAD_LEFT);
|
|
|
+ (new InfoAudit)->where("id", $r)->update(["no" => $no]);
|
|
|
+ }
|
|
|
return app('json')->success("提交成功,请耐心等待审核");
|
|
|
}
|
|
|
/**
|