报表代码还原

dev_zm
李栋 1 year ago
parent 57a78725a6
commit cff3198ba1

File diff suppressed because it is too large Load Diff

@ -5,15 +5,7 @@ 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.kq.biz.KQFormatBiz;
import com.engine.kq.biz.KQHolidaySetBiz;
import com.engine.kq.biz.KQLeaveRulesBiz;
import com.engine.kq.biz.KQOvertimeRulesBiz;
import com.engine.kq.biz.KQReportBiz;
import com.engine.kq.biz.KQReportFieldComInfo;
import com.engine.kq.biz.KQSettingsComInfo;
import com.engine.kq.biz.KQShiftManagementComInfo;
import com.engine.kq.biz.KQUnitBiz;
import com.engine.kq.biz.*;
import com.engine.kq.util.KQDurationCalculatorUtil;
import com.engine.kq.util.PageUidFactory;
import org.apache.commons.lang3.StringUtils;
@ -31,11 +23,7 @@ import weaver.hrm.resource.ResourceComInfo;
import weaver.systeminfo.SystemEnv;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
@ -198,11 +186,11 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
String definedFieldSum = Util.null2String(definedFieldInfo.get("definedFieldSum"));
//支援班次统计
String supportSerId = new BaseBean().getPropValue("nbkq_main", "supportSerId");
String backFields = " (select sum(zma.workdays) from kq_format_total zma where zma.resourceid = a.id and zma.kqdate >='" + fromDate + "' and zma.kqdate <='" + toDate + "' and (DATEPART(dw, zma.kqdate) = 7 or DATEPART(dw, zma.kqdate) = 1) AND zma.kqdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 AND zma.groupid = groupId)) as saturdayworkdays," +
String backFields = " (select sum(workdays) from kq_format_total where resourceid = a.id and kqdate >='" + fromDate + "' and kqdate <='" + toDate + "' and (DATEPART(dw, kqdate) = 7 or DATEPART(dw, kqdate) = 1)) as saturdayworkdays," +
" (select count(0) from kq_shiftschedule where resourceid = a.id and kqdate >='" + fromDate + "' and kqdate <='" + toDate + "' and serialid=" + supportSerId + " )as supportTotal," +
" (select sum(zma.attendancedays) from kq_format_total zma where zma.resourceid = a.id and zma.kqdate >='" + fromDate + "' and zma.kqdate <='" + toDate + "' and (DATEPART(dw, zma.kqdate) = 7 or DATEPART(dw, zma.kqdate) = 1) AND zma.kqdate NOT IN (select holidayDate from KQ_HolidaySet where changeType = 3 AND zma.groupid = groupId)) as saturdayattendancedays," +
" (select sum(zma.workdays) from kq_format_total zma where zma.resourceid = a.id and zma.kqdate >='" + fromDate + "' and zma.kqdate <='" + toDate + "' and ((DATEPART(dw, zma.kqdate) != 7 and DATEPART(dw, zma.kqdate) != 1) or ((DATEPART(dw, zma.kqdate) = 7 or DATEPART(dw, zma.kqdate) = 1) and zma.kqdate IN (select holidayDate from KQ_HolidaySet where changeType = 3 and zma.groupid = groupId)))) as weekdayworkdays," +
" (select sum(zma.attendancedays) from kq_format_total zma where zma.resourceid = a.id and zma.kqdate >='" + fromDate + "' and zma.kqdate <='" + toDate + "' and ((DATEPART(dw, zma.kqdate) != 7 and DATEPART(dw, zma.kqdate) != 1) or ((DATEPART(dw, zma.kqdate) = 7 or DATEPART(dw, zma.kqdate) = 1) and zma.kqdate IN (select holidayDate from KQ_HolidaySet where changeType = 3 and zma.groupid = groupId)))) as weekdayattendancedays," +
" (select sum(attendancedays) from kq_format_total where resourceid = a.id and kqdate >='" + fromDate + "' and kqdate <='" + toDate + "' and (DATEPART(dw, kqdate) = 7 or DATEPART(dw, kqdate) = 1)) as saturdayattendancedays," +
" (select sum(workdays) from kq_format_total where resourceid = a.id and kqdate >='" + fromDate + "' and kqdate <='" + toDate + "' and DATEPART(dw, kqdate) != 7 and DATEPART(dw, kqdate) != 1) as weekdayworkdays," +
" (select sum(attendancedays) from kq_format_total where resourceid = a.id and kqdate >='" + fromDate + "' and kqdate <='" + toDate + "' and DATEPART(dw, kqdate) != 7 and DATEPART(dw, kqdate) != 1) as weekdayattendancedays," +
"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(b.attendanceMins) as attendanceMins,sum(b.beLate) as beLate,sum(b.beLateMins) as beLateMins, " +
@ -341,10 +329,6 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
Map<String, Object> flowData = kqReportBiz.getFlowData(params, user);
Map<String, Object> saturdayFlowLeaveData = kqReportBiz.getSaturdayFlowLeaveData(params, user);
Map<String, Object> saturdayFlowLeaveBackData = kqReportBiz.getSaturdayFlowLeaveBackData(params, user);
if ((!CollectionUtils.isEmpty(saturdayFlowLeaveBackData)) || saturdayFlowLeaveBackData.size() > 0) {
saturdayFlowLeaveData.putAll(saturdayFlowLeaveBackData);
}
rs.execute(sql);
rs.writeLog("========== GetKQReportCmd sql ========== " + sql);
while (rs.next()) {
@ -516,11 +500,10 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
}
String sjbjcjRes = "0.0";
String hjsjRes = "0.0";
for (int ia = 0; allLeaveRules != null && ia < allLeaveRules.size(); ia++) {
leaveRule = (Map<String, Object>) allLeaveRules.get(ia);
int i = Integer.valueOf(leaveRule.get("id").toString());
for (int i = 0; allLeaveRules != null && i < allLeaveRules.size(); i++) {
if (((!CollectionUtils.isEmpty(sjbjcjidList)) && sjbjcjidList.contains(i)) ||
((!CollectionUtils.isEmpty(hjsjidList)) && hjsjidList.contains(i))) {
leaveRule = (Map<String, Object>) allLeaveRules.get(i);
String flowType = Util.null2String("leaveType_" + leaveRule.get("id"));
String leaveData = Util.null2String(saturdayFlowLeaveData.get(id + "|" + flowType));
String flowLeaveBackType = Util.null2String("leavebackType_" + leaveRule.get("id"));

@ -28,6 +28,7 @@ import java.util.*;
import java.io.*;
import java.net.*;
import com.sun.net.ssl.internal.www.protocol.https.BASE64Encoder;
import org.apache.oro.text.regex.*;
import weaver.system.*;
@ -1478,7 +1479,7 @@ public class SendMail extends MailErrorBean {
InputStream is = (InputStream) fileContentList.get(i);
String filename = (String) fileNameList.get(i);
String ctype = FileTypeMap.getDefaultFileTypeMap().getContentType(filename);
sun.misc.BASE64Encoder enc = new sun.misc.BASE64Encoder();
BASE64Encoder enc = new BASE64Encoder();
filename = "=?UTF-8?B?" + enc.encode(filename.getBytes("UTF-8")) + "?=";
filename = filename.replace("\n", ""); // 当文件名过长时
StringBuffer sb = new StringBuffer(filename.length()); // 需要

Loading…
Cancel
Save