|
|
@@ -2,6 +2,7 @@ package nckd.jxccl.base.wtc.helper;
|
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
+import kd.bos.dataentity.utils.ObjectUtils;
|
|
|
import kd.bos.logging.Log;
|
|
|
import kd.bos.logging.LogFactory;
|
|
|
import kd.bos.orm.query.QCP;
|
|
|
@@ -28,6 +29,7 @@ public class WTCHelper {
|
|
|
/* 工作流角色 */
|
|
|
public static final HRBaseServiceHelper WFROLE_HELPER = new HRBaseServiceHelper("wf_role");
|
|
|
public static final HRBaseServiceHelper VAAPPLY_HELPER = new HRBaseServiceHelper("wtabm_vaapply");
|
|
|
+ public static final HRBaseServiceHelper PARTYPOSH_HELPER = new HRBaseServiceHelper("nckd_hrpi_partyposh");
|
|
|
|
|
|
/**
|
|
|
* 根据考勤档案ID获取二级单位编码
|
|
|
@@ -209,5 +211,18 @@ public class WTCHelper {
|
|
|
return subPositionDyns.stream().map(dyn -> dyn.getLong("id")).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 根据员工ID获取职务层级
|
|
|
+ * 员工档案-党政职务变更履历-职务层级
|
|
|
+ * @param employeeId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static String getZwcjByEmployeeId(Long employeeId) {
|
|
|
+ QFilter filter = new QFilter("employee.id", QCP.equals, employeeId);
|
|
|
+ filter.and("startdate", QCP.less_equals, new Date());
|
|
|
+ filter.and("enddate", QCP.large_equals, new Date());
|
|
|
+ String selectFields = "nckd_posgrade.name";
|
|
|
+ DynamicObject dyn = PARTYPOSH_HELPER.queryOriginalOne(selectFields, filter.toArray());
|
|
|
+ return ObjectUtils.isEmpty(dyn)? null : dyn.getString("nckd_posgrade.name");
|
|
|
+ }
|
|
|
}
|