Przeglądaj źródła

feat(hrmp): 初始化hrmp云模块并集成组织管理功能

- 新增行政组织常量类AdminOrgConstant,定义组织结构相关字段
- 实现组织快速维护的保存和确认变更操作插件- 添加岗位常量类PositionConstant及列表过滤逻辑- 创建组织复制弹窗表单插件和组织调整申请界面插件
- 在基础常量类中增加BOID_KEY和STRUCTNUMBER字段定义
- 配置hrmp模块依赖及构建脚本
- 在调试模块中引入hrmp云模块依赖
- 新增hrmp和odc模块的应用标识常量类
放平心態\GIN 1 tydzień temu
rodzic
commit
2a53a76c43
60 zmienionych plików z 552 dodań i 1 usunięć
  1. 4 0
      code/base/nckd-jxccl-base-common/src/main/java/nckd/jxccl/base/common/constant/FormConstant.java
  2. 14 0
      code/hrmp/nckd-jxccl-hrmp/build.gradle
  3. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/business/.gitkeep
  4. 22 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/common/AppflgConstant.java
  5. 32 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/common/adminorg/AdminOrgConstant.java
  6. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/mservice/.gitkeep
  7. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/form/.gitkeep
  8. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/.gitkeep
  9. 101 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/adminorg/AdminOrgDetailConfirmChangeOpPlugin.java
  10. 51 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/adminorg/AdminOrgDetailSaveOpPlugin.java
  11. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/other/.gitkeep
  12. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/report/.gitkeep
  13. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/workflow/.gitkeep
  14. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/webapi/.gitkeep
  15. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/business/.gitkeep
  16. 22 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/common/AppflgConstant.java
  17. 22 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/common/position/PositionConstant.java
  18. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/mservice/.gitkeep
  19. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/form/.gitkeep
  20. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/list/.gitkeep
  21. 29 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/list/position/PositionListPlugin.java
  22. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/operate/.gitkeep
  23. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/other/.gitkeep
  24. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/report/.gitkeep
  25. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/workflow/.gitkeep
  26. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/webapi/.gitkeep
  27. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/java/resources/.gitkeep
  28. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/main/resources/.gitkeep
  29. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/business/test/.gitkeep
  30. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/common/test/.gitkeep
  31. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/mservice/test/.gitkeep
  32. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/plugin/test/.gitkeep
  33. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/report/test/.gitkeep
  34. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/webapi/test/.gitkeep
  35. 0 0
      code/hrmp/nckd-jxccl-hrmp/src/test/resources/.gitkeep
  36. 8 0
      code/nckd-cosmic-debug/build.gradle
  37. 14 0
      code/odc/nckd-jxccl-odc/build.gradle
  38. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/business/.gitkeep
  39. 22 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/common/AppflgConstant.java
  40. 58 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/common/orgbatch/OrgBatchConstant.java
  41. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/mservice/.gitkeep
  42. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/form/.gitkeep
  43. 52 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/form/orgbatch/AdminOrgCopyDialogFormPlugin.java
  44. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/list/.gitkeep
  45. 95 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/list/orgbatch/OrgBatchChgBillListPlugin.java
  46. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/operate/.gitkeep
  47. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/other/.gitkeep
  48. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/report/.gitkeep
  49. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/workflow/.gitkeep
  50. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/webapi/.gitkeep
  51. 0 0
      code/odc/nckd-jxccl-odc/src/main/java/resources/.gitkeep
  52. 0 0
      code/odc/nckd-jxccl-odc/src/main/resources/.gitkeep
  53. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/business/test/.gitkeep
  54. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/common/test/.gitkeep
  55. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/mservice/test/.gitkeep
  56. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/plugin/test/.gitkeep
  57. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/report/test/.gitkeep
  58. 0 0
      code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/webapi/test/.gitkeep
  59. 0 0
      code/odc/nckd-jxccl-odc/src/test/resources/.gitkeep
  60. 6 1
      settings.gradle

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

@@ -93,6 +93,8 @@ public class FormConstant {
     public static final String NCKD_ENTRYENTITY = "NCKD_ENTRYENTITY";
 
     //====================================== 通用字段 ======================================
+    /** BOID标识 */
+    public static final String BOID_KEY = "boid";
     /** ID标识 */
     public static final String ID_KEY = "id";
     /** 名称标识 */
@@ -187,6 +189,8 @@ public class FormConstant {
     public static final String DEP_EMP = "depemp";
     /**组织上下级结构长编码*/
     public static final String STRUCTLONGNUMBER = "structlongnumber";
+    /**组织上下级关系编码*/
+    public static final String STRUCTNUMBER = "structnumber";
     /** 人员*/
     public static final String EMPLOYEE_KEY = "employee";
     /**职级序列*/

+ 14 - 0
code/hrmp/nckd-jxccl-hrmp/build.gradle

@@ -0,0 +1,14 @@
+/*
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-10-20 16:06:47
+ */
+
+dependencies {
+	api project(':nckd-jxccl-base-common')
+	api project(':nckd-jxccl-base-helper')
+} 
+
+

+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/business/.gitkeep


+ 22 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/common/AppflgConstant.java

@@ -0,0 +1,22 @@
+/**
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-10-20 16:06:47
+ */
+package nckd.jxccl.hrmp.haos.common;
+
+/**
+ * hrmp云app应用-通用常量类<br>
+ * 代码中不能存在硬编码敏感信息,如账号、密码、http外链、ftp外链、邮箱等。<br>
+ * 标识或缓存的常量,需以"KEY_"、"FID_"、"ENTRY_"或"SUBENTRY_"作为变量的前缀。<br>
+ *
+ * @author nckd
+ * @date 2025-10-20 16:06:47
+ */
+public class AppflgConstant {
+	
+	public static final String KEY_APP_NAME = "hrmp-app";
+
+}

+ 32 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/common/adminorg/AdminOrgConstant.java

@@ -0,0 +1,32 @@
+package nckd.jxccl.hrmp.haos.common.adminorg;
+
+import nckd.jxccl.base.common.constant.FormConstant;
+
+/**
+ * 行政组织常量
+ * @author: jtd
+ * @date: 2025-10-13 14:15
+ */
+public class AdminOrgConstant extends FormConstant {
+
+    /**
+     * 组织结构字段
+     */
+    public static final String[] ADMINORG_STRUCT_FIELDS = {"nckd_firstdep","nckd_seconddep","nckd_thirddep","nckd_fourthdep","nckd_fifthdep","nckd_sixthdep"};
+
+    /**
+     * 物理层级
+     */
+    public static final String LEVEL = "level";
+
+    /**
+     * 变动类型
+     */
+    public static final String CHANGETYPE = "changetype";
+
+    /**
+     * 生效日期
+     */
+    public static final String BSED = "bsed";
+
+}

+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/mservice/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/form/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/.gitkeep


+ 101 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/adminorg/AdminOrgDetailConfirmChangeOpPlugin.java

@@ -0,0 +1,101 @@
+package nckd.jxccl.hrmp.haos.plugin.operate.adminorg;
+
+import kd.bos.dataentity.entity.DynamicObject;
+import kd.bos.dataentity.entity.DynamicObjectCollection;
+import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
+import kd.bos.entity.plugin.args.BeginOperationTransactionArgs;
+import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
+import kd.bos.orm.query.QCP;
+import kd.bos.orm.query.QFilter;
+import kd.bos.servicehelper.BusinessDataServiceHelper;
+import kd.bos.servicehelper.QueryServiceHelper;
+import kd.bos.servicehelper.operation.SaveServiceHelper;
+import kd.hr.hbp.common.util.HRDateTimeUtils;
+import nckd.jxccl.base.orm.helper.QFilterCommonHelper;
+import nckd.jxccl.hrmp.haos.common.adminorg.AdminOrgConstant;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * 组织快速维护确认变更操作插件
+ * @author: jtd
+ * @date: 2025-10-16 9:47
+ */
+public class AdminOrgDetailConfirmChangeOpPlugin extends AbstractOperationServicePlugIn  {
+
+    private DynamicObjectCollection adminOrgOldDyColl;
+
+    private Boolean canDo(DynamicObject[] dataEntities) {
+        if (dataEntities == null || dataEntities.length <= 0) {
+            return false;
+        }
+
+        DynamicObject data = dataEntities[0];
+        // 非上级调整或未来生效
+        if (!"1020_S".equals(data.getDynamicObject(AdminOrgConstant.CHANGETYPE).getString(AdminOrgConstant.NUMBER_KEY)) || HRDateTimeUtils.dayAfter(data.getDate(AdminOrgConstant.BSED), HRDateTimeUtils.getNowDate())) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public void beginOperationTransaction(BeginOperationTransactionArgs e) {
+        super.beginOperationTransaction(e);
+
+        DynamicObject[] dataEntities = e.getDataEntities();
+        if (!canDo(dataEntities)) {
+            return;
+        }
+
+        // 获取组织及下级组织(旧数据)
+        QFilter qFilter = QFilter.of("1!=1", new Object[0]);
+        Arrays.stream(dataEntities).map(dataEntity -> dataEntity.getString(AdminOrgConstant.STRUCTLONGNUMBER)+"%").forEach(structlongnumber -> {
+            qFilter.or(QFilter.like(AdminOrgConstant.STRUCTLONGNUMBER, structlongnumber));
+        });
+        adminOrgOldDyColl = QueryServiceHelper.query(AdminOrgConstant.ADMINORGHR_ENTITYID, AdminOrgConstant.BOID_KEY, new QFilter[]{QFilter.isNotNull(AdminOrgConstant.STRUCTLONGNUMBER).and(qFilter).and(QFilterCommonHelper.getCurrentVersionFilter())});
+    }
+
+    @Override
+    public void endOperationTransaction(EndOperationTransactionArgs e) {
+        super.endOperationTransaction(e);
+
+        DynamicObject[] dataEntities = e.getDataEntities();
+        if (!canDo(dataEntities)) {
+            return;
+        }
+
+        // 获取组织及下级组织(新数据)含历史版本
+        List<Long> adminOrgBoIds = adminOrgOldDyColl.stream().map(adminOrg -> adminOrg.getLong(AdminOrgConstant.BOID_KEY)).collect(Collectors.toList());
+        DynamicObject[] adminOrgDys = BusinessDataServiceHelper.load(AdminOrgConstant.ADMINORGHR_ENTITYID, String.join(",", AdminOrgConstant.BOID_KEY, AdminOrgConstant.STRUCTLONGNUMBER, AdminOrgConstant.LEVEL, String.join(",", AdminOrgConstant.ADMINORG_STRUCT_FIELDS)), new QFilter[]{QFilter.isNotNull(AdminOrgConstant.STRUCTLONGNUMBER).and(new QFilter(AdminOrgConstant.STRUCTLONGNUMBER, QCP.not_equals, "")).and(new QFilter(AdminOrgConstant.BOID_KEY, QCP.in, adminOrgBoIds))}, AdminOrgConstant.BOID_KEY);
+        // 遍历获取结构编码
+        Map<String, String> structMap = Arrays.stream(adminOrgDys)
+                .map(adminOrgDy -> adminOrgDy.getString(AdminOrgConstant.STRUCTLONGNUMBER))
+                .flatMap(structNumber -> Arrays.stream(structNumber.split("!")))
+                .collect(Collectors.toMap(
+                        Function.identity(), // key就是遍历值 这里简写了 等价于 structNumber -> structNumber
+                        structNumber -> "", // value为空
+                        (existing, replacement) -> existing // 重复key处理 保留旧值或新值都可以 这里随便挑一个
+                ));
+
+        // 根据结构编码获取组织
+        DynamicObjectCollection adminOrgDyColl = QueryServiceHelper.query(AdminOrgConstant.ADMINORGHR_ENTITYID, String.join(",", AdminOrgConstant.BOID_KEY, AdminOrgConstant.STRUCTNUMBER), new QFilter[]{new QFilter(AdminOrgConstant.STRUCTNUMBER, QCP.in, new ArrayList<String>(structMap.keySet())).and(QFilterCommonHelper.getCurrentVersionFilter())}, AdminOrgConstant.LEVEL);
+        adminOrgDyColl.forEach(adminOrgDy -> structMap.put(adminOrgDy.getString(AdminOrgConstant.STRUCTNUMBER), adminOrgDy.getString(AdminOrgConstant.BOID_KEY)));
+
+        // 更新一二三四五六级组织
+        for (DynamicObject adminOrgDy : adminOrgDys) {
+            String[] structLongNumbers = adminOrgDy.getString(AdminOrgConstant.STRUCTLONGNUMBER).split("!");
+            for (int i = 0; i < AdminOrgConstant.ADMINORG_STRUCT_FIELDS.length; i++) {
+                adminOrgDy.set(AdminOrgConstant.ADMINORG_STRUCT_FIELDS[i], i < structLongNumbers.length ? structMap.get(structLongNumbers[i]) : null);
+            }
+        }
+
+        // 保存数据
+        SaveServiceHelper.save(adminOrgDys);
+    }
+}

+ 51 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/operate/adminorg/AdminOrgDetailSaveOpPlugin.java

@@ -0,0 +1,51 @@
+package nckd.jxccl.hrmp.haos.plugin.operate.adminorg;
+
+import kd.bos.dataentity.entity.DynamicObject;
+import kd.bos.dataentity.entity.DynamicObjectCollection;
+import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
+import kd.bos.entity.plugin.args.BeginOperationTransactionArgs;
+import kd.bos.orm.query.QCP;
+import kd.bos.orm.query.QFilter;
+import kd.bos.servicehelper.QueryServiceHelper;
+import nckd.jxccl.base.orm.helper.QFilterCommonHelper;
+import nckd.jxccl.hrmp.haos.common.adminorg.AdminOrgConstant;
+
+import java.util.Arrays;
+import java.util.stream.IntStream;
+
+/**
+ * 组织快速维护保存操作插件
+ * @author: jtd
+ * @date: 2025-10-13 11:08
+ */
+public class AdminOrgDetailSaveOpPlugin extends AbstractOperationServicePlugIn {
+
+    @Override
+    public void beginOperationTransaction(BeginOperationTransactionArgs e) {
+        super.beginOperationTransaction(e);
+
+        DynamicObject[] dataEntities = e.getDataEntities();
+        if (dataEntities != null) {
+            for (DynamicObject dataEntity : dataEntities) {
+                setAdminOrgStructHierarchy(dataEntity);
+            }
+        }
+    }
+
+    private void setAdminOrgStructHierarchy(DynamicObject dataEntity) {
+        String[] structNumbers = dataEntity.getString(AdminOrgConstant.STRUCTLONGNUMBER).split("!");
+        // 过滤组织上下级关系编码和是否当前生效数据
+        QFilter[] qFilters = {new QFilter(AdminOrgConstant.STRUCTNUMBER, QCP.in, Arrays.asList(structNumbers)), QFilterCommonHelper.getCurrentVersionFilter()};
+        DynamicObjectCollection adminOrgColl = QueryServiceHelper.query(AdminOrgConstant.ADMINORGHR_ENTITYID, AdminOrgConstant.ID_KEY, qFilters, AdminOrgConstant.LEVEL);
+        for (int i = 0; i < AdminOrgConstant.ADMINORG_STRUCT_FIELDS.length; i++) {
+            if (i < adminOrgColl.size() && adminOrgColl.get(i) != null) {
+            dataEntity.set(AdminOrgConstant.ADMINORG_STRUCT_FIELDS[i], adminOrgColl.get(i).getLong(AdminOrgConstant.ID_KEY));
+            } else if (i == adminOrgColl.size()) {
+                dataEntity.set(AdminOrgConstant.ADMINORG_STRUCT_FIELDS[i], dataEntity.getLong(AdminOrgConstant.ID_KEY));
+            } else {
+                dataEntity.set(AdminOrgConstant.ADMINORG_STRUCT_FIELDS[i], null);
+            }
+        }
+    }
+
+}

+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/other/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/report/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/plugin/workflow/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/haos/webapi/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/business/.gitkeep


+ 22 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/common/AppflgConstant.java

@@ -0,0 +1,22 @@
+/**
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-10-20 16:06:47
+ */
+package nckd.jxccl.hrmp.hbpm.common;
+
+/**
+ * hrmp云app应用-通用常量类<br>
+ * 代码中不能存在硬编码敏感信息,如账号、密码、http外链、ftp外链、邮箱等。<br>
+ * 标识或缓存的常量,需以"KEY_"、"FID_"、"ENTRY_"或"SUBENTRY_"作为变量的前缀。<br>
+ *
+ * @author nckd
+ * @date 2025-10-20 16:06:47
+ */
+public class AppflgConstant {
+	
+	public static final String KEY_APP_NAME = "hrmp-app";
+
+}

+ 22 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/common/position/PositionConstant.java

@@ -0,0 +1,22 @@
+package nckd.jxccl.hrmp.hbpm.common.position;
+
+import nckd.jxccl.base.common.constant.FormConstant;
+
+/**
+ * 岗位常量
+ * @author: jtd
+ * @date: 2025-10-20 16:29
+ */
+public class PositionConstant extends FormConstant {
+
+    /**
+     * 是否来自工作流
+     */
+    public static final String NCKD_ISFROMWF = "nckd_isfromwf";
+
+    /**
+     * 是否生效
+     */
+    public static final String NCKD_ISEFFECT = "nckd_iseffect";
+
+}

+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/mservice/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/form/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/list/.gitkeep


+ 29 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/list/position/PositionListPlugin.java

@@ -0,0 +1,29 @@
+package nckd.jxccl.hrmp.hbpm.plugin.list.position;
+
+import kd.bos.form.events.SetFilterEvent;
+import kd.bos.list.plugin.AbstractListPlugin;
+import kd.bos.orm.query.QCP;
+import kd.bos.orm.query.QFilter;
+import kd.occ.ocpos.common.enums.BillStatusEnum;
+import nckd.jxccl.hrmp.hbpm.common.position.PositionConstant;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 岗位信息维护列表插件
+ * @author: jtd
+ * @date: 2025-10-20 17:07
+ */
+public class PositionListPlugin extends AbstractListPlugin {
+
+    @Override
+    public void setFilter(SetFilterEvent e) {
+        super.setFilter(e);
+
+        // 来源工作流且生效的数据或非来源工作流的数据
+        QFilter qFilter = new QFilter(PositionConstant.NCKD_ISFROMWF, QCP.equals, Boolean.TRUE).and(new QFilter(PositionConstant.NCKD_ISEFFECT, QCP.equals, Boolean.TRUE)).or(new QFilter(PositionConstant.NCKD_ISFROMWF, QCP.not_equals, Boolean.TRUE)).or(QFilter.isNull(PositionConstant.NCKD_ISFROMWF));
+        e.addCustomQFilter(qFilter);
+    }
+}

+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/operate/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/other/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/report/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/plugin/workflow/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/nckd/jxccl/hrmp/hbpm/webapi/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/java/resources/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/main/resources/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/business/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/common/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/mservice/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/plugin/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/report/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/java/nckd/hrmp/app/webapi/test/.gitkeep


+ 0 - 0
code/hrmp/nckd-jxccl-hrmp/src/test/resources/.gitkeep


+ 8 - 0
code/nckd-cosmic-debug/build.gradle

@@ -35,4 +35,12 @@ dependencies {
 	// 引入wtc云模块
 	implementation project(':nckd-jxccl-wtc')
 
+
+	// 引入odc云模块
+	implementation project(':nckd-jxccl-odc')
+
+
+	// 引入hrmp云模块
+	implementation project(':nckd-jxccl-hrmp')
+
 }

+ 14 - 0
code/odc/nckd-jxccl-odc/build.gradle

@@ -0,0 +1,14 @@
+/*
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-09-28 14:21:58
+ */
+
+dependencies {
+	api project(':nckd-jxccl-base-common')
+	api project(':nckd-jxccl-base-helper')
+} 
+
+

+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/business/.gitkeep


+ 22 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/common/AppflgConstant.java

@@ -0,0 +1,22 @@
+/**
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-05-26 16:28:10
+ */
+package nckd.jxccl.odc.homs.common;
+
+/**
+ * hr云init应用-通用常量类<br>
+ * 代码中不能存在硬编码敏感信息,如账号、密码、http外链、ftp外链、邮箱等。<br>
+ * 标识或缓存的常量,需以"KEY_"、"FID_"、"ENTRY_"或"SUBENTRY_"作为变量的前缀。<br>
+ *
+ * @author nckd
+ * @date 2025-05-26 16:28:10
+ */
+public class AppflgConstant {
+	
+	public static final String KEY_APP_NAME = "hr-init";
+
+}

+ 58 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/common/orgbatch/OrgBatchConstant.java

@@ -0,0 +1,58 @@
+/**
+ * This is a kingdee cosmic template project that is automatically generated by the Kingdee cosmic development assistant plugin. 
+ * If there are any issues during the use process, you can provide feedback to the kingdee developer community website.
+ * Website: https://developer.kingdee.com/developer?productLineId=29
+ * Author: liebin.zheng
+ * Generate Date: 2025-05-26 16:28:10
+ */
+package nckd.jxccl.odc.homs.common.orgbatch;
+
+import nckd.jxccl.base.common.constant.FormConstant;
+
+/**
+ * 组织调整申请常量
+ * @author jtd
+ * @date 2025-09-26 15:16
+ */
+public class OrgBatchConstant extends FormConstant {
+	/**
+	 * 设置部门负责人OP
+	 */
+	public static final String SHOW_CHARGE_PERSON_OP = "showchargeperson";
+
+	/**
+	 * 组织复制OP
+	 */
+	public static final String ADMINORG_COPY_OP = "adminorgcopy";
+
+	/**
+	 * 设置部门负责人弹窗
+	 */
+	public static final String CHARGE_PERSON_DIALOG = "chargepersondialog";
+
+	/**
+	 * 组织复制弹窗表单ID
+	 */
+	public static final String NCKD_ADMINORG_COPY_DIALOG_FORMID = "nckd_adminorgcopydialog";
+
+	/**
+	 * 行政组织
+	 */
+	public static final String NCKD_ADMINORG_KEY = "nckd_adminorg";
+
+	/**
+	 * F7列表表单模板
+	 */
+	public static final String HAOS_ORGTREE_LIST_F7_FORMID = "haos_orgtreelistf7";
+
+	/**
+	 * 包含所有下级
+	 */
+	public static final String NCKD_INCLUDE_ALL_SUBORG_KEY = "nckd_includeallsuborg";
+
+	/**
+	 * 是否复制岗位
+	 */
+	public static final String NCKD_IS_COPY_POSITION_KEY = "nckd_iscopyposition";
+
+}

+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/mservice/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/form/.gitkeep


+ 52 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/form/orgbatch/AdminOrgCopyDialogFormPlugin.java

@@ -0,0 +1,52 @@
+package nckd.jxccl.odc.homs.plugin.form.orgbatch;
+
+import kd.bos.form.FormShowParameter;
+import kd.bos.form.ShowType;
+import kd.bos.form.events.AfterDoOperationEventArgs;
+import kd.bos.form.field.BasedataEdit;
+import kd.bos.form.plugin.AbstractFormPlugin;
+import nckd.jxccl.odc.homs.common.orgbatch.OrgBatchConstant;
+
+import java.util.EventObject;
+
+/**
+ * 组织复制弹窗表单插件
+ * @author: jtd
+ * @date: 2025-09-26 16:35
+ */
+public class AdminOrgCopyDialogFormPlugin extends AbstractFormPlugin {
+
+    @Override
+    public void afterBindData(EventObject e) {
+        super.afterBindData(e);
+
+        // 界面构建完成后自动触发行政组织F7弹窗
+        BasedataEdit adminOrg = this.getView().getControl(OrgBatchConstant.NCKD_ADMINORG_KEY);
+        if (adminOrg != null) {
+            adminOrg.click();
+        }
+    }
+
+    @Override
+    public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) {
+        super.afterDoOperation(afterDoOperationEventArgs);
+
+        if (afterDoOperationEventArgs.getOperationResult().isSuccess()) {
+            // 创建弹出参数对象
+            FormShowParameter formShowParameter = new FormShowParameter();
+            // 设置要弹出的动态表单标识
+            formShowParameter.setFormId("");
+            // 设置打开方式为模态框
+            formShowParameter.getOpenStyle().setShowType(ShowType.Modal);
+            // 设置自定义参数
+            formShowParameter.setCustomParam("adminOrg", this.getModel().getValue(OrgBatchConstant.NCKD_ADMINORG_KEY));// 行政组织
+            formShowParameter.setCustomParam("includeAllAdminSubOrg", this.getModel().getValue(OrgBatchConstant.NCKD_INCLUDE_ALL_SUBORG_KEY));// 包含所有下级
+            formShowParameter.setCustomParam("isCopyPosition", this.getModel().getValue(OrgBatchConstant.NCKD_IS_COPY_POSITION_KEY));// 是否复制岗位
+            // 执行弹出操作
+            //this.getView().showForm(formShowParameter);
+
+            // 关闭当前表单
+            this.getView().close();
+        }
+    }
+}

+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/list/.gitkeep


+ 95 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/list/orgbatch/OrgBatchChgBillListPlugin.java

@@ -0,0 +1,95 @@
+package nckd.jxccl.odc.homs.plugin.list.orgbatch;
+
+import kd.bos.entity.datamodel.ListSelectedRow;
+import kd.bos.entity.datamodel.ListSelectedRowCollection;
+import kd.bos.form.CloseCallBack;
+import kd.bos.form.FormShowParameter;
+import kd.bos.form.ShowType;
+import kd.bos.form.StyleCss;
+import kd.bos.form.events.BeforeDoOperationEventArgs;
+import kd.bos.form.events.ClosedCallBackEvent;
+import kd.bos.form.operate.AbstractOperate;
+import kd.bos.list.ListShowParameter;
+import kd.bos.list.plugin.AbstractListPlugin;
+import kd.hr.haos.business.domain.adminorg.service.impl.AdminOrgDetailHelper;
+import nckd.jxccl.odc.homs.common.orgbatch.OrgBatchConstant;
+
+/**
+ * 组织调整申请界面插件
+ * @author: jtd
+ * @date: 2025-09-26 15:16
+ */
+public class OrgBatchChgBillListPlugin extends AbstractListPlugin {
+
+    @Override
+    public void beforeDoOperation(BeforeDoOperationEventArgs args) {
+        super.beforeDoOperation(args);
+
+        boolean rootInit = (new AdminOrgDetailHelper()).checkRootInit(this.getView());
+        if (!rootInit) {
+            args.setCancel(true);
+        } else {
+            AbstractOperate operate = (AbstractOperate)args.getSource();
+            String operateKey = operate.getOperateKey();
+            openOperationPage(operateKey, args);
+        }
+    }
+
+    private void openOperationPage(String opKey, BeforeDoOperationEventArgs args) {
+        if (OrgBatchConstant.SHOW_CHARGE_PERSON_OP.equals(opKey)) {
+            // 创建弹出列表界面对象
+            ListShowParameter listShowParameter = new ListShowParameter();
+            // 设置F7列表表单模板(根据基础资料类型选择)
+            listShowParameter.setFormId(OrgBatchConstant.HAOS_ORGTREE_LIST_F7_FORMID);
+            // 设置基础资料标识
+            listShowParameter.setBillFormId(OrgBatchConstant.ADMINORGHR_ENTITYID);
+            // 设置打开方式为模态窗口
+            listShowParameter.getOpenStyle().setShowType(ShowType.Modal);
+            // 设置界面大小
+            StyleCss inlineStyleCss = new StyleCss();
+            inlineStyleCss.setHeight("580");
+            inlineStyleCss.setWidth("960");
+            listShowParameter.getOpenStyle().setInlineStyleCss(inlineStyleCss);
+            // 必须设置为true,表示是可选择界面
+            listShowParameter.setLookUp(true);
+            // 设置是否多选
+            listShowParameter.setMultiSelect(false);
+            // 设置是否显示标题
+            listShowParameter.setShowTitle(false);
+            // 设置回调(不设置会导致空指针)
+            listShowParameter.setCloseCallBack(new CloseCallBack(this, OrgBatchConstant.CHARGE_PERSON_DIALOG));
+            // 弹出F7选择界面
+            this.getView().showForm(listShowParameter);
+        }
+
+        if (OrgBatchConstant.ADMINORG_COPY_OP.equals(opKey)) {
+            // 创建弹出参数对象
+            FormShowParameter formShowParameter = new FormShowParameter();
+            // 设置要弹出的动态表单标识
+            formShowParameter.setFormId(OrgBatchConstant.NCKD_ADMINORG_COPY_DIALOG_FORMID);
+            // 设置打开方式为模态框
+            formShowParameter.getOpenStyle().setShowType(ShowType.Modal);
+            // 执行弹出操作
+            this.getView().showForm(formShowParameter);
+        }
+
+    }
+
+    @Override
+    public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) {
+        super.closedCallBack(closedCallBackEvent);
+
+        String actionId = closedCallBackEvent.getActionId();
+        ListSelectedRowCollection returnData = (ListSelectedRowCollection) closedCallBackEvent.getReturnData();
+        if (returnData != null && returnData.size() > 0) {
+            return;
+        }
+
+        // 设置部门负责人回调
+        if (OrgBatchConstant.CHARGE_PERSON_DIALOG.equals(actionId)) {
+            ListSelectedRow listSelectedRow = returnData.get(0);
+            // 跳转到部门负责人设置界面
+            (new AdminOrgDetailHelper()).showDeptLeaderSet(this, (Long) listSelectedRow.getPrimaryKeyValue());
+        }
+    }
+}

+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/operate/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/other/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/report/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/plugin/workflow/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/nckd/jxccl/odc/homs/webapi/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/java/resources/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/main/resources/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/business/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/common/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/mservice/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/plugin/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/report/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/java/nckd/odc/homs/webapi/test/.gitkeep


+ 0 - 0
code/odc/nckd-jxccl-odc/src/test/resources/.gitkeep


+ 6 - 1
settings.gradle

@@ -22,7 +22,9 @@ include(
 
 		':nckd-jxccl-odc',
 
-		':nckd-jxccl-wtc',
+		':nckd-jxccl-hrmp',
+
+        ':nckd-jxccl-wtc',
 )
 
 // -------------- 引入苍穹调试工程模块 --------------
@@ -49,3 +51,6 @@ project(':nckd-jxccl-odc').projectDir = new File('code/odc/nckd-jxccl-odc')
 
 // -------------- 引入wtc云模块 --------------
 project(':nckd-jxccl-wtc').projectDir = new File('code/wtc/nckd-jxccl-wtc')
+
+// -------------- 引入hrmp云模块 --------------
+project(':nckd-jxccl-hrmp').projectDir = new File('code/hrmp/nckd-jxccl-hrmp')