|
@@ -1,10 +1,12 @@
|
|
|
package nckd.jxccl.base.sit.helper;
|
|
package nckd.jxccl.base.sit.helper;
|
|
|
|
|
|
|
|
|
|
+import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
import kd.bos.orm.query.QCP;
|
|
import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
import kd.bos.orm.query.QFilter;
|
|
|
import kd.hr.hbp.business.servicehelper.HRBaseServiceHelper;
|
|
import kd.hr.hbp.business.servicehelper.HRBaseServiceHelper;
|
|
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -34,7 +36,7 @@ public class SITHelper {
|
|
|
filter.and("empstagelatestrecord", QCP.equals, "1");
|
|
filter.and("empstagelatestrecord", QCP.equals, "1");
|
|
|
String selectFields = "employee.id, entrydate";
|
|
String selectFields = "employee.id, entrydate";
|
|
|
DynamicObjectCollection cols = EMPENTREL_HELPER.queryOriginalCollection(selectFields, filter.toArray());
|
|
DynamicObjectCollection cols = EMPENTREL_HELPER.queryOriginalCollection(selectFields, filter.toArray());
|
|
|
- return (Map<Long, Date>) cols.stream().collect(Collectors.toMap((obj) -> {
|
|
|
|
|
|
|
+ return (Map<Long, Date>) cols.stream().filter(obj -> obj.getDate("entrydate") != null).collect(Collectors.toMap((obj) -> {
|
|
|
return obj.getLong("employee.id");
|
|
return obj.getLong("employee.id");
|
|
|
}, (obj) -> {
|
|
}, (obj) -> {
|
|
|
return obj.getDate("entrydate");
|
|
return obj.getDate("entrydate");
|
|
@@ -55,7 +57,7 @@ public class SITHelper {
|
|
|
filter.and("iscurrentdata", QCP.equals, "1");
|
|
filter.and("iscurrentdata", QCP.equals, "1");
|
|
|
String selectFields = "employee.id, nckd_departdate";
|
|
String selectFields = "employee.id, nckd_departdate";
|
|
|
DynamicObjectCollection cols = PERSERLEN_HELPER.queryOriginalCollection(selectFields, filter.toArray());
|
|
DynamicObjectCollection cols = PERSERLEN_HELPER.queryOriginalCollection(selectFields, filter.toArray());
|
|
|
- return (Map<Long, Date>) cols.stream().collect(Collectors.toMap((obj) -> {
|
|
|
|
|
|
|
+ return (Map<Long, Date>) cols.stream().filter(obj -> obj.getDate("nckd_departdate") != null).collect(Collectors.toMap((obj) -> {
|
|
|
return obj.getLong("employee.id");
|
|
return obj.getLong("employee.id");
|
|
|
}, (obj) -> {
|
|
}, (obj) -> {
|
|
|
return obj.getDate("nckd_departdate");
|
|
return obj.getDate("nckd_departdate");
|
|
@@ -86,13 +88,13 @@ public class SITHelper {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 根据员工ID获取职称级别
|
|
|
|
|
|
|
+ * 根据员工ID获取职称级别ID
|
|
|
* 员工档案-职称信息-职称级别
|
|
* 员工档案-职称信息-职称级别
|
|
|
*
|
|
*
|
|
|
* @param employeeIds
|
|
* @param employeeIds
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public Map<Long, Long> getProtitleLevelByEmployeeID(List<Long> employeeIds) {
|
|
|
|
|
|
|
+ public Map<Long, Long> getProtitleLevelIdByEmployeeID(List<Long> employeeIds) {
|
|
|
QFilter filter = new QFilter("employee.id", QCP.in, employeeIds);
|
|
QFilter filter = new QFilter("employee.id", QCP.in, employeeIds);
|
|
|
filter.and("iscompany", QCP.equals, "1");
|
|
filter.and("iscompany", QCP.equals, "1");
|
|
|
String selectFields = "employee.id, prolevel.id";
|
|
String selectFields = "employee.id, prolevel.id";
|
|
@@ -105,4 +107,26 @@ public class SITHelper {
|
|
|
return k1;
|
|
return k1;
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据员工ID获取职称级别
|
|
|
|
|
+ * 员工档案-职称信息-职称级别
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param employeeIds
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public Map<Long, DynamicObject> getProtitleLevelDynByEmployeeID(List<Long> employeeIds) {
|
|
|
|
|
+ QFilter filter = new QFilter("employee.id", QCP.in, employeeIds);
|
|
|
|
|
+ filter.and("iscompany", QCP.equals, "1");
|
|
|
|
|
+ String selectFields = "employee.id, prolevel.name";
|
|
|
|
|
+ DynamicObject[] cols = PERPROTITLE_HELPER.load(selectFields, filter.toArray());
|
|
|
|
|
+ return (Map<Long, DynamicObject>) Arrays.stream(cols).collect(Collectors.toMap((obj) -> {
|
|
|
|
|
+ return obj.getLong("employee.id");
|
|
|
|
|
+ }, (obj) -> {
|
|
|
|
|
+ return obj.getDynamicObject("prolevel");
|
|
|
|
|
+ }, (k1, k2) -> {
|
|
|
|
|
+ return k1;
|
|
|
|
|
+ }));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|