@ -1,11 +1,8 @@
package com.engine.kq.biz ;
package com.engine.kq.biz ;
import com.alibaba.fastjson.JSON ;
import com.alibaba.fastjson.JSON ;
import com.alibaba.fastjson.JSONArray ;
import com.alibaba.fastjson.JSONObject ;
import com.alibaba.fastjson.JSONObject ;
import com.engine.kq.biz.chain.shiftinfo.ShiftInfoBean ;
import com.engine.kq.cmd.attendanceButton.ButtonStatusEnum ;
import com.engine.kq.cmd.attendanceButton.ButtonStatusEnum ;
import com.engine.kq.enums.FlowReportTypeEnum ;
import com.engine.kq.enums.KqSplitFlowTypeEnum ;
import com.engine.kq.enums.KqSplitFlowTypeEnum ;
import com.engine.kq.log.KQLog ;
import com.engine.kq.log.KQLog ;
import com.engine.kq.util.KQDurationCalculatorUtil ;
import com.engine.kq.util.KQDurationCalculatorUtil ;
@ -85,7 +82,7 @@ public class KQReportBiz extends BaseBean {
try {
try {
Map < String , Object > kqdate = null ;
Map < String , Object > kqdate = null ;
List < Object > datas = null ;
List < Object > datas = null ;
Map < String , Object > data = null ;
Map < String , Object > data = null ;
sql = " select kqdate,serialid, workbegindate, workbegintime,workenddate, workendtime," +
sql = " select kqdate,serialid, workbegindate, workbegintime,workenddate, workendtime," +
" signintime,signouttime,beLateMins,graveBeLateMins,leaveEarlyMins,graveLeaveEarlyMins," +
" signintime,signouttime,beLateMins,graveBeLateMins,leaveEarlyMins,graveLeaveEarlyMins," +
" absenteeismMins, forgotCheckMins,forgotBeginWorkCheckMins,otherinfo " +
" absenteeismMins, forgotCheckMins,forgotBeginWorkCheckMins,otherinfo " +
@ -150,7 +147,7 @@ public class KQReportBiz extends BaseBean {
kqdate = new HashMap < > ( ) ;
kqdate = new HashMap < > ( ) ;
datas = new ArrayList < > ( ) ;
datas = new ArrayList < > ( ) ;
kqdate . put ( "kqdate" , Util . null2String ( rs . getString ( "kqdate" ) ) ) ;
kqdate . put ( "kqdate" , Util . null2String ( rs . getString ( "kqdate" ) ) ) ;
if ( workbegindate . length ( ) > 0 ) {
if ( workbegindate . length ( ) > 0 ) {
data = new HashMap < > ( ) ;
data = new HashMap < > ( ) ;
data . put ( "workbegindate" , workbegindate ) ;
data . put ( "workbegindate" , workbegindate ) ;
@ -294,23 +291,23 @@ public class KQReportBiz extends BaseBean {
} else if ( fieldName . equals ( "officialBusiness" ) ) {
} else if ( fieldName . equals ( "officialBusiness" ) ) {
unitType = KQExitRulesBiz . getMinimumUnit ( ) . equals ( "3" ) ? "2" : "1" ; //单位类型
unitType = KQExitRulesBiz . getMinimumUnit ( ) . equals ( "3" ) ? "2" : "1" ; //单位类型
} else if ( parentid . equals ( "overtime" ) | | parentid . equals ( "overtime_nonleave" ) | | parentid . equals ( "overtime_4leave" ) ) {
} else if ( parentid . equals ( "overtime" ) | | parentid . equals ( "overtime_nonleave" ) | | parentid . equals ( "overtime_4leave" ) ) {
unitType = ( KQOvertimeRulesBiz . getMinimumUnit ( ) = = 3 | | KQOvertimeRulesBiz . getMinimumUnit ( ) = = 5 | | KQOvertimeRulesBiz . getMinimumUnit ( ) = = 6 ) ? "2" : "1" ; //单位类型
unitType = ( KQOvertimeRulesBiz . getMinimumUnit ( ) = = 3 | | KQOvertimeRulesBiz . getMinimumUnit ( ) = = 5 | | KQOvertimeRulesBiz . getMinimumUnit ( ) = = 6 ) ? "2" : "1" ; //单位类型
}
}
}
}
if ( Util . null2String ( unitType ) . length ( ) > 0 ) {
if ( Util . null2String ( unitType ) . length ( ) > 0 ) {
if ( unitType . equals ( "1" ) ) {
if ( unitType . equals ( "1" ) ) {
unitTypeName = SystemEnv . getHtmlLabelName ( 1925 , user . getLanguage ( ) ) ;
unitTypeName = SystemEnv . getHtmlLabelName ( 1925 , user . getLanguage ( ) ) ;
} else if ( unitType . equals ( "2" ) ) {
} else if ( unitType . equals ( "2" ) ) {
unitTypeName = SystemEnv . getHtmlLabelName ( 391 , user . getLanguage ( ) ) ;
unitTypeName = SystemEnv . getHtmlLabelName ( 391 , user . getLanguage ( ) ) ;
} else if ( unitType . equals ( "3" ) ) {
} else if ( unitType . equals ( "3" ) ) {
unitTypeName = SystemEnv . getHtmlLabelName ( 18083 , user . getLanguage ( ) ) ;
unitTypeName = SystemEnv . getHtmlLabelName ( 18083 , user . getLanguage ( ) ) ;
}
}
}
}
return unitTypeName ;
return unitTypeName ;
}
}
public Map < String , Object > getFlowData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
try {
try {
datas . putAll ( getFlowLeaveData ( params , user ) ) ;
datas . putAll ( getFlowLeaveData ( params , user ) ) ;
datas . putAll ( getFlowEvectionOutData ( params , user ) ) ;
datas . putAll ( getFlowEvectionOutData ( params , user ) ) ;
@ -324,107 +321,14 @@ public class KQReportBiz extends BaseBean {
return datas ;
return datas ;
}
}
/ * *
* 获 取 周 六 销 假 数 据
* @param params
* @param user
* @return
* /
public Map < String , Object > getSaturdayFlowLeaveBackData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sqlWhere = " " ;
try {
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
fromDate = TimeUtil . getCurrentDateString ( ) ;
toDate = TimeUtil . getCurrentDateString ( ) ;
} else {
fromDate = TimeUtil . getDateByOption ( typeselect , "0" ) ;
toDate = TimeUtil . getDateByOption ( typeselect , "1" ) ;
}
}
String subCompanyId = Util . null2String ( jsonObj . get ( "subCompanyId" ) ) ;
String departmentId = Util . null2String ( jsonObj . get ( "departmentId" ) ) ;
String resourceId = Util . null2String ( jsonObj . get ( "resourceId" ) ) ;
String allLevel = Util . null2String ( jsonObj . get ( "allLevel" ) ) ;
String isNoAccount = Util . null2String ( jsonObj . get ( "isNoAccount" ) ) ;
String viewScope = Util . null2String ( jsonObj . get ( "viewScope" ) ) ;
if ( subCompanyId . length ( ) > 0 ) {
sqlWhere + = " and a.subcompanyid1 in(" + subCompanyId + ") " ;
}
if ( departmentId . length ( ) > 0 ) {
sqlWhere + = " and a.departmentid in(" + departmentId + ") " ;
}
if ( resourceId . length ( ) > 0 ) {
sqlWhere + = " and b.resourceid in(" + resourceId + ") " ;
}
if ( viewScope . equals ( "4" ) ) { //我的下属
if ( allLevel . equals ( "1" ) ) { //所有下属
sqlWhere + = " and a.managerstr like '%," + user . getUID ( ) + ",%'" ;
} else {
sqlWhere + = " and a.managerid=" + user . getUID ( ) ; //直接下属
}
}
if ( ! "1" . equals ( isNoAccount ) ) {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and (DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) " +
"and belongdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 AND groupid = " +
"(select top 1 groupid from kq_shiftschedule where resourceid = b.resourceid and serialid = b.serialid and kqdate = b.belongdate)) " + sqlWhere +
" group by resourceid, newleavetype, durationrule " ;
rs . execute ( sql ) ;
while ( rs . next ( ) ) {
String resourceid = rs . getString ( "resourceid" ) ;
String newleavetype = rs . getString ( "newleavetype" ) ;
String durationrule = rs . getString ( "durationrule" ) ;
double value = rs . getDouble ( "val" ) < 0 ? 0 : rs . getDouble ( "val" ) ;
double proportion = Util . getDoubleValue ( kqLeaveRulesComInfo . getProportion ( newleavetype ) ) ;
if ( KQUnitBiz . isLeaveHour ( newleavetype , kqLeaveRulesComInfo ) ) { //按小时
if ( ! KQUnitBiz . isLeaveHour ( durationrule ) ) {
if ( proportion > 0 ) value = value * proportion ;
}
} else { //按天
if ( KQUnitBiz . isLeaveHour ( durationrule ) ) {
if ( proportion > 0 ) value = value / proportion ;
}
}
String key = resourceid + "|leavebackType_" + newleavetype ;
if ( datas . containsKey ( key ) ) {
value + = Util . getDoubleValue ( Util . null2String ( datas . get ( key ) ) ) ;
}
//df.format 默认是不四舍五入的 0.125这样的就会直接变成0.12了
df . setMaximumFractionDigits ( 5 ) ;
datas . put ( key , df . format ( value ) ) ;
}
} catch ( Exception e ) {
writeLog ( e ) ;
}
return datas ;
}
/ * *
/ * *
* 获 取 周 六 请 假 数 据
* 获 取 周 六 请 假 数 据
* @param params
* @param params
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getSaturdayFlowLeaveData ( Map < String , Object > params , User user ) {
public Map < String , Object > getSaturdayFlowLeaveData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
try {
try {
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
@ -434,7 +338,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -474,11 +378,8 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and (DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) " + sqlWhere +
"(DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) and belongdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 " +
"AND groupid = (select top 1 groupid from kq_shiftschedule where resourceid = b.resourceid " +
" and serialid = b.serialid and kqdate = b.belongdate)) " + sqlWhere +
" group by resourceid, newleavetype, durationrule " ;
" group by resourceid, newleavetype, durationrule " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
while ( rs . next ( ) ) {
while ( rs . next ( ) ) {
@ -515,108 +416,14 @@ public class KQReportBiz extends BaseBean {
return datas ;
return datas ;
}
}
/ * *
* 获 取 每 日 销 假 数 据
* @param params
* @param user
* @return
* /
public Map < String , Object > getDailySaturdayFlowLeaveBackData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sqlWhere = " " ;
try {
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
fromDate = TimeUtil . getCurrentDateString ( ) ;
toDate = TimeUtil . getCurrentDateString ( ) ;
} else {
fromDate = TimeUtil . getDateByOption ( typeselect , "0" ) ;
toDate = TimeUtil . getDateByOption ( typeselect , "1" ) ;
}
}
String subCompanyId = Util . null2String ( jsonObj . get ( "subCompanyId" ) ) ;
String departmentId = Util . null2String ( jsonObj . get ( "departmentId" ) ) ;
String resourceId = Util . null2String ( jsonObj . get ( "resourceId" ) ) ;
String allLevel = Util . null2String ( jsonObj . get ( "allLevel" ) ) ;
String isNoAccount = Util . null2String ( jsonObj . get ( "isNoAccount" ) ) ;
String viewScope = Util . null2String ( jsonObj . get ( "viewScope" ) ) ;
if ( subCompanyId . length ( ) > 0 ) {
sqlWhere + = " and a.subcompanyid1 in(" + subCompanyId + ") " ;
}
if ( departmentId . length ( ) > 0 ) {
sqlWhere + = " and a.departmentid in(" + departmentId + ") " ;
}
if ( resourceId . length ( ) > 0 ) {
sqlWhere + = " and b.resourceid in(" + resourceId + ") " ;
}
if ( viewScope . equals ( "4" ) ) { //我的下属
if ( allLevel . equals ( "1" ) ) { //所有下属
sqlWhere + = " and a.managerstr like '%," + user . getUID ( ) + ",%'" ;
} else {
sqlWhere + = " and a.managerid=" + user . getUID ( ) ; //直接下属
}
}
if ( ! "1" . equals ( isNoAccount ) ) {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and (DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) " +
"and belongdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 AND groupid = " +
"(select top 1 groupid from kq_shiftschedule where resourceid = b.resourceid and serialid = b.serialid and kqdate = b.belongdate)) " + sqlWhere +
" group by resourceid, newleavetype, durationrule,belongdate " ;
rs . execute ( sql ) ;
while ( rs . next ( ) ) {
String resourceid = rs . getString ( "resourceid" ) ;
String belongdate = rs . getString ( "belongdate" ) ;
String newleavetype = rs . getString ( "newleavetype" ) ;
String durationrule = rs . getString ( "durationrule" ) ;
double value = rs . getDouble ( "val" ) < 0 ? 0 : rs . getDouble ( "val" ) ;
double proportion = Util . getDoubleValue ( kqLeaveRulesComInfo . getProportion ( newleavetype ) ) ;
if ( KQUnitBiz . isLeaveHour ( newleavetype , kqLeaveRulesComInfo ) ) { //按小时
if ( ! KQUnitBiz . isLeaveHour ( durationrule ) ) {
if ( proportion > 0 ) value = value * proportion ;
}
} else { //按天
if ( KQUnitBiz . isLeaveHour ( durationrule ) ) {
if ( proportion > 0 ) value = value / proportion ;
}
}
String key = resourceid + "|" + belongdate + "|leavebackType_" + newleavetype ;
if ( datas . containsKey ( key ) ) {
value + = Util . getDoubleValue ( Util . null2String ( datas . get ( key ) ) ) ;
}
//df.format 默认是不四舍五入的 0.125这样的就会直接变成0.12了
df . setMaximumFractionDigits ( 5 ) ;
datas . put ( key , df . format ( value ) ) ;
}
} catch ( Exception e ) {
writeLog ( e ) ;
}
return datas ;
}
/ * *
/ * *
* 获 取 周 六 请 假 数 据
* 获 取 周 六 请 假 数 据
* @param params
* @param params
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getDailySaturdayFlowLeaveData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailySaturdayFlowLeaveData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -625,7 +432,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -665,10 +472,8 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and (DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' and (DATEPART(dw, belongdate) = 7 or DATEPART(dw, belongdate) = 1) " + sqlWhere +
"and belongdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 AND groupid = " +
"(select top 1 groupid from kq_shiftschedule where resourceid = b.resourceid and serialid = b.serialid and kqdate = b.belongdate)) " + sqlWhere +
" group by resourceid, newleavetype, durationrule,belongdate " ;
" group by resourceid, newleavetype, durationrule,belongdate " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
while ( rs . next ( ) ) {
while ( rs . next ( ) ) {
@ -709,8 +514,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getDailyFlowData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailyFlowData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
try {
try {
datas . putAll ( getDailyFlowLeaveData ( params , user ) ) ;
datas . putAll ( getDailyFlowLeaveData ( params , user ) ) ;
datas . putAll ( getDailyFlowEvectionOutData ( params , user ) ) ;
datas . putAll ( getDailyFlowEvectionOutData ( params , user ) ) ;
@ -728,8 +533,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getFlowEvectionOutData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowEvectionOutData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -743,7 +548,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -836,8 +641,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getDailyFlowEvectionOutData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailyFlowEvectionOutData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -851,7 +656,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -944,8 +749,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getFlowLeaveData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowLeaveData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -954,7 +759,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -994,7 +799,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, newleavetype, durationrule " ;
" group by resourceid, newleavetype, durationrule " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1035,8 +840,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getFlowLeaveBackData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowLeaveBackData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1045,7 +850,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1085,7 +890,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, newleavetype, durationrule " ;
" group by resourceid, newleavetype, durationrule " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1126,8 +931,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getFlowProcessChangeData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowProcessChangeData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1138,7 +943,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1178,7 +983,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, durationrule, changetype,sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . PROCESSCHANGE . getTablename ( ) + " b " +
sql = " select resourceid, durationrule, changetype,sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . PROCESSCHANGE . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, durationrule,changetype " ;
" group by resourceid, durationrule,changetype " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1229,8 +1034,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getDailyFlowLeaveData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailyFlowLeaveData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1239,7 +1044,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1279,7 +1084,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVE . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, newleavetype, durationrule,belongdate " ;
" group by resourceid, newleavetype, durationrule,belongdate " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1321,8 +1126,8 @@ public class KQReportBiz extends BaseBean {
* @param user
* @param user
* @return
* @return
* /
* /
public Map < String , Object > getDailyFlowLeaveBackData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailyFlowLeaveBackData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1331,7 +1136,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1371,7 +1176,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
sql = " select resourceid, newleavetype, durationrule, sum(duration) as val,belongdate from hrmresource a, " + KqSplitFlowTypeEnum . LEAVEBACK . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, newleavetype, durationrule,belongdate " ;
" group by resourceid, newleavetype, durationrule,belongdate " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1411,8 +1216,8 @@ public class KQReportBiz extends BaseBean {
* 获 取 实 际 加 班 数 据 , 包 括 流 程 , 打 卡 生 成 的
* 获 取 实 际 加 班 数 据 , 包 括 流 程 , 打 卡 生 成 的
* @return
* @return
* /
* /
public Map < String , Object > getFlowOverTimeDataNew ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowOverTimeDataNew ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1421,7 +1226,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1519,8 +1324,8 @@ public class KQReportBiz extends BaseBean {
* 获 取 加 班 数 据
* 获 取 加 班 数 据
* @return
* @return
* /
* /
public Map < String , Object > getFlowOverTimeData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowOverTimeData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1529,7 +1334,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1580,7 +1385,7 @@ public class KQReportBiz extends BaseBean {
}
}
sql = " select resourceid,changeType, " + valueField +
sql = " select resourceid,changeType, " + valueField +
" from hrmresource a, " + KqSplitFlowTypeEnum . OVERTIME . getTablename ( ) + " b " +
" from hrmresource a, " + KqSplitFlowTypeEnum . OVERTIME . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid,changeType,durationrule " ;
" group by resourceid,changeType,durationrule " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1617,8 +1422,8 @@ public class KQReportBiz extends BaseBean {
* 获 取 每 日 加 班 数 据
* 获 取 每 日 加 班 数 据
* @return
* @return
* /
* /
public Map < String , Object > getDailyFlowOverTimeData ( Map < String , Object > params , User user ) {
public Map < String , Object > getDailyFlowOverTimeData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1627,7 +1432,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1722,8 +1527,8 @@ public class KQReportBiz extends BaseBean {
* 异 常 冲 抵
* 异 常 冲 抵
* @return
* @return
* /
* /
public Map < String , Object > getFlowOtherData ( Map < String , Object > params , User user ) {
public Map < String , Object > getFlowOtherData ( Map < String , Object > params , User user ) {
Map < String , Object > datas = new HashMap < > ( ) ; ;
Map < String , Object > datas = new HashMap < > ( ) ; ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
String sqlWhere = " " ;
String sqlWhere = " " ;
@ -1734,7 +1539,7 @@ public class KQReportBiz extends BaseBean {
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
JSONObject jsonObj = JSON . parseObject ( Util . null2String ( params . get ( "data" ) ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String fromDate = Util . null2String ( jsonObj . get ( "fromDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String toDate = Util . null2String ( jsonObj . get ( "toDate" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
String typeselect = Util . null2String ( jsonObj . get ( "typeselect" ) ) ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( typeselect . length ( ) = = 0 ) typeselect = "3" ;
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( ! typeselect . equals ( "" ) & & ! typeselect . equals ( "0" ) & & ! typeselect . equals ( "6" ) ) {
if ( typeselect . equals ( "1" ) ) {
if ( typeselect . equals ( "1" ) ) {
@ -1774,7 +1579,7 @@ public class KQReportBiz extends BaseBean {
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
sqlWhere + = " and a.loginid is not null " + ( rs . getDBType ( ) . equals ( "oracle" ) ? "" : " and a.loginid<>'' " ) ;
}
}
sql = " select resourceid, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . OTHER . getTablename ( ) + " b " +
sql = " select resourceid, durationrule, sum(duration) as val from hrmresource a, " + KqSplitFlowTypeEnum . OTHER . getTablename ( ) + " b " +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" where a.id = b.resourceid and belongdate >='" + fromDate + "' and belongdate <='" + toDate + "' " + sqlWhere +
" group by resourceid, durationrule " ;
" group by resourceid, durationrule " ;
rs . execute ( sql ) ;
rs . execute ( sql ) ;
@ -1814,13 +1619,13 @@ public class KQReportBiz extends BaseBean {
* @param toDate
* @param toDate
* @return
* @return
* /
* /
public Map < String , Object > getDetialDatas ( String resourceId , String fromDate , String toDate , User user ) {
public Map < String , Object > getDetialDatas ( String resourceId , String fromDate , String toDate , User user ) {
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
Map < String , Object > datas = new HashMap < > ( ) ;
Map < String , Object > datas = new HashMap < > ( ) ;
Map < String , Object > data = null ;
Map < String , Object > data = null ;
Map < String , Object > tmpdatas = new HashMap < > ( ) ;
Map < String , Object > tmpdatas = new HashMap < > ( ) ;
Map < String , Object > tmpdata = null ;
Map < String , Object > tmpdata = null ;
Map < String , Object > tmpmap = null ;
Map < String , Object > tmpmap = null ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String sql = "" ;
String sql = "" ;
try {
try {
@ -1850,12 +1655,12 @@ public class KQReportBiz extends BaseBean {
if ( datas . get ( key ) = = null ) {
if ( datas . get ( key ) = = null ) {
data = new HashMap < > ( ) ;
data = new HashMap < > ( ) ;
} else {
} else {
data = ( Map < String , Object > ) datas . get ( key ) ;
data = ( Map < String , Object > ) datas . get ( key ) ;
tmptext = Util . null2String ( data . get ( "text" ) ) ;
tmptext = Util . null2String ( data . get ( "text" ) ) ;
}
}
tmpdata = new HashMap < > ( ) ;
tmpdata = new HashMap < > ( ) ;
if ( tmpdatas . get ( key ) ! = null ) {
if ( tmpdatas . get ( key ) ! = null ) {
tmpmap = ( Map < String , Object > ) tmpdatas . get ( key ) ;
tmpmap = ( Map < String , Object > ) tmpdatas . get ( key ) ;
flag = Util . null2String ( tmpmap . get ( "text" ) ) ;
flag = Util . null2String ( tmpmap . get ( "text" ) ) ;
}
}
@ -1894,10 +1699,10 @@ public class KQReportBiz extends BaseBean {
}
}
}
}
if ( leaveMins > 0 ) { //请假
if ( leaveMins > 0 ) { //请假
Map < String , Object > jsonObject = null ;
Map < String , Object > jsonObject = null ;
if ( leaveInfo . length ( ) > 0 ) {
if ( leaveInfo . length ( ) > 0 ) {
jsonObject = JSON . parseObject ( leaveInfo ) ;
jsonObject = JSON . parseObject ( leaveInfo ) ;
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
String newLeaveType = entry . getKey ( ) ;
String newLeaveType = entry . getKey ( ) ;
String tmpLeaveMins = Util . null2String ( entry . getValue ( ) ) ;
String tmpLeaveMins = Util . null2String ( entry . getValue ( ) ) ;
if ( text . indexOf ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ) = = - 1 ) {
if ( text . indexOf ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ) = = - 1 ) {
@ -1944,10 +1749,10 @@ public class KQReportBiz extends BaseBean {
//全部搞一遍
//全部搞一遍
if ( tmpdatas ! = null ) {
if ( tmpdatas ! = null ) {
// writeLog(n+">>>tmpdatas="+JSONObject.toJSONString(tmpdatas));
// writeLog(n+">>>tmpdatas="+JSONObject.toJSONString(tmpdatas));
Map < String , Object > data1 = null ;
Map < String , Object > data1 = null ;
for ( Entry < String , Object > entry : tmpdatas . entrySet ( ) ) {
for ( Entry < String , Object > entry : tmpdatas . entrySet ( ) ) {
String mapKey = Util . null2String ( entry . getKey ( ) ) ;
String mapKey = Util . null2String ( entry . getKey ( ) ) ;
Map < String , Object > mapValue = ( Map < String , Object > ) entry . getValue ( ) ;
Map < String , Object > mapValue = ( Map < String , Object > ) entry . getValue ( ) ;
String flag = Util . null2String ( mapValue . get ( "text" ) ) ;
String flag = Util . null2String ( mapValue . get ( "text" ) ) ;
if ( "true" . equals ( flag ) ) { //需要加工的数据
if ( "true" . equals ( flag ) ) { //需要加工的数据
data1 = new HashMap < > ( ) ;
data1 = new HashMap < > ( ) ;
@ -2003,11 +1808,11 @@ public class KQReportBiz extends BaseBean {
return serialCount ;
return serialCount ;
}
}
public static String getSignStatus ( Map < String , Object > signInfo , User user ) {
public static String getSignStatus ( Map < String , Object > signInfo , User user ) {
return getSignStatus ( signInfo , user , "" ) ;
return getSignStatus ( signInfo , user , "" ) ;
}
}
public static String getSignStatus ( Map < String , Object > signInfo , User user , String onOrOff ) {
public static String getSignStatus ( Map < String , Object > signInfo , User user , String onOrOff ) {
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
KQLeaveRulesComInfo kqLeaveRulesComInfo = new KQLeaveRulesComInfo ( ) ;
String text = "" ;
String text = "" ;
String workdate = Util . null2String ( signInfo . get ( "workdate" ) ) ;
String workdate = Util . null2String ( signInfo . get ( "workdate" ) ) ;
@ -2027,32 +1832,21 @@ public class KQReportBiz extends BaseBean {
int evectionMins = Util . getIntValue ( Util . null2String ( signInfo . get ( "evectionMins" ) ) ) ;
int evectionMins = Util . getIntValue ( Util . null2String ( signInfo . get ( "evectionMins" ) ) ) ;
int outMins = Util . getIntValue ( Util . null2String ( signInfo . get ( "outMins" ) ) ) ;
int outMins = Util . getIntValue ( Util . null2String ( signInfo . get ( "outMins" ) ) ) ;
String resourceId = Util . null2String ( signInfo . get ( "resourceId" ) ) ;
String kqDate = Util . null2String ( signInfo . get ( "kqdate" ) ) ;
String flowinfo = Util . null2String ( signInfo . get ( "flowinfo" ) ) ;
KQTimesArrayComInfo kqTimesArrayComInfo = new KQTimesArrayComInfo ( ) ;
int split_time_index = 0 ;
ShiftInfoBean shiftInfoBean = KQDurationCalculatorUtil . getWorkTime ( resourceId , kqDate , false ) ;
List < int [ ] > halfWorkIndex = shiftInfoBean . getHalfWorkIndex ( ) ;
if ( halfWorkIndex ! = null & & ! halfWorkIndex . isEmpty ( ) ) {
int [ ] halfWorkIndexs = halfWorkIndex . get ( 0 ) ;
split_time_index = halfWorkIndexs [ 1 ] ; //半天的时间
}
if ( worktime . length ( ) > 0 ) {
if ( worktime . length ( ) > 0 ) {
if ( absenteeismMins > 0 ) { //旷工
if ( absenteeismMins > 0 ) { //旷工
text = SystemEnv . getHtmlLabelName ( 20085 , user . getLanguage ( ) ) + absenteeismMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 20085 , user . getLanguage ( ) ) + absenteeismMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
} else {
} else {
if ( beLateMins > 0 ) { //迟到
if ( beLateMins > 0 ) { //迟到
text = SystemEnv . getHtmlLabelName ( 20081 , user . getLanguage ( ) ) + beLateMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 20081 , user . getLanguage ( ) ) + beLateMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
}
}
if ( graveBeLateMins > 0 ) { //严重迟到
if ( graveBeLateMins > 0 ) { //严重迟到
text = SystemEnv . getHtmlLabelName ( 500546 , user . getLanguage ( ) ) + graveBeLateMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 500546 , user . getLanguage ( ) ) + graveBeLateMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
}
}
if ( leaveEarlyMins > 0 ) { //早退
if ( leaveEarlyMins > 0 ) { //早退
text = SystemEnv . getHtmlLabelName ( 20082 , user . getLanguage ( ) ) + leaveEarlyMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 20082 , user . getLanguage ( ) ) + leaveEarlyMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
}
}
if ( graveLeaveEarlyMins > 0 ) { //严重早退
if ( graveLeaveEarlyMins > 0 ) { //严重早退
text = SystemEnv . getHtmlLabelName ( 500547 , user . getLanguage ( ) ) + graveLeaveEarlyMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 500547 , user . getLanguage ( ) ) + graveLeaveEarlyMins + SystemEnv . getHtmlLabelName ( 15049 , user . getLanguage ( ) ) ;
}
}
if ( forgotCheckMins > 0 ) { //漏签
if ( forgotCheckMins > 0 ) { //漏签
text = SystemEnv . getHtmlLabelName ( 20086 , user . getLanguage ( ) ) ;
text = SystemEnv . getHtmlLabelName ( 20086 , user . getLanguage ( ) ) ;
@ -2065,72 +1859,22 @@ public class KQReportBiz extends BaseBean {
}
}
if ( leaveMins > 0 ) { //请假
if ( leaveMins > 0 ) { //请假
Map < String , Object > jsonObject = null ;
Map < String , Object > jsonObject = null ;
// if(leaveInfo.length()>0){
if ( leaveInfo . length ( ) > 0 ) {
// jsonObject = JSON.parseObject(leaveInfo);
jsonObject = JSON . parseObject ( leaveInfo ) ;
// for (Map.Entry<String,Object> entry : jsonObject.entrySet()) {
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
// String newLeaveType = entry.getKey();
String newLeaveType = entry . getKey ( ) ;
// String tmpLeaveMins = Util.null2String(entry.getValue());
String tmpLeaveMins = Util . null2String ( entry . getValue ( ) ) ;
// if(text.indexOf(kqLeaveRulesComInfo.getLeaveName(newLeaveType))==-1){
if ( text . indexOf ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ) = = - 1 ) {
// if (text.length() > 0) text += " ";
// //text += kqLeaveRulesComInfo.getLeaveName(newLeaveType)+tmpLeaveMins+SystemEnv.getHtmlLabelName(15049, user.getLanguage());
// text += Util.formatMultiLang(kqLeaveRulesComInfo.getLeaveName(newLeaveType),""+user.getLanguage());
// }
// }
// }else{
// if(text.indexOf(SystemEnv.getHtmlLabelName(670, user.getLanguage()))==-1) {
// if (text.length() > 0) text += " ";
// text += SystemEnv.getHtmlLabelName(670, user.getLanguage());
// }
// }
if ( flowinfo . length ( ) > 0 ) {
jsonObject = JSON . parseObject ( flowinfo ) ;
String jsonKey = "" ;
String jsonValue = "" ;
if ( jsonObject . containsKey ( FlowReportTypeEnum . LEAVE . getFlowType ( ) ) ) {
jsonKey = FlowReportTypeEnum . LEAVE . getFlowType ( ) ;
jsonValue = SystemEnv . getHtmlLabelName ( 670 , user . getLanguage ( ) ) ;
}
if ( jsonKey . length ( ) > 0 ) {
JSONArray jsonArray = ( JSONArray ) jsonObject . get ( jsonKey ) ;
String text4temp = "" ;
if ( jsonArray ! = null & & ! jsonArray . isEmpty ( ) ) {
//客户不存在多个重复流程的情况,只是显示第一个就行
for ( int i = 0 ; i < jsonArray . size ( ) ; i + + ) {
JSONObject jsonObject1 = ( JSONObject ) jsonArray . get ( i ) ;
if ( jsonObject1 ! = null & & ! jsonObject1 . isEmpty ( ) ) {
String newLeaveType = Util . null2s ( Util . null2String ( jsonObject1 . get ( "newLeaveType" ) ) , "" ) ;
String begintime = Util . null2s ( Util . null2String ( jsonObject1 . get ( "begintime" ) ) , "" ) ;
String endtime = Util . null2s ( Util . null2String ( jsonObject1 . get ( "endtime" ) ) , "" ) ;
int beginIdx = kqTimesArrayComInfo . getArrayindexByTimes ( begintime ) ;
int endIdx = kqTimesArrayComInfo . getArrayindexByTimes ( endtime ) ;
if ( jsonKey . equalsIgnoreCase ( FlowReportTypeEnum . LEAVE . getFlowType ( ) ) ) {
if ( newLeaveType . length ( ) > 0 ) {
jsonValue = kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ;
}
}
if ( beginIdx < = split_time_index & & endIdx < = split_time_index ) {
//上午
if ( "on" . equalsIgnoreCase ( onOrOff ) ) {
text4temp = jsonValue ;
}
} else if ( beginIdx > = split_time_index & & endIdx > = split_time_index ) {
//下午
if ( "off" . equalsIgnoreCase ( onOrOff ) ) {
text4temp = jsonValue ;
}
} else {
//全天
text4temp = jsonValue ;
}
}
}
if ( text4temp . length ( ) > 0 ) {
if ( text . length ( ) > 0 ) text + = " " ;
if ( text . length ( ) > 0 ) text + = " " ;
text + = text4temp ;
//text += kqLeaveRulesComInfo.getLeaveName(newLeaveType)+tmpLeaveMins+SystemEnv.getHtmlLabelName(15049, user.getLanguage());
text + = Util . formatMultiLang ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) , "" + user . getLanguage ( ) ) ;
}
}
}
}
} else {
if ( text . indexOf ( SystemEnv . getHtmlLabelName ( 670 , user . getLanguage ( ) ) ) = = - 1 ) {
if ( text . length ( ) > 0 ) text + = " " ;
text + = SystemEnv . getHtmlLabelName ( 670 , user . getLanguage ( ) ) ;
}
}
}
}
}
}
@ -2148,14 +1892,14 @@ public class KQReportBiz extends BaseBean {
}
}
if ( text . equals ( "" ) ) {
if ( text . equals ( "" ) ) {
boolean needCal = new KQFormatBiz ( ) . needCal ( workdate , worktime ) ;
boolean needCal = new KQFormatBiz ( ) . needCal ( workdate , worktime ) ;
text = needCal ? SystemEnv . getHtmlLabelName ( 225 , user . getLanguage ( ) ) : "" ;
text = needCal ? SystemEnv . getHtmlLabelName ( 225 , user . getLanguage ( ) ) : "" ;
}
}
} else {
} else {
if ( leaveMins > 0 ) { //请假
if ( leaveMins > 0 ) { //请假
Map < String , Object > jsonObject = null ;
Map < String , Object > jsonObject = null ;
if ( leaveInfo . length ( ) > 0 ) {
if ( leaveInfo . length ( ) > 0 ) {
jsonObject = JSON . parseObject ( leaveInfo ) ;
jsonObject = JSON . parseObject ( leaveInfo ) ;
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
String newLeaveType = entry . getKey ( ) ;
String newLeaveType = entry . getKey ( ) ;
String tmpLeaveMins = Util . null2String ( entry . getValue ( ) ) ;
String tmpLeaveMins = Util . null2String ( entry . getValue ( ) ) ;
if ( text . indexOf ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ) = = - 1 ) {
if ( text . indexOf ( kqLeaveRulesComInfo . getLeaveName ( newLeaveType ) ) = = - 1 ) {
@ -2242,11 +1986,11 @@ public class KQReportBiz extends BaseBean {
return text ;
return text ;
}
}
public static boolean getShowFlowText ( String leaveInfo , String onOrOff ) {
public static boolean getShowFlowText ( String leaveInfo , String onOrOff ) {
Map < String , Object > jsonObject = null ;
Map < String , Object > jsonObject = null ;
jsonObject = JSON . parseObject ( leaveInfo ) ;
jsonObject = JSON . parseObject ( leaveInfo ) ;
String flow_signtype = "" ;
String flow_signtype = "" ;
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
for ( Entry < String , Object > entry : jsonObject . entrySet ( ) ) {
String tmpSignType = Util . null2String ( entry . getValue ( ) ) ;
String tmpSignType = Util . null2String ( entry . getValue ( ) ) ;
flow_signtype + = "," + tmpSignType ;
flow_signtype + = "," + tmpSignType ;
}
}
@ -2256,7 +2000,7 @@ public class KQReportBiz extends BaseBean {
return isShowFlowText ( flow_signtype , onOrOff ) ;
return isShowFlowText ( flow_signtype , onOrOff ) ;
}
}
public static boolean isShowFlowText ( String flow_signtype , String onOrOff ) {
public static boolean isShowFlowText ( String flow_signtype , String onOrOff ) {
boolean showFlowText = true ;
boolean showFlowText = true ;
if ( flow_signtype . length ( ) > 0 ) {
if ( flow_signtype . length ( ) > 0 ) {
@ -2400,7 +2144,7 @@ public class KQReportBiz extends BaseBean {
rs1 . executeUpdate ( delSql ) ;
rs1 . executeUpdate ( delSql ) ;
}
}
Map < String , String > result = kqFlowActiontBiz . handleKQFlowAction ( proc_set_id , usedetails , Util . getIntValue ( requestid ) , kqtype , Util . getIntValue ( workflowid ) , isForce1 , isUpgrade1 , map ) ;
Map < String , String > result = kqFlowActiontBiz . handleKQFlowAction ( proc_set_id , usedetails , Util . getIntValue ( requestid ) , kqtype , Util . getIntValue ( workflowid ) , isForce1 , isUpgrade1 , map ) ;
if ( ! result . isEmpty ( ) ) {
if ( ! result . isEmpty ( ) ) {
@ -2421,7 +2165,7 @@ public class KQReportBiz extends BaseBean {
* @param bcfs
* @param bcfs
* @return
* @return
* /
* /
public double getOverTimeCount ( String startdate , String enddate , String userid , String jblx , String bcfs ) {
public double getOverTimeCount ( String startdate , String enddate , String userid , String jblx , String bcfs ) {
double result = 0.00 ;
double result = 0.00 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
rs . executeQuery ( "select sum(gjsc) as count from uf_jbtz where gzrq >= ? and gzrq <= ? and jbr=? and jblx=? and bcfs=?" , startdate , enddate , userid , jblx , bcfs ) ;
rs . executeQuery ( "select sum(gjsc) as count from uf_jbtz where gzrq >= ? and gzrq <= ? and jbr=? and jblx=? and bcfs=?" , startdate , enddate , userid , jblx , bcfs ) ;
@ -2440,7 +2184,7 @@ public class KQReportBiz extends BaseBean {
* @param bcfs
* @param bcfs
* @return
* @return
* /
* /
public double getOverTimeDailyCount ( String kqdate , String userid , String jblx , String bcfs ) {
public double getOverTimeDailyCount ( String kqdate , String userid , String jblx , String bcfs ) {
double result = 0.00 ;
double result = 0.00 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
rs . executeQuery ( "select sum(gjsc) as count from uf_jbtz where gzrq = ? and jbr=? and jblx=? and bcfs=?" , kqdate , userid , jblx , bcfs ) ;
rs . executeQuery ( "select sum(gjsc) as count from uf_jbtz where gzrq = ? and jbr=? and jblx=? and bcfs=?" , kqdate , userid , jblx , bcfs ) ;
@ -2457,30 +2201,21 @@ public class KQReportBiz extends BaseBean {
* @param userid
* @param userid
* @return
* @return
* /
* /
public double getNightSubsidyDaily ( String kqdate , String userid ) {
public double getNightSubsidyDaily ( String kqdate , String userid ) {
double result = 0.00 ;
double result = 0.00 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
int sixnight_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "sixnight_serialid" ) ) ;
int sixnight_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "sixnight_serialid" ) ) ;
int twelvehours_night_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "twelvehours_night_serialid" ) ) ;
int twelvehours_night_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "twelvehours_night_serialid" ) ) ;
int night_rest_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "night_rest_serialid" ) ) ;
rs . executeQuery ( "select * from kq_format_total where kqdate = ? and resourceid=?" , kqdate , userid ) ;
rs . executeQuery ( "select * from kq_format_total where kqdate = ? and resourceid=?" , kqdate , userid ) ;
rs . writeLog ( "select * from kq_format_total where kqdate = '" + kqdate + "' and resourceid=" + userid ) ;
rs . writeLog ( "select * from kq_format_total where kqdate = '" + kqdate + "' and resourceid=" + userid ) ;
while ( rs . next ( ) ) {
while ( rs . next ( ) ) {
int serialid = Util . getIntValue ( rs . getString ( "serialid" ) ) ;
int serialid = Util . getIntValue ( rs . getString ( "serialid" ) ) ;
double attendanceMins = Util . getDoubleValue ( rs . getString ( "attendanceMins" ) , 0.00 ) ;
double attendanceMins = Util . getDoubleValue ( rs . getString ( "attendanceMins" ) , 0.00 ) ;
attendanceMins = attendanceMins / 60 ;
double overTimeTotal = getOverTimeTotal ( kqdate , userid ) ;
double overTimeTotal = getOverTimeTotal ( kqdate , userid ) ;
double time = attendanceMins + overTimeTotal ;
double time = attendanceMins + overTimeTotal ;
//1、 12小时工作制夜班、做六休一夜班有夜班补贴, 并且出勤( 上班时间+加班时间)>=8小时, 统计一次
if ( serialid = = sixnight_serialid | | serialid = = twelvehours_night_serialid ) {
if ( serialid = = sixnight_serialid | | serialid = = twelvehours_night_serialid ) {
if ( time > = 8 ) {
if ( time > = 8 ) {
result + + ;
result = 1 ;
}
}
//2、当一线人员排“夜休”班次, 并且加班台账当天导入的加班时长>=8小时, 统计一次。
if ( serialid = = night_rest_serialid ) {
if ( overTimeTotal > = 8 ) {
result + + ;
}
}
}
}
}
}
@ -2494,37 +2229,24 @@ public class KQReportBiz extends BaseBean {
* @param userid
* @param userid
* @return
* @return
* /
* /
public double getNightSubsidyTotal ( String fromDate , String toDate , String userid ) {
public double getNightSubsidyTotal ( String fromDate , String toDate , String userid ) {
double result = 0.00 ;
double result = 0.00 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
int sixnight_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "sixnight_serialid" ) ) ;
int sixnight_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "sixnight_serialid" ) ) ;
int twelvehours_night_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "twelvehours_night_serialid" ) ) ;
int twelvehours_night_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "twelvehours_night_serialid" ) ) ;
int night_rest_serialid = Integer . parseInt ( rs . getPropValue ( "nbjh_ygdjblc" , "night_rest_serialid" ) ) ;
rs . executeQuery ( "select * from kq_format_total where kqdate >= ? and kqdate <= ? and resourceid=?" , fromDate , toDate , userid ) ;
rs . executeQuery ( "select * from kq_format_total where kqdate >= ? and kqdate <= ? and resourceid=?" , fromDate , toDate , userid ) ;
rs . writeLog ( "select * from kq_format_total where kqdate >= '" + fromDate + "' and kqdate <= '" + toDate + "' and resourceid=" + userid ) ;
rs . writeLog ( "select * from kq_format_total where kqdate >= '" + fromDate + "' and kqdate <= '" + toDate + "' and resourceid=" + userid ) ;
while ( rs . next ( ) ) {
while ( rs . next ( ) ) {
int serialid = Util . getIntValue ( rs . getString ( "serialid" ) ) ;
int serialid = Util . getIntValue ( rs . getString ( "serialid" ) ) ;
String kqdate = Util . null2String ( rs . getString ( "kqdate" ) ) ;
String kqdate = Util . null2String ( rs . getString ( "kqdate" ) ) ;
double attendanceMins = Util . getDoubleValue ( rs . getString ( "attendanceMins" ) , 0.00 ) ;
double attendanceMins = Util . getDoubleValue ( rs . getString ( "attendanceMins" ) , 0.00 ) ;
attendanceMins = attendanceMins / 60 ;
rs . writeLog ( "========= getNightSubsidyTotal attendanceMins ========== " + attendanceMins ) ;
double overTimeTotal = getOverTimeTotal ( kqdate , userid ) ;
double overTimeTotal = getOverTimeTotal ( kqdate , userid ) ;
rs . writeLog ( "========= getNightSubsidyTotal overTimeTotal ========== " + overTimeTotal ) ;
double time = attendanceMins + overTimeTotal ;
double time = attendanceMins + overTimeTotal ;
rs . writeLog ( "========= getNightSubsidyTotal time ========== " + time ) ;
if ( serialid = = sixnight_serialid | | serialid = = twelvehours_night_serialid ) {
if ( serialid = = sixnight_serialid | | serialid = = twelvehours_night_serialid ) {
if ( time > = 8 ) {
if ( time > = 8 ) {
result + + ;
result + + ;
}
}
}
}
rs . writeLog ( "========= getNightSubsidyTotal result 111 ========== " + result ) ;
//2、当一线人员排“夜休”班次, 并且加班台账当天导入的加班时长>=8小时, 统计一次。
if ( serialid = = night_rest_serialid ) {
if ( overTimeTotal > = 8 ) {
result + + ;
}
}
rs . writeLog ( "========= getNightSubsidyTotal result 222 ========== " + result ) ;
}
}
return result ;
return result ;
}
}
@ -2535,7 +2257,7 @@ public class KQReportBiz extends BaseBean {
* @param userid
* @param userid
* @return
* @return
* /
* /
public double getOverTimeTotal ( String kqdate , String userid ) {
public double getOverTimeTotal ( String kqdate , String userid ) {
double result = 0.00 ;
double result = 0.00 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
rs . executeQuery ( "select sum(gjsc)as gjsc from uf_jbtz where gzrq=? and jbr=?" , kqdate , userid ) ;
rs . executeQuery ( "select sum(gjsc)as gjsc from uf_jbtz where gzrq=? and jbr=?" , kqdate , userid ) ;
@ -2552,17 +2274,18 @@ public class KQReportBiz extends BaseBean {
* @param userid
* @param userid
* @return
* @return
* /
* /
public int getFillCardCount ( String fromDate , String toDate , String userid ) {
public int getFillCardCount ( String fromDate , String toDate , String userid ) {
int result = 0 ;
int result = 0 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String tablename = rs . getPropValue ( "nbjh_ygdjblc" , "fillcard_table" ) ;
String tablename = rs . getPropValue ( "nbjh_ygdjblc" , "fillcard_table" ) ;
String tablename_dt = tablename + "_dt1" ;
String tablename_dt = tablename + "_dt1" ;
rs . executeQuery ( "select b.* from " + tablename + " a," + tablename_dt + " b,workflow_requestbase c " +
rs . executeQuery ( "select b.* from " + tablename + " a," + tablename_dt + " b,workflow_requestbase c " +
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
"and a. detail_signdate >=? and a.detail_signdate <=? and a.resourceId=?", fromDate , toDate , userid ) ;
"and a. ksrq >=? and a.jsrq <=? and a.resourceId=?", fromDate , toDate , userid ) ;
while ( rs . next ( ) ) {
if ( rs . next ( ) ) {
result + + ;
}
}
result = rs . getCounts ( ) ;
return result ;
return result ;
}
}
@ -2572,16 +2295,16 @@ public class KQReportBiz extends BaseBean {
* @param userid
* @param userid
* @return
* @return
* /
* /
public int getFillCardCountDaily ( String kqdate , String userid ) {
public int getFillCardCountDaily ( String kqdate , String userid ) {
int result = 0 ;
int result = 0 ;
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
String tablename = rs . getPropValue ( "nbjh_ygdjblc" , "fillcard_table" ) ;
String tablename = rs . getPropValue ( "nbjh_ygdjblc" , "fillcard_table" ) ;
String tablename_dt = tablename + "_dt1" ;
String tablename_dt = tablename + "_dt1" ;
rs . executeQuery ( "select b.* from " + tablename + " a," + tablename_dt + " b,workflow_requestbase c " +
rs . executeQuery ( "select b.* from " + tablename + " a," + tablename_dt + " b,workflow_requestbase c " +
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
"and b.detail_signdate =? and a.resourceId=?" , kqdate , userid ) ;
"and b.detail_signdate =? and a.resourceId=?" , kqdate , userid ) ;
while ( rs . next ( ) ) {
if ( rs . next ( ) ) {
result ++ ;
result = 1 ;
}
}
return result ;
return result ;
}
}