StringbackFields=" (select sum(zm.cccb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as mealAllowance," +
" (select sum(zm.zdcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as statAllowance," +
" (select sum(zm.jmybcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as nightAllowance," +
" (select sum(zm.hrzdcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as otherStatAllowance," +
" (select sum(zm.ybbz) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as nightShiftSubsidy," +
StringbackFields=" sum(zm.cccb) as mealAllowance," +
" sum(zm.zdcb) as statAllowance," +
" sum(zm.jmybcb) as nightAllowance," +
" sum(zm.hrzdcb) as otherStatAllowance," +
" sum(zm.ybbz) as nightShiftSubsidy," +
" a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1 as subcompanyid,a.departmentid,a.jobtitle,"+
" sum(b.workdays) as workdays,sum(b.workMins) as workMins,sum(b.attendancedays) as attendancedays,"+
" sum(FLOOR( b.attendanceMins / 30 ) * 30 ) as attendanceMins,sum(b.beLate) as beLate,sum(b.beLateMins) as beLateMins, "+
@ -222,7 +222,8 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
StringsqlFrom=" from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
StringsqlFrom=" from hrmresource a JOIN kq_format_total b ON a.id = b.resourceid LEFT JOIN uf_cbxxjlb zm ON zm.xm = a.id AND zm.rq >= '"+fromDate+"' AND zm.rq <= '"+toDate+"'"+
" where b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
StringsqlWhere=rightSql;
StringgroupBy=" group by a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1,a.departmentid,a.jobtitle ";
if(subCompanyId.length()>0){
@ -278,22 +279,22 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
Map<String, Double> attendanceMap = new HashMap<>();
String acqAttendanceSql = "select a.id, b.attendanceMins, b.kqdate from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"' "+sqlWhere;
// Map<String, Double> attendanceMap = new HashMap<>();
// String acqAttendanceSql = "select a.id, b.attendanceMins, b.kqdate from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"' "+sqlWhere;
StringbackFields=" (select sum(zm.cccb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as mealAllowance," +
" (select sum(zm.zdcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as statAllowance," +
" (select sum(zm.jmybcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as nightAllowance," +
" (select sum(zm.hrzdcb) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as otherStatAllowance," +
" (select sum(zm.ybbz) from uf_cbxxjlb zm where zm.xm = a.id and zm.rq >= '" +fromDate+"' and zm.rq <= '"+toDate+"') as nightShiftSubsidy," +
StringbackFields=" sum(zm.cccb) as mealAllowance," +
" sum(zm.zdcb) as statAllowance," +
" sum(zm.jmybcb) as nightAllowance," +
" sum(zm.hrzdcb) as otherStatAllowance," +
" sum(zm.ybbz) as nightShiftSubsidy," +
" a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1 as subcompanyid,a.departmentid,a.jobtitle,"+
" sum(b.workdays) as workdays,sum(b.workMins) as workMins,sum(b.attendancedays) as attendancedays,"+
" sum(FLOOR( b.attendanceMins / 30 ) * 30 ) as attendanceMins,sum(b.beLate) as beLate,sum(b.beLateMins) as beLateMins, "+
@ -190,7 +190,8 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
StringsqlFrom=" from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
StringsqlFrom=" from hrmresource a JOIN kq_format_total b ON a.id = b.resourceid LEFT JOIN uf_cbxxjlb zm ON zm.xm = a.id AND zm.rq >= '"+fromDate+"' AND zm.rq <= '"+toDate+"'"+
"where b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
StringsqlWhere=rightSql;
StringgroupBy=" group by a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1,a.departmentid,a.jobtitle ";
if(subCompanyId.length()>0){
@ -327,7 +328,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
// /*考勤二开--驻点餐补start*/
HostarUtil hostarUtil = new HostarUtil();
// HostarUtil hostarUtil = new HostarUtil();
// Map<String, Double> attendanceMap = new HashMap<>();
// String acqAttendanceSql = "select a.id, b.attendanceMins, b.kqdate from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"' "+sqlWhere;