|
|
@ -132,6 +132,8 @@ public class PortalPerformanceInfoCmd {
|
|
|
|
String period_month = "" ;
|
|
|
|
String period_month = "" ;
|
|
|
|
String score = "0.0";
|
|
|
|
String score = "0.0";
|
|
|
|
String kpi_scheme = "";
|
|
|
|
String kpi_scheme = "";
|
|
|
|
|
|
|
|
String real_period = "";
|
|
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
|
String nowDate = sdf.format(new Date())+"-01";
|
|
|
|
String nowDate = sdf.format(new Date())+"-01";
|
|
|
|
Map<String,String> scoreMap = getLastScore(nowDate);
|
|
|
|
Map<String,String> scoreMap = getLastScore(nowDate);
|
|
|
@ -162,15 +164,52 @@ public class PortalPerformanceInfoCmd {
|
|
|
|
if (CollectionUtils.isNotEmpty(recordList)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(recordList)) {
|
|
|
|
Map<String, Object> recordMap = recordList.get(0);
|
|
|
|
Map<String, Object> recordMap = recordList.get(0);
|
|
|
|
if (!recordMap.isEmpty()) {
|
|
|
|
if (!recordMap.isEmpty()) {
|
|
|
|
kpi_scheme = String.valueOf(recordMap.get("kpi_scheme"));
|
|
|
|
kpi_scheme = String.valueOf(recordMap.get("scheme_id"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.error("kpi_scheme:"+kpi_scheme);
|
|
|
|
log.error("kpi_scheme:"+kpi_scheme);
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(kpi_scheme)){
|
|
|
|
dataMap.put("score", score);
|
|
|
|
dataMap.put("score", score);
|
|
|
|
dataMap.put("yearmonth", period_month);
|
|
|
|
dataMap.put("yearmonth", period_month);
|
|
|
|
dataMap.put("real_period", period_month);
|
|
|
|
dataMap.put("real_period", period_month);
|
|
|
|
dataMap.put("kpi_scheme", kpi_scheme);
|
|
|
|
dataMap.put("kpi_scheme", kpi_scheme);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
String sql =" select left(k.real_period,10) as real_period,left(k.real_period,7) as period_month,k.kpi_scheme,k.score\n" +
|
|
|
|
|
|
|
|
" from (select real_period,kpi_scheme,score\n" +
|
|
|
|
|
|
|
|
" from hr_kpi_flow \n" +
|
|
|
|
|
|
|
|
" where kpi_user=? \n" +
|
|
|
|
|
|
|
|
" and module = 'kpiFlow' \n" +
|
|
|
|
|
|
|
|
" and date_type = 'month' \n" +
|
|
|
|
|
|
|
|
" and delete_type = '0' " +
|
|
|
|
|
|
|
|
" and tenant_key=?\n" +
|
|
|
|
|
|
|
|
" order by real_period desc\n" +
|
|
|
|
|
|
|
|
") k limit 1 ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.error("sql20-1:" + sql);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> strlist = new ArrayList<>(100);
|
|
|
|
|
|
|
|
strlist.add(employeeId);
|
|
|
|
|
|
|
|
strlist.add(tenant_key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SqlParamEntity> sqlparam = databaseUtils.getSqlParamEntity(strlist);
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql, sqlparam);
|
|
|
|
|
|
|
|
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(recordList)) {
|
|
|
|
|
|
|
|
Map<String, Object> recordMap = recordList.get(0);
|
|
|
|
|
|
|
|
if (!recordMap.isEmpty()) {
|
|
|
|
|
|
|
|
score = String.valueOf(recordMap.get("score"));
|
|
|
|
|
|
|
|
kpi_scheme = String.valueOf(recordMap.get("kpi_scheme"));
|
|
|
|
|
|
|
|
real_period = String.valueOf(recordMap.get("real_period"));
|
|
|
|
|
|
|
|
period_month = String.valueOf(recordMap.get("period_month"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataMap.put("score", score);
|
|
|
|
|
|
|
|
dataMap.put("yearmonth", period_month);
|
|
|
|
|
|
|
|
dataMap.put("kpi_scheme", kpi_scheme);
|
|
|
|
|
|
|
|
dataMap.put("real_period", real_period);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
@ -485,13 +524,11 @@ public class PortalPerformanceInfoCmd {
|
|
|
|
if (flowDataList.size() > 0) {
|
|
|
|
if (flowDataList.size() > 0) {
|
|
|
|
FlowDataListRes flowDataListRes = flowDataList.get(0);
|
|
|
|
FlowDataListRes flowDataListRes = flowDataList.get(0);
|
|
|
|
float Score = flowDataListRes.getScore();
|
|
|
|
float Score = flowDataListRes.getScore();
|
|
|
|
if(Math.abs(Score) > 0){
|
|
|
|
|
|
|
|
score = String.valueOf(Score);
|
|
|
|
score = String.valueOf(Score);
|
|
|
|
period_month = startDay.substring(0,7);
|
|
|
|
period_month = startDay.substring(0,7);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
log.error("getWholeYearKpi2-getScore-Exception:" + e.getMessage());
|
|
|
|
log.error("getWholeYearKpi2-getScore-Exception:" + e.getMessage());
|
|
|
|
score = "0.0";
|
|
|
|
score = "0.0";
|
|
|
|