Revert "每日报表导出bug"

This reverts commit 04b390e0
dev
李栋 1 year ago
parent 04b390e056
commit 677e414802

@ -5,10 +5,12 @@ import com.alibaba.fastjson.JSONObject;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.core.interceptor.CommandContext;
import com.engine.hostar.util.HostarUtil;
import com.engine.kq.biz.*;
import com.engine.kq.cmd.shiftmanagement.toolkit.ShiftManagementToolKit;
import com.engine.kq.util.ExcelUtil;
import com.engine.kq.util.KQDurationCalculatorUtil;
import org.apache.commons.lang3.StringUtils;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
@ -20,7 +22,6 @@ import weaver.hrm.company.SubCompanyComInfo;
import weaver.hrm.job.JobTitlesComInfo;
import weaver.hrm.resource.ResourceComInfo;
import weaver.systeminfo.SystemEnv;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
@ -185,17 +186,17 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
forgotBeginWorkCheck_field = " isnull(b.forgotBeginWorkCheck,0) ";
}
String backFields = " zm.cccb as mealAllowance," +
" zm.zdcb as statAllowance," +
" zm.jmybcb as nightAllowance," +
" zm.hrzdcb as otherStatAllowance," +
" zm.ybbz as nightShiftSubsidy,"+
String backFields = " (select zm.cccb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as mealAllowance," +
" (select zm.zdcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as statAllowance," +
" (select zm.jmybcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as nightAllowance," +
" (select zm.hrzdcb from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as otherStatAllowance," +
" (select zm.ybbz from uf_cbxxjlb zm where zm.xm = a.id and zm.rq = b.kqdate) as nightShiftSubsidy," +
" a.id,a.lastname,a.subcompanyid1 as subcompanyid,a.departmentid, a.workcode,b.jobtitle,a.dsporder," +
" b.kqdate, b.workdays,b.workMins,b.serialid, b.attendancedays,FLOOR( b.attendanceMins / 30 ) * 30 AS attendanceMins ,b.beLate," +
" b.beLateMins,b.graveBeLate,b.graveBeLateMins,b.leaveEearly,b.leaveEarlyMins,b.graveLeaveEarly," +
" b.graveLeaveEarlyMins,b.absenteeism,b.signdays,b.signmins, "+
" b.absenteeismMins ,(b.forgotCheck+"+forgotBeginWorkCheck_field+") forgotCheck,zeropoint ";
String sqlFrom = " from hrmresource a, kq_format_total b,uf_cbxxjlb zm where a.id=b.resourceid and zm.xm=a.id and zm.rq=b.kqdate and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
String sqlFrom = " from hrmresource a, kq_format_total b where a.id= b.resourceid and b.kqdate >='"+fromDate+"' and b.kqdate <='"+toDate+"'";
String sqlWhere = rightSql;
if(subCompanyId.length()>0){
sqlWhere +=" and a.subcompanyid1 in("+subCompanyId+") ";
@ -540,7 +541,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
fieldValue = Util.null2String(rs.getString(fieldName));
fieldValue = getFieldValueByUnitType(fieldValue,kqReportFieldComInfo.getUnittype(fieldid));
}
if(!fieldName.equals("leave")) {
fieldValue = Util.formatMultiLang(fieldValue, "" + user.getLanguage());
data.add(fieldValue);

Loading…
Cancel
Save