Просмотр исходного кода

refactor(hr): 重构报表表单插件中的常量引用

- 将硬编码字符串替换为FormConstant.REPORTLISTAP常量
- 添加ReportQueryParam导入声明
- 实现beforeQuery方法以设置报表列表全选状态
- 优化UnAnnualAdjustReportFormPlugin类的代码结构
wyc 6 дней назад
Родитель
Сommit
f33d2ccc6a

+ 1 - 1
code/hr/nckd-jxccl-hr/src/main/java/nckd/jxccl/hr/psms/plugin/form/adjust/report/UnAdjustedReportFormPlugin.java

@@ -49,7 +49,7 @@ public class UnAdjustedReportFormPlugin extends AbstractReportFormPlugin impleme
 
     @Override
     public void beforeQuery(ReportQueryParam queryParam) {
-        ReportList reportList = this.getControl("reportlistap");
+        ReportList reportList = this.getControl(FormConstant.REPORTLISTAP);
         reportList.setSelectedAll(true);
     }
 

+ 8 - 0
code/hr/nckd-jxccl-hr/src/main/java/nckd/jxccl/hr/psms/plugin/form/annualadjust/report/UnAnnualAdjustReportFormPlugin.java

@@ -4,6 +4,7 @@ import kd.bos.dataentity.entity.DynamicObject;
 import kd.bos.dataentity.entity.DynamicObjectCollection;
 import kd.bos.entity.datamodel.ListSelectedRow;
 import kd.bos.entity.datamodel.ListSelectedRowCollection;
+import kd.bos.entity.report.ReportQueryParam;
 import kd.bos.form.CloseCallBack;
 import kd.bos.form.FormShowParameter;
 import kd.bos.form.ShowType;
@@ -33,6 +34,7 @@ import java.util.List;
 */
 public class UnAnnualAdjustReportFormPlugin extends AbstractReportFormPlugin implements Plugin {
 
+
     @Override
     public void registerListener(EventObject e) {
         this.addItemClickListeners(FormConstant.TOOLBARAP);
@@ -49,6 +51,12 @@ public class UnAnnualAdjustReportFormPlugin extends AbstractReportFormPlugin imp
 
     }
 
+    @Override
+    public void beforeQuery(ReportQueryParam queryParam) {
+        ReportList reportList = this.getControl(FormConstant.REPORTLISTAP);
+        reportList.setSelectedAll(true);
+    }
+
     @Override
     public void itemClick(ItemClickEvent evt) {
         String itemKey = evt.getItemKey();