浏览代码

Merge branch 'refs/heads/feat-swc-mas_1.0'

wyc 5 天之前
父节点
当前提交
586e473c99

+ 10 - 10
code/opmc/nckd-jxccl-opmc/src/main/java/nckd/jxccl/opmc/pm/task/PromotionCycleGeneratorTask.java

@@ -91,17 +91,17 @@ public class PromotionCycleGeneratorTask extends AbstractTask implements Plugin
             }
             
             LocalDateTime now = DateUtil.now();
-            // 计算基准日期:N个月前(例如当前11月,N=2,则基准日期为9月)
-            LocalDateTime monthsAgo = now.minusMonths(month);
-            // 设置查询时间范围:
-            // 开始时间:基准日期往前推12个月的第一天
-            // 结束时间:基准日期所在月的第一天(9月,取9月1日)
-            // 目的:查询近12+N个月范围内的调动数据,确保每次查询不是全表查询。每次限制12个月范围的数据
-            LocalDateTime startDate = DateUtil.beginOfMonth(DateUtil.minusMonths(monthsAgo,12));
-            LocalDateTime endDate = DateUtil.beginOfMonth(monthsAgo);
-            
+
+
+            // 计算前两个月的开始和结束日期(不包括本月)
+            LocalDateTime startDate = DateUtil.minusMonths(now, 2);
+            startDate = DateUtil.beginOfMonth(startDate); // 设置为月份第一天
+
+            LocalDateTime endDate = DateUtil.minusMonths(now, 1);
+            endDate = DateUtil.endOfMonth(endDate); // 设置为月份最后一天
+
             logger.info("查询调动单的时间范围: {} 至 {}", startDate, endDate);
-            
+
             QFilter transferApplyFilter = QFilterCommonHelper.getBillStatusFilter()
                     .and("b_effectivedate", QCP.large_equals, DateUtil.toDate(startDate))
                     .and("b_effectivedate", QCP.less_equals, DateUtil.toDate(endDate))

+ 1 - 1
code/swc/nckd-jxccl-swc/src/main/java/nckd/jxccl/swc/mas/plugin/form/empmgt/SubCoHeadServiceListPlugin.java

@@ -260,7 +260,7 @@ public class SubCoHeadServiceListPlugin extends AbstractListPlugin implements Pl
         if(!saveSubCoHeadServiceList.isEmpty()) {
             //调用save op
             OperateOption option = OperateOption.create();
-            option.setVariableValue("action", "load");
+            option.setVariableValue("load", Boolean.TRUE+"");
             OperationResult operationResult = SaveServiceHelper.saveOperate(SubCoHeadServiceConstant.SUBCOHEADSERVICE_ENTITYID, saveSubCoHeadServiceList.toArray(new DynamicObject[0]), option);
             if (!operationResult.isSuccess()) {
                 String parentPageId = this.getView().getFormShowParameter().getPageId();

+ 9 - 6
code/swc/nckd-jxccl-swc/src/main/java/nckd/jxccl/swc/mas/plugin/operate/SubCoHeadServiceOpPlugin.java

@@ -7,6 +7,7 @@ import kd.bos.entity.plugin.AddValidatorsEventArgs;
 import kd.bos.entity.plugin.args.EndOperationTransactionArgs;
 import kd.bos.entity.validate.AbstractValidator;
 import kd.sdk.plugin.Plugin;
+import nckd.jxccl.base.common.utils.ConvertUtil;
 import nckd.jxccl.swc.mas.common.SubCoHeadServiceConstant;
 
 import java.util.Date;
@@ -22,7 +23,8 @@ public class SubCoHeadServiceOpPlugin extends AbstractOperationServicePlugIn imp
 
     @Override
     public void onAddValidators(AddValidatorsEventArgs e) {
-
+        //通过“载入党政职务履历”
+        Boolean isLoad = ConvertUtil.toBoolean(this.getOption().getVariableValue("load", "false"));
         e.addValidator(new AbstractValidator() {
 
             @Override
@@ -31,12 +33,13 @@ public class SubCoHeadServiceOpPlugin extends AbstractOperationServicePlugIn imp
                 for (ExtendedDataEntity dataEntity : this.getDataEntities()) {
                     DynamicObject data = dataEntity.getDataEntity();
                     Date startDate = data.getDate(SubCoHeadServiceConstant.NCKD_STARTDATE);
-                    /*if(startDate == null){
-                        this.addWarningMessage(dataEntity,"");
+                    if(startDate == null){
+                        if(isLoad){
+
+                        }else{
+                            this.addWarningMessage(dataEntity,"");
+                        }
                     }
-                    for (int i = 0; i < 20;i++){
-                        this.addErrorMessage(dataEntity,"错误"+i);
-                    }*/
 
                 }