|
|
@@ -25,12 +25,15 @@ import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
|
import kd.bos.servicehelper.user.UserServiceHelper;
|
|
|
import kd.bos.url.UrlService;
|
|
|
import kd.bos.workflow.engine.msg.info.MessageInfo;
|
|
|
+import kd.drp.mdr.common.enums.Enable;
|
|
|
import kd.hr.hbp.business.servicehelper.HRBaseServiceHelper;
|
|
|
import kd.hr.hbp.business.servicehelper.HRQueryEntityHelper;
|
|
|
+import kd.hr.hbp.common.constants.history.HisModelDataStatusEnum;
|
|
|
import kd.hr.hbp.common.util.HRDateTimeUtils;
|
|
|
import kd.hr.hbp.common.util.HRObjectUtils;
|
|
|
import kd.sdk.hr.hrpi.business.helper.HRPIEmployeeServiceHelper;
|
|
|
import nckd.jxccl.base.common.utils.QueryFieldBuilder;
|
|
|
+import nckd.jxccl.base.entity.helper.EntityHelper;
|
|
|
import nckd.jxccl.base.org.helper.OrgHelper;
|
|
|
import nckd.jxccl.base.orm.helper.QFilterCommonHelper;
|
|
|
import nckd.jxccl.hr.sdm.common.SanDingConstant;
|
|
|
@@ -109,7 +112,11 @@ public class SendTaskOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
// 获取 所有单位BOID
|
|
|
Set<Long> companyBoIds = entryDyoColl.stream().map(entryDyo -> entryDyo.getLong(companyBoIdKey)).collect(Collectors.toSet());
|
|
|
// 获取 所有岗位数据
|
|
|
- QFilter qFilter = new QFilter(String.join(".", SanDingConstant.ADMINORG, SanDingConstant.BELONGCOMPANY_KEY, SanDingConstant.BOID_KEY), QCP.in, companyBoIds).and(QFilterCommonHelper.getCurrentVersionFilter());
|
|
|
+ QFilter qFilter = new QFilter(String.join(".", SanDingConstant.ADMINORG, SanDingConstant.BELONGCOMPANY_KEY, SanDingConstant.BOID_KEY), QCP.in, companyBoIds)
|
|
|
+ .and(QFilterCommonHelper.getCurrentVersionFilter())
|
|
|
+ .and(SanDingConstant.DATA_STATUS, QCP.equals, HisModelDataStatusEnum.EFFECTING.getStatus())
|
|
|
+ .and(SanDingConstant.ENABLE, QCP.equals, EnableEnum.YES.getCode())
|
|
|
+ .and(SanDingConstant.ISSTANDARDPOS_KEY, QCP.equals, EnableEnum.NO.getCode());
|
|
|
// 查询 BOID、行政组织、行政组织.所属公司
|
|
|
String queryFields = QueryFieldBuilder.create()
|
|
|
.add(SanDingConstant.BOID_KEY)
|
|
|
@@ -328,9 +335,9 @@ public class SendTaskOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
// 岗位BOID
|
|
|
Long positionBoId = positionOrgMap.get("positionBoId");
|
|
|
// 设置 组织
|
|
|
- sanDingTaskEntryDyo.set(SanDingConstant.NCKD_ADMINORG, positionOrgMap.get("adminOrgSourceVid"));
|
|
|
+ sanDingTaskEntryDyo.set(SanDingConstant.NCKD_ADMINORG, EntityHelper.newEntity(SanDingConstant.ADMINORGHR_ENTITYID, positionOrgMap.get("adminOrgSourceVid")));
|
|
|
// 设置 岗位
|
|
|
- sanDingTaskEntryDyo.set(SanDingConstant.NCKD_POSITION_KEY, positionOrgMap.get("positionSourceVid"));
|
|
|
+ sanDingTaskEntryDyo.set(SanDingConstant.NCKD_POSITION_KEY, EntityHelper.newEntity(SanDingConstant.HBPM_POSITIONHR, positionOrgMap.get("positionSourceVid")));
|
|
|
// 设置 定员数
|
|
|
sanDingTaskEntryDyo.set(SanDingConstant.NCKD_AUTHORIZEDSTRENGTH_KEY, lastSanDingTaskMap.getOrDefault(entryDyo.getLong(companyBoIdKey)+"@"+positionBoId, 0));
|
|
|
// 设置 实际占编人数
|