|
@@ -14,6 +14,7 @@ import kd.bos.orm.query.QCP;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
import kd.bos.orm.query.QFilter;
|
|
|
import kd.hr.hbp.business.servicehelper.HRQueryEntityHelper;
|
|
import kd.hr.hbp.business.servicehelper.HRQueryEntityHelper;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
import kd.sdk.plugin.Plugin;
|
|
|
|
|
+import nckd.jxccl.base.common.algo.DistinctConcatFunction;
|
|
|
import nckd.jxccl.base.common.constant.FormConstant;
|
|
import nckd.jxccl.base.common.constant.FormConstant;
|
|
|
import nckd.jxccl.base.common.utils.DateUtil;
|
|
import nckd.jxccl.base.common.utils.DateUtil;
|
|
|
import nckd.jxccl.base.common.utils.QueryFieldBuilder;
|
|
import nckd.jxccl.base.common.utils.QueryFieldBuilder;
|
|
@@ -51,6 +52,7 @@ public class AnnualPerfDetailReportListDataPlugin extends AbstractReportListData
|
|
|
/*QFilter qFilter = new QFilter(PerfManagerFormConstant.NCKD_BEGINYEAR, QCP.less_equals, endDate)
|
|
/*QFilter qFilter = new QFilter(PerfManagerFormConstant.NCKD_BEGINYEAR, QCP.less_equals, endDate)
|
|
|
.and(new QFilter(PerfManagerFormConstant.NCKD_ENDYEAR, QCP.large_equals, beginDate));*/
|
|
.and(new QFilter(PerfManagerFormConstant.NCKD_ENDYEAR, QCP.large_equals, beginDate));*/
|
|
|
QFilter qFilter = QFilter.of("1=1");
|
|
QFilter qFilter = QFilter.of("1=1");
|
|
|
|
|
+ qFilter.and(String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.POS_STATUS,FormConstant.POST_STATE_CLS, FormConstant.NUMBER_KEY),QCP.equals,"1010_S");
|
|
|
|
|
|
|
|
// 处理快速过滤条件
|
|
// 处理快速过滤条件
|
|
|
processFastFilter(reportQueryParam, qFilter);
|
|
processFastFilter(reportQueryParam, qFilter);
|
|
@@ -78,7 +80,7 @@ public class AnnualPerfDetailReportListDataPlugin extends AbstractReportListData
|
|
|
);
|
|
);
|
|
|
tempIndex++;
|
|
tempIndex++;
|
|
|
}
|
|
}
|
|
|
- withYearFields.print(true);
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 按分组字段聚合
|
|
// 按分组字段聚合
|
|
|
GroupbyDataSet groupbyDataSet = withYearFields.groupBy(new String[]{
|
|
GroupbyDataSet groupbyDataSet = withYearFields.groupBy(new String[]{
|
|
@@ -91,10 +93,15 @@ public class AnnualPerfDetailReportListDataPlugin extends AbstractReportListData
|
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_FOURTHORG, FormConstant.ID_KEY),
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_FOURTHORG, FormConstant.ID_KEY),
|
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_FIFTHORG, FormConstant.ID_KEY),
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_FIFTHORG, FormConstant.ID_KEY),
|
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_SIXTHORG, FormConstant.ID_KEY),
|
|
String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.ADMINORG, FormConstant.NCKD_SIXTHORG, FormConstant.ID_KEY),
|
|
|
- String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.POS_STATUS, FormConstant.ID_KEY),
|
|
|
|
|
|
|
+ String.join(".", FormConstant.NCKD_PERSON, FormConstant.NCKD_JOINWORKTIME),
|
|
|
|
|
+ String.join(".", FormConstant.NCKD_PERSON, FormConstant.BIRTHDAY),
|
|
|
|
|
+ String.join(".", FormConstant.NCKD_PERSON, FormConstant.GENDER,FormConstant.NAME_KEY),
|
|
|
|
|
+ String.join(".", FormConstant.HRPI_PEREDUEXP, FormConstant.EDUCATION_KEY,FormConstant.NAME_KEY),
|
|
|
|
|
+
|
|
|
// String.join(".", FormConstant.NCKD_EMPPOSORGREL, FormConstant.POSITION_KEY, FormConstant.ID_KEY),
|
|
// String.join(".", FormConstant.NCKD_EMPPOSORGREL, FormConstant.POSITION_KEY, FormConstant.ID_KEY),
|
|
|
String.join(".", "last_perfmanager", PerfManagerFormConstant.NCKD_BEGINYEAR),
|
|
String.join(".", "last_perfmanager", PerfManagerFormConstant.NCKD_BEGINYEAR),
|
|
|
- String.join(".", "last_perfmanager", PerfManagerFormConstant.NCKD_ENDYEAR)
|
|
|
|
|
|
|
+ String.join(".", "last_perfmanager", PerfManagerFormConstant.NCKD_ENDYEAR),
|
|
|
|
|
+ String.join(".", PerfManagerFormConstant.HRPI_EMPPOSORGREL, PerfManagerFormConstant.POSITION_KEY, FormConstant.ID_KEY),
|
|
|
});
|
|
});
|
|
|
int tempIndex1 = 1;
|
|
int tempIndex1 = 1;
|
|
|
for (int year = fiveYearsAgo; year <= currentYear; year++) {
|
|
for (int year = fiveYearsAgo; year <= currentYear; year++) {
|
|
@@ -102,10 +109,19 @@ public class AnnualPerfDetailReportListDataPlugin extends AbstractReportListData
|
|
|
.max("temp_"+tempIndex1, tempIndex1+"_result");
|
|
.max("temp_"+tempIndex1, tempIndex1+"_result");
|
|
|
tempIndex1++;
|
|
tempIndex1++;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ //职称/技能使用逗号分拼接
|
|
|
|
|
+ groupbyDataSet.agg(new DistinctConcatFunction(),"hrpi_perprotitle.professional.name","perprotitlenames");
|
|
|
|
|
+ groupbyDataSet.agg(new DistinctConcatFunction(),"nckd_hrpi_empskill.nckd_qualiname","qualinames");
|
|
|
DataSet result = groupbyDataSet.finish();
|
|
DataSet result = groupbyDataSet.finish();
|
|
|
- result.print( true);
|
|
|
|
|
- return result;
|
|
|
|
|
|
|
+ // 创建新数组,长度比原数组多1
|
|
|
|
|
+ String[] mainTableFieldNames = result.getRowMeta().getFieldNames();
|
|
|
|
|
+ String[] newMainTableFieldNames = new String[mainTableFieldNames.length + 1];
|
|
|
|
|
+ System.arraycopy(mainTableFieldNames, 0, newMainTableFieldNames, 0, mainTableFieldNames.length);
|
|
|
|
|
+ // 在最后添加新字段
|
|
|
|
|
+ newMainTableFieldNames[mainTableFieldNames.length] = "REPLACE(REPLACE(REPLACE(concat(perprotitlenames,';',qualinames),'null,',''),'null;',''),'null','') as perprotitlOrQuali";
|
|
|
|
|
+ mainTableFieldNames = newMainTableFieldNames;
|
|
|
|
|
+
|
|
|
|
|
+ return result.select(mainTableFieldNames);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -151,17 +167,23 @@ public class AnnualPerfDetailReportListDataPlugin extends AbstractReportListData
|
|
|
.addGroup(new String[]{PerfManagerFormConstant.PERFMANAGERENTRY},PerfManagerFormConstant.ID_KEY)
|
|
.addGroup(new String[]{PerfManagerFormConstant.PERFMANAGERENTRY},PerfManagerFormConstant.ID_KEY)
|
|
|
.addGroup(new String[]{FormConstant.NCKD_EMPPOSORGREL,FormConstant.EMPLOYEE_KEY}, FormConstant.EMP_NUMBER_KEY, FormConstant.NAME_KEY)
|
|
.addGroup(new String[]{FormConstant.NCKD_EMPPOSORGREL,FormConstant.EMPLOYEE_KEY}, FormConstant.EMP_NUMBER_KEY, FormConstant.NAME_KEY)
|
|
|
.addIdNumberName(FormConstant.NCKD_PERSON)
|
|
.addIdNumberName(FormConstant.NCKD_PERSON)
|
|
|
- .addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.POS_STATUS)
|
|
|
|
|
|
|
+ .add(String.join(".", FormConstant.NCKD_PERSON, FormConstant.NCKD_JOINWORKTIME))
|
|
|
|
|
+ .add(String.join(".", FormConstant.NCKD_PERSON, FormConstant.BIRTHDAY))
|
|
|
|
|
+ .add(String.join(".", FormConstant.NCKD_PERSON, FormConstant.GENDER,FormConstant.NAME_KEY))
|
|
|
|
|
+ .add(String.join(".", FormConstant.HRPI_PEREDUEXP, FormConstant.EDUCATION_KEY,FormConstant.NAME_KEY))
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FIRSTORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FIRSTORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_SECONDORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_SECONDORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_THIRDORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_THIRDORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FOURTHORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FOURTHORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FIFTHORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FIFTHORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_SIXTHORG)
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_SIXTHORG)
|
|
|
|
|
+ .addIdNumberName( PerfManagerFormConstant.HRPI_EMPPOSORGREL, PerfManagerFormConstant.POSITION_KEY)
|
|
|
// .addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.POSITION_KEY)
|
|
// .addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.POSITION_KEY)
|
|
|
.addGroup(new String[]{"last_perfmanager"},
|
|
.addGroup(new String[]{"last_perfmanager"},
|
|
|
PerfManagerFormConstant.NCKD_BEGINYEAR,
|
|
PerfManagerFormConstant.NCKD_BEGINYEAR,
|
|
|
- PerfManagerFormConstant.NCKD_ENDYEAR);
|
|
|
|
|
|
|
+ PerfManagerFormConstant.NCKD_ENDYEAR)
|
|
|
|
|
+ .add(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROFESSIONAL_KEY,FormConstant.NAME_KEY))
|
|
|
|
|
+ .add(String.join(".", FormConstant.NCKD_HRPI_EMPSKILL, FormConstant.NCKD_QUALINAME));
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|