|
@@ -6,6 +6,8 @@ use app\admin\common\AdminController;
|
|
|
use app\common\state\MainState;
|
|
|
use think\facade\Db;
|
|
|
use app\enterprise\model\TalentTypeChange as ttcModel;
|
|
|
+use app\common\api\TalentConditionApi;
|
|
|
+use app\common\api\DictApi;
|
|
|
|
|
|
class TalentTypeChange extends AdminController {
|
|
|
|
|
@@ -76,29 +78,34 @@ class TalentTypeChange extends AdminController {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ $levelMap = DictApi::selectByParentCode("talent_arrange");
|
|
|
$count = ttcModel::where($where)->count();
|
|
|
$list = ttcModel::where($where)->limit($offset, $limit)->order("createTime {$order}")->select();
|
|
|
foreach ($list as $key => $item) {
|
|
|
if ($item["beforeCheckCompany"]) {
|
|
|
$list[$key]["beforeCheckCompanyName"] = getCacheById("Company", $item["beforeCheckCompany"]);
|
|
|
}
|
|
|
+ $list[$key]["oldTalentArrangeName"] = $levelMap[$item["oldTalentArrange"]];
|
|
|
+ $list[$key]["newTalentArrangeName"] = $levelMap[$item["newTalentArrange"]];
|
|
|
+ if ($item["oldIdentifyCondition"]) {
|
|
|
+ if (strlen($item["oldIdentifyCondition"]) == 19) {
|
|
|
+ $oldCondition = Db::table("un_identify_condition")->find($item["oldIdentifyCondition"]);
|
|
|
+ $list[$key]["oldIdentifyConditionCH"] = $oldCondition["name"];
|
|
|
+ } else {
|
|
|
+ $oldCondition = TalentConditionApi::getOne($item["oldIdentifyCondition"]);
|
|
|
+ $list[$key]["oldIdentifyConditionCH"] = $oldCondition["name"];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($item["newIdentifyCondition"]) {
|
|
|
+ if (strlen($item["newIdentifyCondition"]) == 19) {
|
|
|
+ $newCondition = Db::table("un_identify_condition")->find($item["newIdentifyCondition"]);
|
|
|
+ $list[$key]["newIdentifyConditionCH"] = $newCondition["name"];
|
|
|
+ } else {
|
|
|
+ $newCondition = TalentConditionApi::getOne($item["newIdentifyCondition"]);
|
|
|
+ $list[$key]["newIdentifyConditionCH"] = $newCondition["name"];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- //获取字典表人才层次
|
|
|
- /* List<Dict> levellist = this . dictService . selectByParentCode(DictConst . UN_TALENTLEVEL);
|
|
|
- List<Dict> typelist = this . dictService . selectByParentCode(DictConst . UN_JBT_TALENTTYPE);
|
|
|
- Map<String, String> levelMap = FengStringUtil . dictList2Map(levellist);
|
|
|
- Map<String, String> typeMap = FengStringUtil . dictList2Map(typelist);
|
|
|
- //将认定条件id转为文本
|
|
|
- Map<String, String> icmap = this.identifyConditionService.selectListForMap(new EntityWrapper<IdentifyCondition>().eq("type", ShiroKit.getUser().getType()));
|
|
|
- for (TalentTypeChange info : page.getRecords()) {
|
|
|
- //将人才层次code转换为中文
|
|
|
- info . setOldTalentArrangeName(levelMap . get(info . getOldTalentArrange()));
|
|
|
- info . setNewTalentArrangeName(levelMap . get(info . getNewTalentArrange()));
|
|
|
- info . setOldIdentifyConditionCH(icmap . get(info . getOldIdentifyCondition()));
|
|
|
- info . setNewIdentifyConditionCH(icmap . get(info . getNewIdentifyCondition()));
|
|
|
- }
|
|
|
- *
|
|
|
- */
|
|
|
return json(["rows" => $list, "total" => $count]);
|
|
|
}
|
|
|
|