1
0

2 Коммитууд 4b184fde62 ... 8b5de6174c

Эзэн SHA1 Мессеж Огноо
  jtd 8b5de6174c feat(hr): 增加岗位数据过滤条件并优化实体设置 1 долоо хоног өмнө
  jtd bbdfee4c2e fix(hr): 修复组织批量变更单据列表插件逻辑判断错误 1 долоо хоног өмнө

+ 2 - 0
code/base/nckd-jxccl-base-common/src/main/java/nckd/jxccl/base/common/constant/FormConstant.java

@@ -312,6 +312,8 @@ public class FormConstant {
     public static final String SOURCEDATA = "sourcedata";
     /**数据来源*/
     public static final String INITDATASOURCE = "initdatasource";
+    /** 是否标准岗位 */
+    public static final String ISSTANDARDPOS_KEY = "isstandardpos";
 
     /** 工具栏标识(二开)*/
     public static final String NCKD_TOOLBARAP = "nckd_toolbarap";

+ 1 - 1
code/hr/nckd-jxccl-hr/src/main/java/nckd/jxccl/hr/homs/plugin/form/orgbatch/OrgBatchChgBillListPlugin.java

@@ -155,7 +155,7 @@ public class OrgBatchChgBillListPlugin extends AbstractListPlugin {
 
         String actionId = closedCallBackEvent.getActionId();
         ListSelectedRowCollection returnData = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
-        if (returnData != null && returnData.size() > 0) {
+        if (returnData != null && returnData.isEmpty()) {
             return;
         }
 

+ 12 - 6
code/hr/nckd-jxccl-hr/src/main/java/nckd/jxccl/hr/sdm/plugin/operate/SendTaskOpPlugin.java

@@ -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;
@@ -38,6 +41,7 @@ import nckd.jxccl.hr.sdm.common.SanDingPlanEntryStatus;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -108,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)
@@ -327,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));
                 // 设置 实际占编人数
@@ -410,9 +418,7 @@ public class SendTaskOpPlugin extends AbstractOperationServicePlugIn {
         messageInfo.setTag("三定管理");
         long managerBoId = entryDyo.getDynamicObject(SanDingConstant.NCKD_MANAGER_KEY).getLong(SanDingConstant.BOID_KEY);
         // 设置 消息接收人
-//        List<Long> userIds = getUserIds(Collections.singletonList(managerBoId));
-        List<Long> userIds = new ArrayList<Long>();
-        userIds.add(2306610598445593600L);
+        List<Long> userIds = getUserIds(Collections.singletonList(managerBoId));
         messageInfo.setUserIds(userIds);
         // 设置 消息Web端url
         messageInfo.setContentUrl(UrlService.getDomainContextUrl() + "/index.html?formId="+SanDingConstant.NCKD_SANDINGTASK_ENTITY+"&pkId=" + SANDING_TASK_MAP.get(entryDyo.getLong(SanDingConstant.ID_KEY)));