|
@@ -1528,28 +1528,28 @@ class Talent extends EnterpriseController {
|
|
if ($type == ProjectState::QUIT) {
|
|
if ($type == ProjectState::QUIT) {
|
|
$_where = [];
|
|
$_where = [];
|
|
$_where[] = ["checkState", "not in", [3]];
|
|
$_where[] = ["checkState", "not in", [3]];
|
|
- $talentIds = Db::table("un_talent_quit")->where($_where)->column("talentId");
|
|
|
|
- $sList = array_merge($sList, (array) $talentIds);
|
|
|
|
|
|
+ $idCards = Db::table("un_talent_quit")->where($_where)->column("idCard");
|
|
|
|
+ $sList = array_merge($sList, (array) $idCards);
|
|
$where[] = ["active", "=", 1];
|
|
$where[] = ["active", "=", 1];
|
|
}
|
|
}
|
|
if ($type == ProjectState::BANKCHANGE) {
|
|
if ($type == ProjectState::BANKCHANGE) {
|
|
$_where = [];
|
|
$_where = [];
|
|
$_where[] = ["checkState", "not in", [3]];
|
|
$_where[] = ["checkState", "not in", [3]];
|
|
- $talentIds = Db::table("un_talent_bank_change")->where($_where)->column("talentId");
|
|
|
|
- $sList = array_merge($sList, (array) $talentIds);
|
|
|
|
|
|
+ $idCards = Db::table("un_talent_bank_change")->where($_where)->column("idCard");
|
|
|
|
+ $sList = array_merge($sList, (array) $idCards);
|
|
}
|
|
}
|
|
if ($type == ProjectState::LEVELCHANGE) {
|
|
if ($type == ProjectState::LEVELCHANGE) {
|
|
$_where = [];
|
|
$_where = [];
|
|
$_where[] = ["checkState", "not in", [35, -1]];
|
|
$_where[] = ["checkState", "not in", [35, -1]];
|
|
$_where[] = ["isPublic", "<", 5];
|
|
$_where[] = ["isPublic", "<", 5];
|
|
- $talentIds = Db::table("un_talent_type_change")->where($_where)->column("talentId");
|
|
|
|
- $sList = array_merge($sList, (array) $talentIds);
|
|
|
|
|
|
+ $idCards = Db::table("un_talent_type_change")->where($_where)->column("idCard");
|
|
|
|
+ $sList = array_merge($sList, (array) $idCards);
|
|
}
|
|
}
|
|
$where[] = ["enterprise_id", "=", $this->user["uid"]];
|
|
$where[] = ["enterprise_id", "=", $this->user["uid"]];
|
|
$where[] = ["checkState", "=", TalentState::CERTIFICATED];
|
|
$where[] = ["checkState", "=", TalentState::CERTIFICATED];
|
|
$where[] = ["isEffect", "<>", 4];
|
|
$where[] = ["isEffect", "<>", 4];
|
|
if ($sList) {
|
|
if ($sList) {
|
|
- $where[] = ["id", "not in", $sList];
|
|
|
|
|
|
+ $where[] = ["card_number", "not in", $sList];
|
|
}
|
|
}
|
|
$result = TalentModel::where($where)->field("id,name")->select()->toArray();
|
|
$result = TalentModel::where($where)->field("id,name")->select()->toArray();
|
|
return json($result);
|
|
return json($result);
|
|
@@ -1561,34 +1561,39 @@ class Talent extends EnterpriseController {
|
|
$type = $this->request->param('type');
|
|
$type = $this->request->param('type');
|
|
if ($type == ProjectState::QUIT) {
|
|
if ($type == ProjectState::QUIT) {
|
|
$info = Db::table("un_talent_quit")->where("id", $id)->find();
|
|
$info = Db::table("un_talent_quit")->where("id", $id)->find();
|
|
- $where[] = ["id", "=", $info["talentId"]];
|
|
|
|
}
|
|
}
|
|
if ($type == ProjectState::LEVELCHANGE) {
|
|
if ($type == ProjectState::LEVELCHANGE) {
|
|
$info = Db::table("un_talent_type_change")->where("id", $id)->find();
|
|
$info = Db::table("un_talent_type_change")->where("id", $id)->find();
|
|
- $where[] = ["id", "=", $info["talentId"]];
|
|
|
|
}
|
|
}
|
|
if ($type == ProjectState::BANKCHANGE) {
|
|
if ($type == ProjectState::BANKCHANGE) {
|
|
$info = Db::table("un_talent_bank_change")->where("id", $id)->find();
|
|
$info = Db::table("un_talent_bank_change")->where("id", $id)->find();
|
|
|
|
+ }
|
|
|
|
+ if (strlen($info["talentId"]) == 19) {
|
|
|
|
+ $where[] = ["enterprise_id", "=", $this->user["uid"]];
|
|
|
|
+ $where[] = ["card_number", "=", $info["idCard"]];
|
|
|
|
+ $where[] = ["delete", "=", 0];
|
|
|
|
+ $where[] = ["checkState", "=", TalentState::CERTIFICATED];
|
|
|
|
+ } else {
|
|
$where[] = ["id", "=", $info["talentId"]];
|
|
$where[] = ["id", "=", $info["talentId"]];
|
|
}
|
|
}
|
|
$result = TalentModel::where($where)->field("id,name")->select()->toArray();
|
|
$result = TalentModel::where($where)->field("id,name")->select()->toArray();
|
|
return json($result);
|
|
return json($result);
|
|
}
|
|
}
|
|
-
|
|
|
|
- public function getTalentBasicById(){
|
|
|
|
|
|
+
|
|
|
|
+ public function getTalentBasicById() {
|
|
$id = $this->request["id"];
|
|
$id = $this->request["id"];
|
|
$ti = \app\common\api\VerifyApi::getTalentInfoById($id);
|
|
$ti = \app\common\api\VerifyApi::getTalentInfoById($id);
|
|
- /*if(FengStringUtil.isNotEmpAndNull(year)){
|
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
|
- List<TalentAllowancecontractDetail> contractDetailList = new ArrayList<>(); //保存上一年度的工作单位
|
|
|
|
- TalentAllowanceInfo info = new TalentAllowanceInfo();
|
|
|
|
- info.setType(ti.getType());
|
|
|
|
- info.setYear(year);
|
|
|
|
- info.setFirstInJJTime(ti.getFirstInJJTime());
|
|
|
|
- ApiTalentAllowanceController.getConcatList(ti,info,year,sb,contractDetailList);
|
|
|
|
- int active = AllowanceSelectUtil.validMyqy(contractDetailList,ti,info);
|
|
|
|
- ti.setActive(active);
|
|
|
|
- }*/
|
|
|
|
|
|
+ /* if(FengStringUtil.isNotEmpAndNull(year)){
|
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
|
+ List<TalentAllowancecontractDetail> contractDetailList = new ArrayList<>(); //保存上一年度的工作单位
|
|
|
|
+ TalentAllowanceInfo info = new TalentAllowanceInfo();
|
|
|
|
+ info.setType(ti.getType());
|
|
|
|
+ info.setYear(year);
|
|
|
|
+ info.setFirstInJJTime(ti.getFirstInJJTime());
|
|
|
|
+ ApiTalentAllowanceController.getConcatList(ti,info,year,sb,contractDetailList);
|
|
|
|
+ int active = AllowanceSelectUtil.validMyqy(contractDetailList,ti,info);
|
|
|
|
+ ti.setActive(active);
|
|
|
|
+ } */
|
|
return $ti;
|
|
return $ti;
|
|
}
|
|
}
|
|
|
|
|