|
|
@@ -67,7 +67,7 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
qFilter.and(dataRule);
|
|
|
}
|
|
|
IReportBatchQueryInfo byBatchInfo = queryParam.byBatchInfo();
|
|
|
- byBatchInfo.setCountPerBatch(2000);
|
|
|
+ byBatchInfo.setCountPerBatch(3000);
|
|
|
return QueryServiceHelper.queryDataSet(this.getClass().getName(),PerfManagerFormConstant.PERFMANAGER_ENTITYID, queryFieldBuilder.buildSelect(), new QFilter[]{qFilter}, queryFieldBuilder.buildOrder(),1000000);
|
|
|
}
|
|
|
|
|
|
@@ -103,7 +103,6 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
qFilter.and(new QFilter(FormConstant.ID_KEY, QCP.in, idsOfCurrentBatch));
|
|
|
}
|
|
|
qFilter.and(String.join(".", FormConstant.HRPI_EMPPOSORGREL, FormConstant.POS_STATUS,FormConstant.POST_STATE_CLS, FormConstant.NUMBER_KEY),QCP.equals,"1010_S");
|
|
|
-
|
|
|
// 处理快速过滤条件
|
|
|
processFastFilter(reportQueryParam, qFilter);
|
|
|
|
|
|
@@ -116,7 +115,6 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
if(dataRule != null){
|
|
|
qFilter.and(dataRule);
|
|
|
}
|
|
|
-
|
|
|
// 执行基础查询
|
|
|
QueryEntityType queryEntityType = (QueryEntityType) EntityMetadataCache.getDataEntityType("printperfquery");
|
|
|
DataSet dataSet = HRQueryEntityHelper.getInstance().getQueryDataSet(queryEntityType,queryFieldBuilder.buildSelect(), new QFilter[]{qFilter}, null);
|
|
|
@@ -127,7 +125,9 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
Long personId = next.getLong(String.join(".", FormConstant.NCKD_PERSON, FormConstant.ID_KEY));
|
|
|
personIds.add(personId);
|
|
|
}
|
|
|
-
|
|
|
+ if(personIds.isEmpty()){
|
|
|
+ return dataSet;
|
|
|
+ }
|
|
|
//过滤调实际结束实际之外的年份分录
|
|
|
DataSet withYearFields = dataSet.filter("year("+String.join(".", PerfManagerFormConstant.PERFMANAGERENTRY, PerfManagerFormConstant.NCKD_APPRAISALYEAR) +") " +
|
|
|
"<= year(CASE WHEN nckd_actendyear is not null THEN nckd_actendyear ELSE "+PerfManagerFormConstant.NCKD_ENDYEAR+" end)");
|
|
|
@@ -137,8 +137,8 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
for (int year = fiveYearsAgo; year <= currentYear; year++) {
|
|
|
withYearFields = withYearFields.addField(
|
|
|
"CASE WHEN year(" + String.join(".", PerfManagerFormConstant.PERFMANAGERENTRY, PerfManagerFormConstant.NCKD_APPRAISALYEAR) + ") = " + year + " THEN " + String.join(".", PerfManagerFormConstant.PERFMANAGERENTRY, PerfManagerFormConstant.NCKD_APPRAISALRESULT,FormConstant.ID_KEY)+ " ELSE null END",
|
|
|
- "temp_" + tempIndex
|
|
|
- );
|
|
|
+ "temp_" + tempIndex);
|
|
|
+ withYearFields = withYearFields.addField(year+"","temp_year_" + tempIndex);
|
|
|
tempIndex++;
|
|
|
}
|
|
|
|
|
|
@@ -164,11 +164,16 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
String.join(".", PerfManagerFormConstant.DOCSTAMP_ENTITYID, PerfManagerFormConstant.NCKD_STAMPTIME),
|
|
|
String.join(".", PerfManagerFormConstant.DOCSTAMP_ENTITYID, PerfManagerFormConstant.NCKD_FILEISSUETIME),
|
|
|
String.join(".", PerfManagerFormConstant.HRPI_EMPPOSORGREL, PerfManagerFormConstant.POSITION_KEY, FormConstant.ID_KEY),
|
|
|
+ String.join(".", PerfManagerFormConstant.HRPI_PERSERLEN, PerfManagerFormConstant.FIRSTJOINCOMDATE_KEY),
|
|
|
+ String.join(".", PerfManagerFormConstant.HRPI_PERSERLEN, PerfManagerFormConstant.JOINCOMDATE_KEY),
|
|
|
+ String.join(".", PerfManagerFormConstant.HRPI_PERSERLEN, PerfManagerFormConstant.JOINWORKTIME_KEY),
|
|
|
});
|
|
|
int tempIndex1 = 1;
|
|
|
for (int year = fiveYearsAgo; year <= currentYear; year++) {
|
|
|
groupbyDataSet
|
|
|
.max("temp_"+tempIndex1, tempIndex1+"_result");
|
|
|
+ groupbyDataSet
|
|
|
+ .max("temp_year_"+tempIndex1, "year_"+tempIndex1);
|
|
|
tempIndex1++;
|
|
|
}
|
|
|
//职称/技能使用逗号分拼接
|
|
|
@@ -176,6 +181,7 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
groupbyDataSet.agg(new DistinctConcatFunction(),"nckd_hrpi_empskill.nckd_qualiname","qualinames");
|
|
|
|
|
|
DataSet annualPerfDetailQueryDataSet = groupbyDataSet.finish();
|
|
|
+ annualPerfDetailQueryDataSet.print(true);
|
|
|
String[] mainTableFieldNames = annualPerfDetailQueryDataSet.getRowMeta().getFieldNames();
|
|
|
// 创建新数组,长度比原数组多1
|
|
|
String[] newMainTableFieldNames = new String[mainTableFieldNames.length + 1];
|
|
|
@@ -371,6 +377,7 @@ public class PrintPerfDetailReportListDataPlugin extends AbstractReportListDataP
|
|
|
.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))
|
|
|
+ .addGroup(new String[]{FormConstant.HRPI_PERSERLEN},FormConstant.FIRSTJOINCOMDATE_KEY,FormConstant.JOINCOMDATE_KEY,FormConstant.JOINWORKTIME_KEY)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPENTREL,FormConstant.LABOR_REL_STATUS)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_FIRSTORG)
|
|
|
.addIdNumberName(FormConstant.HRPI_EMPPOSORGREL,FormConstant.ADMINORG,FormConstant.NCKD_SECONDORG)
|