Parcourir la source

feat(plugin): 新增基础医疗津贴计算后台任务插件

新增 `BaseMedicalAllowanceTask` 类,用于执行当年度待遇标准的自动计算任务。该任务通过调用
`BaseMedicalAllowanceServiceImpl` 实现具体业务逻辑,并记录执行结果日志。---

refactor(plugin): 移除延迟退休日期计算任务中不必要的依赖

从 `DelayedRetirementDateCalcTask` 中移除了对 `HRPIConstants` 和
`HSPMBusinessDataServiceHelper` 的无用导入,优化了代码结构。
turborao il y a 1 mois
Parent
commit
d3b0faeef9

+ 29 - 0
code/swc/nckd-jxccl-swc/src/main/java/nckd/jxccl/swc/init/plugin/other/BaseMedicalAllowanceTask.java

@@ -0,0 +1,29 @@
+package nckd.jxccl.swc.init.plugin.other;
+
+import kd.bos.context.RequestContext;
+import kd.bos.entity.validate.ErrorLevel;
+import kd.bos.entity.validate.ValidationErrorInfo;
+import kd.bos.exception.KDException;
+import kd.bos.logging.Log;
+import kd.bos.logging.LogFactory;
+import kd.bos.schedule.executor.AbstractTask;
+import kd.sdk.plugin.Plugin;
+import nckd.jxccl.swc.init.business.BaseMedicalAllowanceServiceImpl;
+
+import java.util.Map;
+
+/**
+ * 后台任务插件
+ */
+public class BaseMedicalAllowanceTask extends AbstractTask implements Plugin {
+
+    private static final Log logger = LogFactory.getLog(BaseMedicalAllowanceTask.class);
+    @Override
+    public void execute(RequestContext requestContext, Map<String, Object> map) throws KDException {
+
+        BaseMedicalAllowanceServiceImpl baseMedicalAllowanceService = new BaseMedicalAllowanceServiceImpl();
+        Map<String, String> result= baseMedicalAllowanceService.calcBaseMedicalAllowanceForAll();
+
+        logger.info("当年度待遇标准计算任务,信息:" + result.get("msg"));
+    }
+}

+ 0 - 2
code/swc/nckd-jxccl-swc/src/main/java/nckd/jxccl/swc/init/plugin/other/DelayedRetirementDateCalcTask.java

@@ -13,8 +13,6 @@ import kd.bos.servicehelper.BusinessDataServiceHelper;
 import kd.bos.servicehelper.QueryServiceHelper;
 import kd.bos.servicehelper.operation.SaveServiceHelper;
 import kd.bos.util.StringUtils;
-import kd.hrmp.hrpi.common.HRPIConstants;
-import kd.sdk.hr.hspm.business.helper.HSPMBusinessDataServiceHelper;
 import kd.sdk.plugin.Plugin;