|
@@ -4,6 +4,7 @@ import kd.bos.algo.DataSet;
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
import kd.bos.db.DBRoute;
|
|
import kd.bos.db.DBRoute;
|
|
|
|
+import kd.bos.entity.plugin.support.util.StringUtils;
|
|
import kd.bos.orm.ORM;
|
|
import kd.bos.orm.ORM;
|
|
import kd.bos.orm.query.QCP;
|
|
import kd.bos.orm.query.QCP;
|
|
import kd.bos.orm.query.QFilter;
|
|
import kd.bos.orm.query.QFilter;
|
|
@@ -18,7 +19,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
public class RecUtils {
|
|
public class RecUtils {
|
|
private static String appFile_entity = "tspr_appfile"; //应聘档案/候选人
|
|
private static String appFile_entity = "tspr_appfile"; //应聘档案/候选人
|
|
- private static String arfrsm_entity = "tstpm_arfrsm"; //应聘登记表
|
|
|
|
|
|
+ private static String arfrsm_entity = "tstpm_srscarfmrsm"; //应聘登记表
|
|
private static String casApply_entity = "nckd_casrecrapply"; //临时招聘申请
|
|
private static String casApply_entity = "nckd_casrecrapply"; //临时招聘申请
|
|
private static String yearApply_entity = "nckd_yearapply"; //年度招聘申请
|
|
private static String yearApply_entity = "nckd_yearapply"; //年度招聘申请
|
|
private static String applyEntry_entity = "entryentity"; //招聘申请分录标识
|
|
private static String applyEntry_entity = "entryentity"; //招聘申请分录标识
|
|
@@ -68,7 +69,7 @@ public class RecUtils {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 根据候选人管理ID 获取 临时/年度招聘申请分录的招聘部门和岗位
|
|
|
|
|
|
+ * 根据候选人管理ID 获取 临时/年度招聘申请分录的招聘部门、岗位和招聘需求负责人
|
|
* @param appFileId
|
|
* @param appFileId
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -77,15 +78,19 @@ public class RecUtils {
|
|
DynamicObject appFile = BusinessDataServiceHelper.loadSingle(appFileId, appFile_entity);
|
|
DynamicObject appFile = BusinessDataServiceHelper.loadSingle(appFileId, appFile_entity);
|
|
//获取应聘登记表ID
|
|
//获取应聘登记表ID
|
|
Long arfRsmId = appFile.getLong("arfrsm.id");
|
|
Long arfRsmId = appFile.getLong("arfrsm.id");
|
|
|
|
+ arfrsm_entity = "tstpm_srscarfmrsm";
|
|
DynamicObject arfRsm = BusinessDataServiceHelper.loadSingle(arfRsmId, arfrsm_entity);
|
|
DynamicObject arfRsm = BusinessDataServiceHelper.loadSingle(arfRsmId, arfrsm_entity);
|
|
String applyEntryId = arfRsm.getString("nckd_mokahcnum");
|
|
String applyEntryId = arfRsm.getString("nckd_mokahcnum");
|
|
- QFilter filter = new QFilter(applyEntry_entity + ".id", QCP.equals, applyEntryId);
|
|
|
|
- String selectFields = "entryentity.nckd_recruitorg.id,entryentity.nckd_recruitpost.id";
|
|
|
|
- if(QueryServiceHelper.exists(casApply_entity, applyEntryId)) {
|
|
|
|
- return QueryServiceHelper.queryOne(casApply_entity, selectFields, new QFilter[]{filter});
|
|
|
|
|
|
+ if(StringUtils.isEmpty(applyEntryId))
|
|
|
|
+ return null;
|
|
|
|
+ QFilter filter = new QFilter(applyEntry_entity + ".id", QCP.equals, Long.valueOf(applyEntryId));
|
|
|
|
+ String selectFields = "nckd_person.id,entryentity.nckd_recruitorg.id,entryentity.nckd_recruitpost.id";
|
|
|
|
+ QFilter[] filters = new QFilter[]{filter};
|
|
|
|
+ if(QueryServiceHelper.exists(casApply_entity, filters)) {
|
|
|
|
+ return QueryServiceHelper.queryOne(casApply_entity, selectFields, filters);
|
|
}
|
|
}
|
|
- else if(QueryServiceHelper.exists(yearApply_entity, applyEntryId)) {
|
|
|
|
- return QueryServiceHelper.queryOne(yearApply_entity, selectFields, new QFilter[]{filter});
|
|
|
|
|
|
+ else if(QueryServiceHelper.exists(yearApply_entity, filters)) {
|
|
|
|
+ return QueryServiceHelper.queryOne(yearApply_entity, selectFields, filters);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
return null;
|
|
return null;
|