餐补报表优化

dev-ld
zhangming 1 year ago
parent 93a9d1f237
commit 33722523d3

@ -380,11 +380,11 @@ public class KQReportBiz extends BaseBean {
datas.putAll(getDailyFlowLeaveBackData(params,user));
/*考勤二开--出差公出流程餐补统计start*/
long startTime = System.currentTimeMillis();
datas.putAll(getDailyMealAllowanceData(params,user));
long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime; // 执行时间
bb.writeLog("getDailyMealAllowanceData执行时间" + elapsedTime/1000 + "秒");
// long startTime = System.currentTimeMillis();
// datas.putAll(getDailyMealAllowanceData(params,user));
// long endTime = System.currentTimeMillis();
// long elapsedTime = endTime - startTime; // 执行时间
// bb.writeLog("getDailyMealAllowanceData执行时间" + elapsedTime/1000 + "秒");
/*考勤二开--出差公出流程餐补统计end*/
// /*考勤二开--计算驻点餐补start*/
@ -392,22 +392,22 @@ public class KQReportBiz extends BaseBean {
// /*考勤二开--计算驻点餐补end*/
//获取加班时长
Map<String, Object> dailyFlowOverTimeData = getDailyFlowOverTimeDataAllowance(params, user);
/*考勤二开--计算精密夜班餐补start*/
startTime = System.currentTimeMillis();
datas.putAll(getDailyNightShiftAllowanceDataTemp(params,user,dailyFlowOverTimeData));
endTime = System.currentTimeMillis();
elapsedTime = endTime - startTime; // 执行时间
bb.writeLog("getDailyNightShiftAllowanceData执行时间" + elapsedTime/1000 + "秒");
/*考勤二开--计算精密夜班餐补end*/
/*考勤二开--计算鸿仁驻点餐补start*/
startTime = System.currentTimeMillis();
datas.putAll(getDailyOtherStatAllowanceDataTemp(params,user,dailyFlowOverTimeData));
endTime = System.currentTimeMillis();
elapsedTime = endTime - startTime; // 执行时间
bb.writeLog("getDailyOtherStatAllowanceData执行时间" + elapsedTime/1000 + "秒");
// Map<String, Object> dailyFlowOverTimeData = getDailyFlowOverTimeDataAllowance(params, user);
//
// /*考勤二开--计算精密夜班餐补start*/
// startTime = System.currentTimeMillis();
// datas.putAll(getDailyNightShiftAllowanceDataTemp(params,user,dailyFlowOverTimeData));
// endTime = System.currentTimeMillis();
// elapsedTime = endTime - startTime; // 执行时间
// bb.writeLog("getDailyNightShiftAllowanceData执行时间" + elapsedTime/1000 + "秒");
// /*考勤二开--计算精密夜班餐补end*/
//
// /*考勤二开--计算鸿仁驻点餐补start*/
// startTime = System.currentTimeMillis();
// datas.putAll(getDailyOtherStatAllowanceDataTemp(params,user,dailyFlowOverTimeData));
// endTime = System.currentTimeMillis();
// elapsedTime = endTime - startTime; // 执行时间
// bb.writeLog("getDailyOtherStatAllowanceData执行时间" + elapsedTime/1000 + "秒");
/*考勤二开--计算鸿仁驻点餐补end*/
@ -432,7 +432,7 @@ public class KQReportBiz extends BaseBean {
/*考勤二开--出差公出流程餐补统计start*/
datas.putAll(getDailyMealAllowanceData(params,user));
// datas.putAll(getDailyMealAllowanceData(params,user));
/*考勤二开--出差公出流程餐补统计end*/
/*考勤二开--计算驻点餐补start*/
@ -444,11 +444,11 @@ public class KQReportBiz extends BaseBean {
/*考勤二开--计算驻点餐补end*/
/*考勤二开--计算精密夜班餐补start*/
datas.putAll(getDailyNightShiftAllowanceData(params,user));
// datas.putAll(getDailyNightShiftAllowanceData(params,user));
/*考勤二开--计算精密夜班餐补end*/
/*考勤二开--计算鸿仁驻点餐补start*/
datas.putAll(getDailyOtherStatAllowanceData(params,user));
// datas.putAll(getDailyOtherStatAllowanceData(params,user));
/*考勤二开--计算鸿仁驻点餐补end*/

@ -48,6 +48,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
RecordSet rs = new RecordSet();
String sql = "";
try {
bb.writeLog("ExportDailyExcelCmd start.");
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
ResourceComInfo resourceComInfo = new ResourceComInfo();
@ -185,7 +186,12 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
forgotBeginWorkCheck_field = " isnull(b.forgotBeginWorkCheck,0) ";
}
String backFields = " a.id,a.lastname,a.subcompanyid1 as subcompanyid,a.departmentid, a.workcode,b.jobtitle,a.dsporder," +
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, "+
@ -232,34 +238,37 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
KQSettingsComInfo kqSettingsComInfo = new KQSettingsComInfo();
String isShowFullPath = Util.null2String(kqSettingsComInfo.getMain_val(fullPathMainKey),"0");
long startTime = System.currentTimeMillis();
Map<String,Object> flowData = kqReportBiz.getDailyFlowData(params,user);
/*考勤二开--驻点餐补start*/
HostarUtil hostarUtil = new HostarUtil();
List<String> subComoanyList = new ArrayList<>();
String acqNoStatAllSql = "select subcompany from uf_NoStatAllSubCom where isdelete = 0 or isdelete is null";
rs.executeQuery(acqNoStatAllSql);
while (rs.next()) {
String subcompany = Util.null2String(rs.getString("subcompany"));
if (StringUtils.isNotBlank(subcompany)) {
subComoanyList.add(subcompany);
}
}
bb.writeLog("subComoanyList: " + subComoanyList);
/*考勤二开--驻点餐补end*/
/*考勤二开--夜班餐补start*/
String nightshiftsub = Util.null2String(bb.getPropValue("project_hostar", "nightshiftsubcompany"));
List<String> nightshifts = new ArrayList<String>();
String acqSerialSql = " select shift from uf_nightshiftmanage where isdelete is null or isdelete = 0";
rs.executeQuery(acqSerialSql);
while (rs.next()) {
String serial = Util.null2String(rs.getString("shift"));
if (StringUtils.isNotBlank(serial)) {
nightshifts.add(serial);
}
}
/*考勤二开--夜班餐补end*/
long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime; // 执行时间
bb.writeLog("getDailyMealAllowanceData执行时间" + elapsedTime/1000 + "秒");
// /*考勤二开--驻点餐补start*/
// HostarUtil hostarUtil = new HostarUtil();
// List<String> subComoanyList = new ArrayList<>();
// String acqNoStatAllSql = "select subcompany from uf_NoStatAllSubCom where isdelete = 0 or isdelete is null";
// rs.executeQuery(acqNoStatAllSql);
// while (rs.next()) {
// String subcompany = Util.null2String(rs.getString("subcompany"));
// if (StringUtils.isNotBlank(subcompany)) {
// subComoanyList.add(subcompany);
// }
// }
// bb.writeLog("subComoanyList: " + subComoanyList);
// /*考勤二开--驻点餐补end*/
// /*考勤二开--夜班餐补start*/
// String nightshiftsub = Util.null2String(bb.getPropValue("project_hostar", "nightshiftsubcompany"));
// List<String> nightshifts = new ArrayList<String>();
// String acqSerialSql = " select shift from uf_nightshiftmanage where isdelete is null or isdelete = 0";
// rs.executeQuery(acqSerialSql);
// while (rs.next()) {
// String serial = Util.null2String(rs.getString("shift"));
// if (StringUtils.isNotBlank(serial)) {
// nightshifts.add(serial);
// }
// }
// /*考勤二开--夜班餐补end*/
bb.writeLog("ExportDailyExcelCmd sql:" + sql);
rs.execute(sql);
while (rs.next()) {
data = new ArrayList<>();
@ -346,13 +355,13 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
fieldValue = Util.null2String(signDetailInfo.get("signoutstatus3"));
data.add(fieldValue);
continue;
} else if (fieldName.equals("mealAllowance")) {//考勤二开--出差餐补
int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
if (intValue < 0) {
intValue = 0;
}
data.add(intValue);
continue;
// } else if (fieldName.equals("mealAllowance")) {//考勤二开--出差餐补
// int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
// if (intValue < 0) {
// intValue = 0;
// }
// data.add(intValue);
// continue;
} else if(fieldName.equals("leave")){
//请假
List<Map<String, Object>> allLeaveRules = KQLeaveRulesBiz.getAllLeaveRules();
@ -451,81 +460,81 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
}catch (Exception e){
}
fieldValue = KQDurationCalculatorUtil.getDurationRound(businessLeave);
} else if ( "mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
if (intValue < 0) {
intValue = 0;
}
data.add(intValue);
continue;
} else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
if ( !subComoanyList.contains(subcompanyId)) {
params.put("statUser", id);
params.put("kqdate", kqdate);
// bb.writeLog("params: " + params );
long startTime = System.currentTimeMillis();
Map<String, Object> dailyStatAllowanceData = kqReportBiz.getDailyStatAllowanceData(params, user);
long endTime = System.currentTimeMillis();
long elapsedTime = endTime - startTime; // 执行时间
bb.writeLog("执行时间:" + elapsedTime/1000 + "秒");
if (dailyStatAllowanceData == null || dailyStatAllowanceData.size() == 0) {
fieldValue = "0";
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(dailyStatAllowanceData, id + "|DailyStatAllowance");
double temp = Util.getDoubleValue(Util.null2String(tempMap.get(id + "|DailyStatAllowance" + "|" + kqdate )));
if (temp <= 0) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
}
// bb.writeLog("fieldValue: " + fieldValue);
}
data.add(fieldValue);
continue;
} else if ("nightAllowance".equals(fieldName)) {//考勤二开--夜班餐补
String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
String serialid = Util.null2String(rs.getString("serialid"));
if ( !subComoanyList.contains(subcompanyId) && nightshifts.contains(serialid)) {
int temp = Util.getIntValue(Util.null2String(flowData.get(id + "|DailyNightShiftAllowanceData" + "|" + kqdate )));
if (temp <= 0) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
// bb.writeLog("fieldValue: " + fieldValue);
}
data.add( fieldValue);
continue;
} else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
params.put("subUserId", id);
// bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
if (temp == null || temp.size() == 0) {
data.add( "0");
} else {
int intValue = Math.max(Util.getIntValue(Util.null2String(temp.get(id + "|DailyStatAllowance" + kqdate))) , 0);
data.add( intValue);
}
} else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
int temp = Util.getIntValue(Util.null2String(flowData.get(id + "|DailyOtherStatAllowance" + "|" + kqdate )));
if (temp <= 0) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.add(fieldValue);
continue;
// } else if ( "mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
// int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
// if (intValue < 0) {
// intValue = 0;
// }
// data.add(intValue);
// continue;
// } else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
//
// String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
// if ( !subComoanyList.contains(subcompanyId)) {
//
// params.put("statUser", id);
// params.put("kqdate", kqdate);
//// bb.writeLog("params: " + params );
//
// long startTime = System.currentTimeMillis();
// Map<String, Object> dailyStatAllowanceData = kqReportBiz.getDailyStatAllowanceData(params, user);
// long endTime = System.currentTimeMillis();
// long elapsedTime = endTime - startTime; // 执行时间
// bb.writeLog("执行时间:" + elapsedTime/1000 + "秒");
//
// if (dailyStatAllowanceData == null || dailyStatAllowanceData.size() == 0) {
// fieldValue = "0";
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(dailyStatAllowanceData, id + "|DailyStatAllowance");
//
// double temp = Util.getDoubleValue(Util.null2String(tempMap.get(id + "|DailyStatAllowance" + "|" + kqdate )));
// if (temp <= 0) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
// }
//
//// bb.writeLog("fieldValue: " + fieldValue);
// }
// data.add(fieldValue);
// continue;
// } else if ("nightAllowance".equals(fieldName)) {//考勤二开--夜班餐补
// String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
// String serialid = Util.null2String(rs.getString("serialid"));
// if ( !subComoanyList.contains(subcompanyId) && nightshifts.contains(serialid)) {
// int temp = Util.getIntValue(Util.null2String(flowData.get(id + "|DailyNightShiftAllowanceData" + "|" + kqdate )));
// if (temp <= 0) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// }
// data.add( fieldValue);
// continue;
// } else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
// params.put("subUserId", id);
//// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
// if (temp == null || temp.size() == 0) {
// data.add( "0");
// } else {
// int intValue = Math.max(Util.getIntValue(Util.null2String(temp.get(id + "|DailyStatAllowance" + kqdate))) , 0);
// data.add( intValue);
// }
//
// } else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
// int temp = Util.getIntValue(Util.null2String(flowData.get(id + "|DailyOtherStatAllowance" + "|" + kqdate )));
// if (temp <= 0) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.add(fieldValue);
// continue;
} else if(fieldName.equals("kqdate")){
fieldValue=kqdate+" "+com.engine.portal.util.DateUtil.getDayWeekOfDate1(DateUtil.parseToDate(kqdate));
} else {
@ -553,6 +562,7 @@ public class ExportDailyExcelCmd extends AbstractCommonCommand<Map<String, Objec
retmap.putAll(exportMap);
retmap.put("status", "1");
} catch (Exception e) {
bb.writeLog("ExportDailyExcelCmd error:" + e.getMessage());
retmap.put("status", "-1");
retmap.put("message", SystemEnv.getHtmlLabelName(382661, user.getLanguage()));
writeLog(e);

@ -206,7 +206,12 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
Map<String,Object> definedFieldInfo = new KQFormatBiz().getDefinedField();
String definedFieldSum = Util.null2String(definedFieldInfo.get("definedFieldSum"));
String backFields = " a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1 as subcompanyid,a.departmentid,a.jobtitle," +
String backFields = " (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," +
" 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, " +
" sum(b.graveBeLate) as graveBeLate, sum(b.graveBeLateMins) as graveBeLateMins,sum(b.leaveEearly) as leaveEearly," +
@ -433,99 +438,99 @@ public class ExportExcelCmd extends AbstractCommonCommand<Map<String, Object>> {
}catch (Exception e){
}
fieldValue = KQDurationCalculatorUtil.getDurationRound(businessLeave);
} else if ("mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
// bb.writeLog("mealAllowance");
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, "DailyMealAllow|" + resourceId);
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
int tempValue = 0;
for (String key: tempMap.keySet()) {
int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(intValue, 0));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.add(fieldValue);
continue;
} else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
// bb.writeLog("statAllowance");
// bb.writeLog("flowData: " + flowData);
params.put("statUser", id);
bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getStatAllowanceData(params, user);
if (temp == null || temp.size() == 0) {
data.add( "0");
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|StatAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyStatAllowance");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(doubleValue, 0.00));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.add( fieldValue);
}
continue;
} else if ("nightAllowance".equals(fieldName)) {//考勤二开--精密夜班餐补
// bb.writeLog("nightAllowance");
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyNightShiftAllowanceData");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(doubleValue, 0.00));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.add(fieldValue);
continue;
} else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
params.put("subUserId", id);
bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
if (temp == null || temp.size() == 0) {
data.add( "0");
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|DailyNightShiftSubsidyData");
if ( !tempMap.isEmpty()) {
int tempValue = 0;
for (String key: tempMap.keySet()) {
int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(intValue, 0));
}
fieldValue = String.valueOf(tempValue);
}
data.add( fieldValue);
}
continue;
} else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
// bb.writeLog("otherStatAllowance");
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyOtherStatAllowance");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (doubleValue < 0.00 ? 0.00 : doubleValue);
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.add(fieldValue);
continue;
// } else if ("mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
//// bb.writeLog("mealAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, "DailyMealAllow|" + resourceId);
//// bb.writeLog("tempMap: " + tempMap);
//
// if ( !tempMap.isEmpty()) {
// int tempValue = 0;
// for (String key: tempMap.keySet()) {
// int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(intValue, 0));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.add(fieldValue);
// continue;
// } else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
//// bb.writeLog("statAllowance");
//// bb.writeLog("flowData: " + flowData);
// params.put("statUser", id);
// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getStatAllowanceData(params, user);
// if (temp == null || temp.size() == 0) {
// data.add( "0");
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|StatAllowance");
//
//// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyStatAllowance");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(doubleValue, 0.00));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.add( fieldValue);
// }
// continue;
// } else if ("nightAllowance".equals(fieldName)) {//考勤二开--精密夜班餐补
//// bb.writeLog("nightAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyNightShiftAllowanceData");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(doubleValue, 0.00));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.add(fieldValue);
// continue;
// } else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
// params.put("subUserId", id);
// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
// if (temp == null || temp.size() == 0) {
// data.add( "0");
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|DailyNightShiftSubsidyData");
//
// if ( !tempMap.isEmpty()) {
// int tempValue = 0;
// for (String key: tempMap.keySet()) {
// int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(intValue, 0));
// }
// fieldValue = String.valueOf(tempValue);
// }
// data.add( fieldValue);
// }
// continue;
// } else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
//// bb.writeLog("otherStatAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyOtherStatAllowance");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (doubleValue < 0.00 ? 0.00 : doubleValue);
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.add(fieldValue);
// continue;
} else if(Util.null2String(kqReportFieldComInfo.getCascadekey(fieldid)).length()>0){
fieldValue = Util.formatMultiLang(Util.null2String(rs.getString(fieldName)),""+user.getLanguage());
data.add(fieldValue);

@ -145,7 +145,12 @@ public class GetKQDailyReportCmd extends AbstractCommonCommand<Map<String, Objec
forgotBeginWorkCheck_field = " isnull(b.forgotBeginWorkCheck,0) ";
}
String backFields = " a.id,a.lastname,a.subcompanyid1 as subcompanyid,a.departmentid, a.workcode,b.jobtitle,a.dsporder," +
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.signdays,b.signmins, "+
@ -243,31 +248,31 @@ public class GetKQDailyReportCmd extends AbstractCommonCommand<Map<String, Objec
KQSettingsComInfo kqSettingsComInfo = new KQSettingsComInfo();
String isShowFullPath = Util.null2String(kqSettingsComInfo.getMain_val(fullPathMainKey),"0");
/*考勤二开--驻点餐补start*/
HostarUtil hostarUtil = new HostarUtil();
List<String> subComoanyList = new ArrayList<>();
String acqNoStatAllSql = "select subcompany from uf_NoStatAllSubCom where isdelete = 0 or isdelete is null";
rs.executeQuery(acqNoStatAllSql);
while (rs.next()) {
String subcompany = Util.null2String(rs.getString("subcompany"));
if (StringUtils.isNotBlank(subcompany)) {
subComoanyList.add(subcompany);
}
}
bb.writeLog("subComoanyList: " + subComoanyList);
/*考勤二开--驻点餐补end*/
/*考勤二开--夜班餐补start*/
String nightshiftsub = Util.null2String(bb.getPropValue("project_hostar", "nightshiftsubcompany"));
List<String> nightshifts = new ArrayList<String>();
String acqSerialSql = " select shift from uf_nightshiftmanage where isdelete is null or isdelete = 0";
rs.executeQuery(acqSerialSql);
while (rs.next()) {
String serial = Util.null2String(rs.getString("shift"));
if (StringUtils.isNotBlank(serial)) {
nightshifts.add(serial);
}
}
/*考勤二开--夜班餐补end*/
// /*考勤二开--驻点餐补start*/
// HostarUtil hostarUtil = new HostarUtil();
// List<String> subComoanyList = new ArrayList<>();
// String acqNoStatAllSql = "select subcompany from uf_NoStatAllSubCom where isdelete = 0 or isdelete is null";
// rs.executeQuery(acqNoStatAllSql);
// while (rs.next()) {
// String subcompany = Util.null2String(rs.getString("subcompany"));
// if (StringUtils.isNotBlank(subcompany)) {
// subComoanyList.add(subcompany);
// }
// }
// bb.writeLog("subComoanyList: " + subComoanyList);
// /*考勤二开--驻点餐补end*/
// /*考勤二开--夜班餐补start*/
// String nightshiftsub = Util.null2String(bb.getPropValue("project_hostar", "nightshiftsubcompany"));
// List<String> nightshifts = new ArrayList<String>();
// String acqSerialSql = " select shift from uf_nightshiftmanage where isdelete is null or isdelete = 0";
// rs.executeQuery(acqSerialSql);
// while (rs.next()) {
// String serial = Util.null2String(rs.getString("shift"));
// if (StringUtils.isNotBlank(serial)) {
// nightshifts.add(serial);
// }
// }
// /*考勤二开--夜班餐补end*/
bb.writeLog("每日报表sql: " + sql);
@ -358,89 +363,89 @@ public class GetKQDailyReportCmd extends AbstractCommonCommand<Map<String, Objec
if (fieldValue.length()>0) {//弹性工作制没有班次
data.put("serialid", shiftManagementToolKit.getShiftOnOffWorkSections(fieldValue, user.getLanguage()));
}
} else if (fieldName.equals("mealAllowance")) {//考勤二开--出差餐补
int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
if (intValue < 0) {
intValue = 0;
}
data.put(fieldName, intValue);
} else if (fieldName.equals("statAllowance")) {//考勤二开--驻点餐补
String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
if ( !subComoanyList.contains(subcompanyId)) {
params.put("statUser", id);
params.put("kqdate", kqdate);
bb.writeLog("params: " + params );
// long startTime = System.currentTimeMillis();
Map<String, Object> dailyStatAllowanceData = kqReportBiz.getDailyStatAllowanceData(params, user);
// long endTime = System.currentTimeMillis();
// long elapsedTime = endTime - startTime; // 执行时间
// bb.writeLog("执行时间:" + elapsedTime/1000 + "秒");
if (dailyStatAllowanceData == null || dailyStatAllowanceData.size() == 0) {
fieldValue = "0";
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(dailyStatAllowanceData, id + "|DailyStatAllowance");
// bb.writeLog("-=-=tempMap: " + tempMap);
// bb.writeLog("-=-=tempMap.key: " + id + "|DailyStatAllowance" + "|" + kqdate);
double temp = Util.getDoubleValue(Util.null2String(tempMap.get(id + "|DailyStatAllowance" + "|" + kqdate )));
// bb.writeLog("-=-=temp: " + temp);
if (temp <= 0) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
}
bb.writeLog("-=-=fieldValue: " + fieldValue);
}
data.put(fieldName, fieldValue);
} else if (fieldName.equals("nightAllowance")) {//考勤二开--精密夜班餐补
String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
String serialid = Util.null2String(rs.getString("serialid"));
if ( subcompanyId.equals(nightshiftsub) && nightshifts.contains(serialid)) {
// String key= id + "|DailyNightShiftAllowanceData" + "|" + kqdate;
// bb.writeLog("nightAllowance key: " + key );
double temp = Util.getDoubleValue(Util.null2String(flowData.get(id + "|DailyNightShiftAllowanceData" + "|" + kqdate )));
// bb.writeLog("nightAllowance temp: " + temp );
// bb.writeLog("nightAllowance kqdate: " + kqdate );
if (temp <= 0.00) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
// bb.writeLog("fieldValue: " + fieldValue);
}
data.put(fieldName, fieldValue);
} else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
params.put("subUserId", id);
bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
// bb.writeLog("nightShiftSubsidy temp: " + temp );
// bb.writeLog("nightShiftSubsidy temp.size: " + temp.size() );
// String key = id + "|DailyNightShiftSubsidyData" + kqdate;
// bb.writeLog("nightShiftSubsidy key: " + key );
if (temp == null || temp.size() == 0) {
data.put(fieldName, "0");
} else {
double doubleValue = Math.max(Util.getDoubleValue(Util.null2String(temp.get(id + "|DailyNightShiftSubsidyData|" + kqdate))) , 0.00);
// bb.writeLog("nightShiftSubsidy doubleValue: " + doubleValue );
// bb.writeLog("nightShiftSubsidy kqdate: " + kqdate );
data.put(fieldName, doubleValue);
}
} else if (fieldName.equals("otherStatAllowance")) {//考勤二开--鸿仁驻点餐补
double temp = Util.getDoubleValue(Util.null2String(flowData.get(id + "|DailyOtherStatAllowance" + "|" + kqdate )));
if (temp <= 0.00) {
fieldValue = "0";
} else {
fieldValue = String.valueOf(temp);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.put(fieldName, fieldValue);
// } else if (fieldName.equals("mealAllowance")) {//考勤二开--出差餐补
// int intValue = Util.getIntValue(Util.null2String(flowData.get("DailyMealAllow|" + resourceId + "|" + kqdate)));
// if (intValue < 0) {
// intValue = 0;
// }
// data.put(fieldName, intValue);
// } else if (fieldName.equals("statAllowance")) {//考勤二开--驻点餐补
// String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
//
// if ( !subComoanyList.contains(subcompanyId)) {
//
// params.put("statUser", id);
// params.put("kqdate", kqdate);
// bb.writeLog("params: " + params );
//
//// long startTime = System.currentTimeMillis();
// Map<String, Object> dailyStatAllowanceData = kqReportBiz.getDailyStatAllowanceData(params, user);
//// long endTime = System.currentTimeMillis();
//// long elapsedTime = endTime - startTime; // 执行时间
//// bb.writeLog("执行时间:" + elapsedTime/1000 + "秒");
//
// if (dailyStatAllowanceData == null || dailyStatAllowanceData.size() == 0) {
// fieldValue = "0";
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(dailyStatAllowanceData, id + "|DailyStatAllowance");
//// bb.writeLog("-=-=tempMap: " + tempMap);
//// bb.writeLog("-=-=tempMap.key: " + id + "|DailyStatAllowance" + "|" + kqdate);
// double temp = Util.getDoubleValue(Util.null2String(tempMap.get(id + "|DailyStatAllowance" + "|" + kqdate )));
//// bb.writeLog("-=-=temp: " + temp);
// if (temp <= 0) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
// }
//
// bb.writeLog("-=-=fieldValue: " + fieldValue);
// }
// data.put(fieldName, fieldValue);
// } else if (fieldName.equals("nightAllowance")) {//考勤二开--精密夜班餐补
// String subcompanyId = Util.null2String(rs.getString("subcompanyid"));
// String serialid = Util.null2String(rs.getString("serialid"));
// if ( subcompanyId.equals(nightshiftsub) && nightshifts.contains(serialid)) {
//// String key= id + "|DailyNightShiftAllowanceData" + "|" + kqdate;
//// bb.writeLog("nightAllowance key: " + key );
// double temp = Util.getDoubleValue(Util.null2String(flowData.get(id + "|DailyNightShiftAllowanceData" + "|" + kqdate )));
//// bb.writeLog("nightAllowance temp: " + temp );
//// bb.writeLog("nightAllowance kqdate: " + kqdate );
// if (temp <= 0.00) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// }
// data.put(fieldName, fieldValue);
// } else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
// params.put("subUserId", id);
// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
//// bb.writeLog("nightShiftSubsidy temp: " + temp );
//// bb.writeLog("nightShiftSubsidy temp.size: " + temp.size() );
//// String key = id + "|DailyNightShiftSubsidyData" + kqdate;
//// bb.writeLog("nightShiftSubsidy key: " + key );
// if (temp == null || temp.size() == 0) {
// data.put(fieldName, "0");
// } else {
// double doubleValue = Math.max(Util.getDoubleValue(Util.null2String(temp.get(id + "|DailyNightShiftSubsidyData|" + kqdate))) , 0.00);
//// bb.writeLog("nightShiftSubsidy doubleValue: " + doubleValue );
//// bb.writeLog("nightShiftSubsidy kqdate: " + kqdate );
// data.put(fieldName, doubleValue);
// }
//
// } else if (fieldName.equals("otherStatAllowance")) {//考勤二开--鸿仁驻点餐补
// double temp = Util.getDoubleValue(Util.null2String(flowData.get(id + "|DailyOtherStatAllowance" + "|" + kqdate )));
// if (temp <= 0.00) {
// fieldValue = "0";
// } else {
// fieldValue = String.valueOf(temp);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.put(fieldName, fieldValue);
} else {
fieldValue = Util.null2String(rs.getString(fieldName));
if (kqReportFieldComInfo.getUnittype().equals("2") && fieldValue.length() > 0) {
@ -509,7 +514,7 @@ public class GetKQDailyReportCmd extends AbstractCommonCommand<Map<String, Objec
retmap.put("ishavepre", isHavePre);
retmap.put("ishavenext", isHaveNext);
}catch (Exception e){
writeLog(e);
bb.writeLog("GetKQDailyReportCmd error:" + e.getMessage());
}
bb.writeLog("GetKQDailyReportCmd end.");
return retmap;

@ -39,6 +39,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
RecordSet rs = new RecordSet();
String sql = "";
try{
bb.writeLog("GetKQReportCmd start.");
String pageUid = PageUidFactory.getHrmPageUid("KQReport");
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
@ -172,7 +173,12 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
Map<String,Object> definedFieldInfo = new KQFormatBiz().getDefinedField();
String definedFieldSum = Util.null2String(definedFieldInfo.get("definedFieldSum"));
String backFields = " a.id,a.lastname,a.workcode,a.dsporder,b.resourceid,a.subcompanyid1 as subcompanyid,a.departmentid,a.jobtitle," +
String backFields = " (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," +
" 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, " +
" sum(b.graveBeLate) as graveBeLate, sum(b.graveBeLateMins) as graveBeLateMins,sum(b.leaveEearly) as leaveEearly," +
@ -435,99 +441,99 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
} else{
fieldValue = KQDurationCalculatorUtil.getDurationRound(Util.null2String(flowData.get(id+"|"+fieldName)));
}
} else if ("mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
// bb.writeLog("mealAllowance");
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, "DailyMealAllow|" + resourceId);
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
int tempValue = 0;
for (String key: tempMap.keySet()) {
int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(intValue, 0));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.put(fieldName, fieldValue);
} else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
bb.writeLog("statAllowance");
params.put("statUser", id);
bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getStatAllowanceData(params, user);
if (temp == null || temp.size() == 0) {
data.put(fieldName, "0");
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|StatAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyStatAllowance");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(doubleValue, 0.00));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.put(fieldName, fieldValue);
}
} else if ("nightAllowance".equals(fieldName)) {//考勤二开--精密夜班餐补
// bb.writeLog("nightAllowance");
// bb.writeLog("flowData: " + flowData);
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyNightShiftAllowanceData");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(doubleValue, 0.00));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.put(fieldName, fieldValue);
} else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
params.put("subUserId", id);
bb.writeLog("params: " + params );
Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
if (temp == null || temp.size() == 0) {
data.put(fieldName, "0");
} else {
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|DailyNightShiftSubsidyData");
if ( !tempMap.isEmpty()) {
int tempValue = 0;
for (String key: tempMap.keySet()) {
int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(intValue, 0));
}
fieldValue = String.valueOf(tempValue);
}
data.put(fieldName, fieldValue);
}
} else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
// bb.writeLog("otherStatAllowance");
// bb.writeLog("flowData: " + flowData);
Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyOtherStatAllowance");
// bb.writeLog("tempMap: " + tempMap);
if ( !tempMap.isEmpty()) {
double tempValue = 0.00;
for (String key: tempMap.keySet()) {
double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
tempValue = tempValue + (Math.max(doubleValue, 0.00));
}
fieldValue = String.valueOf(tempValue);
}
// bb.writeLog("fieldValue: " + fieldValue);
data.put(fieldName, fieldValue);
// } else if ("mealAllowance".equals(fieldName)) {//考勤二开--出差餐补
//// bb.writeLog("mealAllowance");
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, "DailyMealAllow|" + resourceId);
//// bb.writeLog("tempMap: " + tempMap);
//
// if ( !tempMap.isEmpty()) {
// int tempValue = 0;
// for (String key: tempMap.keySet()) {
// int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(intValue, 0));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.put(fieldName, fieldValue);
// } else if ("statAllowance".equals(fieldName)) {//考勤二开--驻点餐补
// bb.writeLog("statAllowance");
//
// params.put("statUser", id);
// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getStatAllowanceData(params, user);
// if (temp == null || temp.size() == 0) {
// data.put(fieldName, "0");
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|StatAllowance");
//
//// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyStatAllowance");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(doubleValue, 0.00));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.put(fieldName, fieldValue);
// }
//
//
// } else if ("nightAllowance".equals(fieldName)) {//考勤二开--精密夜班餐补
//// bb.writeLog("nightAllowance");
//// bb.writeLog("flowData: " + flowData);
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyNightShiftAllowanceData");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(doubleValue, 0.00));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.put(fieldName, fieldValue);
// } else if ("nightShiftSubsidy".equals(fieldName)) {//考勤二开--夜班补助
// params.put("subUserId", id);
// bb.writeLog("params: " + params );
//
// Map<String, Object> temp = kqReportBiz.getDailyNightShiftSubsidyData(params, user);
// if (temp == null || temp.size() == 0) {
// data.put(fieldName, "0");
// } else {
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(temp, id + "|DailyNightShiftSubsidyData");
//
// if ( !tempMap.isEmpty()) {
// int tempValue = 0;
// for (String key: tempMap.keySet()) {
// int intValue = Util.getIntValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(intValue, 0));
// }
// fieldValue = String.valueOf(tempValue);
// }
// data.put(fieldName, fieldValue);
// }
//
// } else if ("otherStatAllowance".equals(fieldName)) {//考勤二开--鸿仁驻点餐补
//// bb.writeLog("otherStatAllowance");
//// bb.writeLog("flowData: " + flowData);
// Map<String, Object> tempMap = hostarUtil.parseMapForFilter(flowData, id + "|DailyOtherStatAllowance");
//// bb.writeLog("tempMap: " + tempMap);
// if ( !tempMap.isEmpty()) {
// double tempValue = 0.00;
// for (String key: tempMap.keySet()) {
// double doubleValue = Util.getDoubleValue(Util.null2String(tempMap.get(key)));
// tempValue = tempValue + (Math.max(doubleValue, 0.00));
// }
// fieldValue = String.valueOf(tempValue);
// }
//// bb.writeLog("fieldValue: " + fieldValue);
// data.put(fieldName, fieldValue);
} else {
fieldValue = Util.null2String(rs.getString(fieldName));
if(Util.null2String(kqReportFieldComInfo.getUnittype()).length()>0) {
@ -611,7 +617,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
retmap.put("ishavenext", isHaveNext);
}catch (Exception e){
writeLog(e);
bb.writeLog("GetKQReportCmd Exception: " + e);
bb.writeLog("GetKQReportCmd Exception: " + e.getMessage());
}
return retmap;
}

Loading…
Cancel
Save