|
|
|
@ -733,14 +733,14 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sql =" select score from wr-performance.hr_kpi_flow " +
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and REAL_PERIOD >= '" +startDay+"'" +
|
|
|
|
|
" and REAL_PERIOD <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and DATE_TYPE = 'month'" +
|
|
|
|
|
" and FLOW_STATUS = 'finished'" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and REAL_PERIOD >= '" +startDay+"'" +
|
|
|
|
|
" and REAL_PERIOD <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and DATE_TYPE = 'month'" +
|
|
|
|
|
" and FLOW_STATUS = 'finished'" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
|
|
|
|
@ -785,15 +785,15 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sql =" select kpi_scheme,score " +
|
|
|
|
|
" from wr-performance.hr_kpi_flow " +
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and real_period >= '" +startDay+"'" +
|
|
|
|
|
" and real_period <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and date_type = 'month'" +
|
|
|
|
|
" and flow_status = 'finished'" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
" from wr-performance.hr_kpi_flow " +
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and real_period >= '" +startDay+"'" +
|
|
|
|
|
" and real_period <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and date_type = 'month'" +
|
|
|
|
|
" and flow_status = 'finished'" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
@ -822,12 +822,12 @@ public class HrmSelfHelpController {
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(kpi_scheme)){
|
|
|
|
|
String sql =" select indicator_type,indicator_description,weight \n" +
|
|
|
|
|
" from wr-performance.hr_kpi_scheme_indicator " +
|
|
|
|
|
" where scheme_id='"+kpi_scheme+"' " +
|
|
|
|
|
" and indicator_mode='quantify'\n" +
|
|
|
|
|
" and status='on' " +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key = '"+tenant_key+"'" ;
|
|
|
|
|
" from wr-performance.hr_kpi_scheme_indicator " +
|
|
|
|
|
" where scheme_id='"+kpi_scheme+"' " +
|
|
|
|
|
" and indicator_mode='quantify'\n" +
|
|
|
|
|
" and status='on' " +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key = '"+tenant_key+"'" ;
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
@ -971,46 +971,46 @@ public class HrmSelfHelpController {
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
|
|
|
|
|
String sql =" SELECT \n" +
|
|
|
|
|
" t1.id typeid,\n" +
|
|
|
|
|
" t1.name typename,\n" +
|
|
|
|
|
" t2.id riskid,\n" +
|
|
|
|
|
" t2.name riskname,\n" +
|
|
|
|
|
" t.risk_value,\n" +
|
|
|
|
|
" t.tenant_key,\n" +
|
|
|
|
|
" t.userid," +
|
|
|
|
|
" e.username,\n" +
|
|
|
|
|
" times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT k.riskid,k.risk_value,k.tenant_key,k.userid,COUNT(k.riskid) times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 30 DAY), '%Y-%m-%d')\n" +
|
|
|
|
|
" AND t.userid = '"+employeeId+"'\n" +
|
|
|
|
|
" union all\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 30 DAY), '%Y-%m-%d')\n" +
|
|
|
|
|
" AND t.userid IN (select cid from eteams.emp_link where pid= '"+employeeId+"' and relation = 'senior') \n" +
|
|
|
|
|
" ) k \n" +
|
|
|
|
|
" GROUP BY k.riskid,\n" +
|
|
|
|
|
" k.risk_value,\n" +
|
|
|
|
|
" k.tenant_key,\n" +
|
|
|
|
|
" k.userid\n" +
|
|
|
|
|
" ) t,\n" +
|
|
|
|
|
" pr_indrisk_type t1,\n" +
|
|
|
|
|
" pr_indrisk_info t2 ,\n" +
|
|
|
|
|
" eteams.employee e\n" +
|
|
|
|
|
" WHERE t.riskid = t2.id \n" +
|
|
|
|
|
" AND t2.risk_type = t1.id \n" +
|
|
|
|
|
" AND t.userid = e.id\n" +
|
|
|
|
|
" AND e.STATUS != 'unavailable' AND e.PERMANENTLY_DELETE = '0'\n" +
|
|
|
|
|
" AND t1.delete_type = 0 \n" +
|
|
|
|
|
" AND t2.delete_type = 0" ;
|
|
|
|
|
" t1.id typeid,\n" +
|
|
|
|
|
" t1.name typename,\n" +
|
|
|
|
|
" t2.id riskid,\n" +
|
|
|
|
|
" t2.name riskname,\n" +
|
|
|
|
|
" t.risk_value,\n" +
|
|
|
|
|
" t.tenant_key,\n" +
|
|
|
|
|
" t.userid," +
|
|
|
|
|
" e.username,\n" +
|
|
|
|
|
" times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT k.riskid,k.risk_value,k.tenant_key,k.userid,COUNT(k.riskid) times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 30 DAY), '%Y-%m-%d')\n" +
|
|
|
|
|
" AND t.userid = '"+employeeId+"'\n" +
|
|
|
|
|
" union all\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 30 DAY), '%Y-%m-%d')\n" +
|
|
|
|
|
" AND t.userid IN (select cid from eteams.emp_link where pid= '"+employeeId+"' and relation = 'senior') \n" +
|
|
|
|
|
" ) k \n" +
|
|
|
|
|
" GROUP BY k.riskid,\n" +
|
|
|
|
|
" k.risk_value,\n" +
|
|
|
|
|
" k.tenant_key,\n" +
|
|
|
|
|
" k.userid\n" +
|
|
|
|
|
" ) t,\n" +
|
|
|
|
|
" pr_indrisk_type t1,\n" +
|
|
|
|
|
" pr_indrisk_info t2 ,\n" +
|
|
|
|
|
" eteams.employee e\n" +
|
|
|
|
|
" WHERE t.riskid = t2.id \n" +
|
|
|
|
|
" AND t2.risk_type = t1.id \n" +
|
|
|
|
|
" AND t.userid = e.id\n" +
|
|
|
|
|
" AND e.STATUS != 'unavailable' AND e.PERMANENTLY_DELETE = '0'\n" +
|
|
|
|
|
" AND t1.delete_type = 0 \n" +
|
|
|
|
|
" AND t2.delete_type = 0" ;
|
|
|
|
|
|
|
|
|
|
log.error("testSapi16:"+sql);
|
|
|
|
|
|
|
|
|
@ -1136,46 +1136,46 @@ public class HrmSelfHelpController {
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
|
|
|
|
|
String sql =" SELECT \n" +
|
|
|
|
|
" t1.id typeid,\n" +
|
|
|
|
|
" t1.name typename,\n" +
|
|
|
|
|
" t2.id riskid,\n" +
|
|
|
|
|
" t2.name riskname,\n" +
|
|
|
|
|
" t.risk_value,\n" +
|
|
|
|
|
" t.tenant_key,\n" +
|
|
|
|
|
" t.userid,\n" +
|
|
|
|
|
" e.username,\n" +
|
|
|
|
|
" times \n" +
|
|
|
|
|
" FROM ( \n" +
|
|
|
|
|
" SELECT k.riskid,k.risk_value,k.tenant_key,k.userid,COUNT(k.riskid) times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= '"+startDay+"'\n" +
|
|
|
|
|
" AND t.userid = '"+employeeId+"'\n" +
|
|
|
|
|
" union all\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid \n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"' \n" +
|
|
|
|
|
" AND t.risk_date >= '"+startDay+"' \n" +
|
|
|
|
|
" AND t.userid IN (select cid from eteams.emp_link where pid= '"+employeeId+"' and relation = 'senior') \n" +
|
|
|
|
|
" ) k \n" +
|
|
|
|
|
" GROUP BY k.riskid,\n" +
|
|
|
|
|
" k.risk_value,\n" +
|
|
|
|
|
" k.tenant_key,\n" +
|
|
|
|
|
" k.userid\n" +
|
|
|
|
|
" ) t,\n" +
|
|
|
|
|
" pr_indrisk_type t1,\n" +
|
|
|
|
|
" pr_indrisk_info t2 ,\n" +
|
|
|
|
|
" eteams.employee e\n" +
|
|
|
|
|
" WHERE t.riskid = t2.id \n" +
|
|
|
|
|
" AND t2.risk_type = t1.id \n" +
|
|
|
|
|
" AND t.userid = e.id\n" +
|
|
|
|
|
" AND e.STATUS != 'unavailable' AND e.PERMANENTLY_DELETE = '0'\n" +
|
|
|
|
|
" AND t1.delete_type = 0 \n" +
|
|
|
|
|
" AND t2.delete_type = 0" ;
|
|
|
|
|
" t1.id typeid,\n" +
|
|
|
|
|
" t1.name typename,\n" +
|
|
|
|
|
" t2.id riskid,\n" +
|
|
|
|
|
" t2.name riskname,\n" +
|
|
|
|
|
" t.risk_value,\n" +
|
|
|
|
|
" t.tenant_key,\n" +
|
|
|
|
|
" t.userid,\n" +
|
|
|
|
|
" e.username,\n" +
|
|
|
|
|
" times \n" +
|
|
|
|
|
" FROM ( \n" +
|
|
|
|
|
" SELECT k.riskid,k.risk_value,k.tenant_key,k.userid,COUNT(k.riskid) times \n" +
|
|
|
|
|
" FROM (\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" AND t.risk_date >= '"+startDay+"'\n" +
|
|
|
|
|
" AND t.userid = '"+employeeId+"'\n" +
|
|
|
|
|
" union all\n" +
|
|
|
|
|
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid \n" +
|
|
|
|
|
" FROM pr_indrisk_data t \n" +
|
|
|
|
|
" WHERE t.delete_type = 0 \n" +
|
|
|
|
|
" AND t.tenant_key = '"+tenant_key+"' \n" +
|
|
|
|
|
" AND t.risk_date >= '"+startDay+"' \n" +
|
|
|
|
|
" AND t.userid IN (select cid from eteams.emp_link where pid= '"+employeeId+"' and relation = 'senior') \n" +
|
|
|
|
|
" ) k \n" +
|
|
|
|
|
" GROUP BY k.riskid,\n" +
|
|
|
|
|
" k.risk_value,\n" +
|
|
|
|
|
" k.tenant_key,\n" +
|
|
|
|
|
" k.userid\n" +
|
|
|
|
|
" ) t,\n" +
|
|
|
|
|
" pr_indrisk_type t1,\n" +
|
|
|
|
|
" pr_indrisk_info t2 ,\n" +
|
|
|
|
|
" eteams.employee e\n" +
|
|
|
|
|
" WHERE t.riskid = t2.id \n" +
|
|
|
|
|
" AND t2.risk_type = t1.id \n" +
|
|
|
|
|
" AND t.userid = e.id\n" +
|
|
|
|
|
" AND e.STATUS != 'unavailable' AND e.PERMANENTLY_DELETE = '0'\n" +
|
|
|
|
|
" AND t1.delete_type = 0 \n" +
|
|
|
|
|
" AND t2.delete_type = 0" ;
|
|
|
|
|
|
|
|
|
|
log.error("testSapi17:"+sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
@ -1245,16 +1245,16 @@ public class HrmSelfHelpController {
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(employeeId)){
|
|
|
|
|
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='"+employeeId+"' \n" +
|
|
|
|
|
" and module = 'kpiFlow' \n" +
|
|
|
|
|
" and date_type = 'month' \n" +
|
|
|
|
|
" and delete_type = '0' " +
|
|
|
|
|
" and tenant_key='"+tenant_key+"'\n" +
|
|
|
|
|
" and FLOW_STATUS in('noApprove','approve','finished')\n" +
|
|
|
|
|
" order by real_period desc\n" +
|
|
|
|
|
") k limit 1 ";
|
|
|
|
|
" from (select real_period,kpi_scheme,score\n" +
|
|
|
|
|
" from hr_kpi_flow \n" +
|
|
|
|
|
" where kpi_user='"+employeeId+"' \n" +
|
|
|
|
|
" and module = 'kpiFlow' \n" +
|
|
|
|
|
" and date_type = 'month' \n" +
|
|
|
|
|
" and delete_type = '0' " +
|
|
|
|
|
" and tenant_key='"+tenant_key+"'\n" +
|
|
|
|
|
" and FLOW_STATUS in('noApprove','approve','finished')\n" +
|
|
|
|
|
" order by real_period desc\n" +
|
|
|
|
|
") k limit 1 ";
|
|
|
|
|
|
|
|
|
|
log.error("sql20-1:"+sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
@ -1338,7 +1338,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
" and MODULE='kpiSchemeSetting'\n" +
|
|
|
|
|
" and TENANT_KEY='"+tenant_key+"'\n" +
|
|
|
|
|
" and DELETE_TYPE = 0" +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" and module = 'kpiSchemeSetting'\n" +
|
|
|
|
|
" and tenant_key = '"+tenant_key+"'\n" +
|
|
|
|
|
" and delete_type = '0'\n" +
|
|
|
|
@ -1493,14 +1493,14 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sql =" select score from hr_kpi_flow " +
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and left(real_period,10) >= '" +startDay+"'" +
|
|
|
|
|
" and left(real_period,10) <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and date_type = 'month'" +
|
|
|
|
|
" and flow_status in('noApprove','approve','finished') \n" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
" where kpi_user='"+employeeId+"' " +
|
|
|
|
|
" and left(real_period,10) >= '" +startDay+"'" +
|
|
|
|
|
" and left(real_period,10) <='" + endDay +"'" +
|
|
|
|
|
" and module = 'kpiFlow'" +
|
|
|
|
|
" and date_type = 'month'" +
|
|
|
|
|
" and flow_status in('noApprove','approve','finished') \n" +
|
|
|
|
|
" and delete_type = '0'" +
|
|
|
|
|
" and tenant_key='"+tenant_key+"' " ;
|
|
|
|
|
|
|
|
|
|
log.error("getWholeYearKpi2-sql:"+sql);
|
|
|
|
|
|
|
|
|
@ -1566,25 +1566,25 @@ public class HrmSelfHelpController {
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
|
|
|
|
|
String sql =" select sum(cast(t1.htzje as decimal(18,2))) as htzje," +
|
|
|
|
|
" sum(cast(t1.htyxje as decimal(18,2))) as htyxje," +
|
|
|
|
|
" sum(cast(t1.sumsk as decimal(18,2))) as sumsk " +
|
|
|
|
|
" from uf_jxhs_xmys t1 \n" +
|
|
|
|
|
" where t1.ysrq>='" +startday+"' and t1.ysrq<='"+endday+"' " +
|
|
|
|
|
" and ( t1.qyjl = '"+employeeId+"' "+
|
|
|
|
|
" or t1.qyjl in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.ysry = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.ysry in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.dqfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.dqfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.tdjl = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.tdjl in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.tdfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.tdfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.jgfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.jgfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.dqzj = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.dqzj in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"') " +
|
|
|
|
|
" ) " ;
|
|
|
|
|
" sum(cast(t1.htyxje as decimal(18,2))) as htyxje," +
|
|
|
|
|
" sum(cast(t1.sumsk as decimal(18,2))) as sumsk " +
|
|
|
|
|
" from uf_jxhs_xmys t1 \n" +
|
|
|
|
|
" where t1.ysrq>='" +startday+"' and t1.ysrq<='"+endday+"' " +
|
|
|
|
|
" and ( t1.qyjl = '"+employeeId+"' "+
|
|
|
|
|
" or t1.qyjl in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.ysry = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.ysry in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.dqfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.dqfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.tdjl = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.tdjl in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.tdfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.tdfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.jgfzr = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.jgfzr in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"')\n" +
|
|
|
|
|
" or t1.dqzj = '"+employeeId+"'\n" +
|
|
|
|
|
" or t1.dqzj in (select cid from eteams.EMP_LINK where RELATION in ('othersenior','senior') and pid= '"+employeeId+"') " +
|
|
|
|
|
" ) " ;
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
|
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
@ -1633,45 +1633,45 @@ public class HrmSelfHelpController {
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
|
|
|
|
|
String sql =" SELECT \n" +
|
|
|
|
|
" sum(cast(t1.skje as decimal(18,2))) as skje,\n" + //收款金额
|
|
|
|
|
" sum(cast(t1.xmskje as decimal(18,2))) as xmskje,\n" + // 项目收款金额
|
|
|
|
|
" sum(cast(t1.xsyxje as decimal(18,2))) as xsyxje," + // 销售有效金额
|
|
|
|
|
" sum(cast(t1.xsje as decimal(18,2))) as xsje," + // 销售金额
|
|
|
|
|
" sum(cast(t1.xmyxje as decimal(18,2))) as xmyxje," + //项目有效金额
|
|
|
|
|
" sum(cast(t1.xsjxhk as decimal(18,2))) as xsjxhk," + //有效绩效回款
|
|
|
|
|
" sum(cast(t1.sumsk as decimal(18,2))) as sumsk," + //总收款金额
|
|
|
|
|
" sum(cast(t1.sjjsk as decimal(18,2))) as sjjsk," + //实际结算款
|
|
|
|
|
" sum(cast(t1.skjs as decimal(18,2))) as skjs " + //收款结算
|
|
|
|
|
" FROM uf_jxhs_skmx t1\n" +
|
|
|
|
|
" LEFT JOIN uf_jxhs_zxhtzb t2 ON t1.hth = t2.hth AND t2.hth != '' AND t2.hth IS NOT NULL \n" +
|
|
|
|
|
" JOIN ebdf_physical_data epd on t1.id = epd.form_data_id and epd.delete_type = 0 \n" +
|
|
|
|
|
" WHERE t1.skje != 0 \n" +
|
|
|
|
|
" and t1.skje IS NOT NULL " +
|
|
|
|
|
" and t1.skrq >= '" + startday+"' and skrq <='"+endday+"' "+
|
|
|
|
|
" and (" +
|
|
|
|
|
" '"+employeeId+"' IN ( 2, 27, 166, 10285, 11661, 300, 876, 3593, 1416, 1647, 1844,3044480226941419013,794508876297846787 ) \n" +
|
|
|
|
|
" or cast(t1.xsjl AS decimal(25,0)) in( \n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.kfry AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.qdjl AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHEREHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.xmjl AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" order by t1.id " ;
|
|
|
|
|
" sum(cast(t1.skje as decimal(18,2))) as skje,\n" + //收款金额
|
|
|
|
|
" sum(cast(t1.xmskje as decimal(18,2))) as xmskje,\n" + // 项目收款金额
|
|
|
|
|
" sum(cast(t1.xsyxje as decimal(18,2))) as xsyxje," + // 销售有效金额
|
|
|
|
|
" sum(cast(t1.xsje as decimal(18,2))) as xsje," + // 销售金额
|
|
|
|
|
" sum(cast(t1.xmyxje as decimal(18,2))) as xmyxje," + //项目有效金额
|
|
|
|
|
" sum(cast(t1.xsjxhk as decimal(18,2))) as xsjxhk," + //有效绩效回款
|
|
|
|
|
" sum(cast(t1.sumsk as decimal(18,2))) as sumsk," + //总收款金额
|
|
|
|
|
" sum(cast(t1.sjjsk as decimal(18,2))) as sjjsk," + //实际结算款
|
|
|
|
|
" sum(cast(t1.skjs as decimal(18,2))) as skjs " + //收款结算
|
|
|
|
|
" FROM uf_jxhs_skmx t1\n" +
|
|
|
|
|
" LEFT JOIN uf_jxhs_zxhtzb t2 ON t1.hth = t2.hth AND t2.hth != '' AND t2.hth IS NOT NULL \n" +
|
|
|
|
|
" JOIN ebdf_physical_data epd on t1.id = epd.form_data_id and epd.delete_type = 0 \n" +
|
|
|
|
|
" WHERE t1.skje != 0 \n" +
|
|
|
|
|
" and t1.skje IS NOT NULL " +
|
|
|
|
|
" and t1.skrq >= '" + startday+"' and skrq <='"+endday+"' "+
|
|
|
|
|
" and (" +
|
|
|
|
|
" '"+employeeId+"' IN ( 2, 27, 166, 10285, 11661, 300, 876, 3593, 1416, 1647, 1844,3044480226941419013,794508876297846787 ) \n" +
|
|
|
|
|
" or cast(t1.xsjl AS decimal(25,0)) in( \n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.kfry AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.qdjl AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHEREHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" or cast(t1.xmjl AS decimal(25,0)) in(\n" +
|
|
|
|
|
" SELECT cid AS id FROM eteams.emp_link WHERE pid = '"+employeeId+"' and RELATION in ('othersenior','senior') \n" +
|
|
|
|
|
" UNION " +
|
|
|
|
|
" SELECT id FROM eteams.employee WHERE id = '"+employeeId+"' " +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" )\n" +
|
|
|
|
|
" order by t1.id " ;
|
|
|
|
|
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
@ -1710,13 +1710,13 @@ public class HrmSelfHelpController {
|
|
|
|
|
int pageNo = CommonUtils.getIntValue(request.getParameter("pageNo"),1);
|
|
|
|
|
// 0 我发起的; 1 我的待办; 2 我的已办
|
|
|
|
|
if("0".equals(type)){
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.PORTAL_MINE.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
int code = requestResult.getCode();
|
|
|
|
|
if(code == 200){
|
|
|
|
|
requestListInfoPAEntityList = requestResult.getData();
|
|
|
|
|
requestListInfoPAEntityList = requestResult.getData();
|
|
|
|
|
}
|
|
|
|
|
}else if("1".equals(type)){
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.TODO_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.TODO_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
|
|
|
|
|
int code = requestResult.getCode();
|
|
|
|
|
if(code == 200){
|
|
|
|
@ -1724,7 +1724,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if("2".equals(type)){
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
|
|
|
|
|
int code = requestResult.getCode();
|
|
|
|
|
if(code == 200){
|
|
|
|
@ -1756,7 +1756,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
int pageNo = CommonUtils.getIntValue(request.getParameter("pageNo"),1);
|
|
|
|
|
// 0 我发起的; 1 我的待办; 2 我的已办
|
|
|
|
|
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult0 = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.PORTAL_MINE.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
WeaResult<List<RequestListInfoPAEntity>> requestResult0 = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
|
|
|
|
|
int code0 = requestResult0.getCode();
|
|
|
|
|
if(code0 == 200){
|
|
|
|
|
List<RequestListInfoPAEntity> requestList0 = requestResult0.getData();
|
|
|
|
@ -1832,8 +1832,8 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String sql = " select count(1) as cou from cw_content " +
|
|
|
|
|
" where CREATOR='"+employeeId+"'\n" +
|
|
|
|
|
" and left(CREATE_TIME,10)>='"+startday+"' and left(CREATE_TIME,10) <= '"+endday+"'" ;
|
|
|
|
|
" where CREATOR='"+employeeId+"'\n" +
|
|
|
|
|
" and left(CREATE_TIME,10)>='"+startday+"' and left(CREATE_TIME,10) <= '"+endday+"'" ;
|
|
|
|
|
|
|
|
|
|
log.error("sql:"+sql);
|
|
|
|
|
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
|
|
|
|