|
@@ -773,6 +773,12 @@ class Talent extends AdminController {
|
|
|
Db::startTrans();
|
|
|
$talent_max_no = [];
|
|
|
$user = $this->user;
|
|
|
+ $_prefix_type = "";
|
|
|
+ switch ($user["type"]) {
|
|
|
+ case 2:
|
|
|
+ $_prefix_type = "IC";
|
|
|
+ break;
|
|
|
+ }
|
|
|
try {
|
|
|
$talent_list = VerifyApi::getListByIds($ids);
|
|
|
$year = date("Y");
|
|
@@ -782,7 +788,8 @@ class Talent extends AdminController {
|
|
|
return json(["msg" => "只能对公布通过的对象发放人才码,请核查待发放人才码名单后再重新发放人才码"]);
|
|
|
}
|
|
|
|
|
|
- $no_prefix = $year . $talent_info["talent_arrange"];
|
|
|
+ $no_prefix = $_prefix_type . $year . $talent_info["talent_arrange"];
|
|
|
+ $where = [];
|
|
|
$where[] = ["certificateNo", "like", $no_prefix . "%"];
|
|
|
$max_no = $talent_max_no[$talent_info["talent_arrange"]] ?: Db::table("new_talent_info")->where($where)->max("certificateNo");
|
|
|
if (!$max_no) {
|