|
|
@ -6,6 +6,7 @@ import com.engine.common.biz.AbstractCommonCommand;
|
|
|
|
import com.engine.common.entity.BizLogContext;
|
|
|
|
import com.engine.common.entity.BizLogContext;
|
|
|
|
import com.engine.core.interceptor.CommandContext;
|
|
|
|
import com.engine.core.interceptor.CommandContext;
|
|
|
|
import com.engine.kq.biz.*;
|
|
|
|
import com.engine.kq.biz.*;
|
|
|
|
|
|
|
|
import com.engine.kq.enums.KqSplitFlowTypeEnum;
|
|
|
|
import com.engine.kq.util.KQDurationCalculatorUtil;
|
|
|
|
import com.engine.kq.util.KQDurationCalculatorUtil;
|
|
|
|
import com.engine.kq.util.PageUidFactory;
|
|
|
|
import com.engine.kq.util.PageUidFactory;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@ -25,8 +26,12 @@ import weaver.systeminfo.SystemEnv;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import static com.api.formmode.cache.ModeExpandPageComInfo.groupid;
|
|
|
|
|
|
|
|
|
|
|
|
public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
|
|
|
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
@ -457,6 +462,118 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
for(int i=0;serialIds!=null&&i<serialIds.size();i++){
|
|
|
|
for(int i=0;serialIds!=null&&i<serialIds.size();i++){
|
|
|
|
data.put(serialIds.get(i), kqReportBiz.getSerialCount(id,fromDate,toDate,serialIds.get(i)));
|
|
|
|
data.put(serialIds.get(i), kqReportBiz.getSerialCount(id,fromDate,toDate,serialIds.get(i)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(fieldName.equals("reissuecard")){
|
|
|
|
|
|
|
|
int intValue = Util.getIntValue(Util.null2String(flowData.get(id + "|reissueCard")));
|
|
|
|
|
|
|
|
if (intValue < 0) {
|
|
|
|
|
|
|
|
fieldValue = "0";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
fieldValue = String.valueOf(intValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(fieldName.equals("thisRemOt")){//当月加班剩余
|
|
|
|
|
|
|
|
double workingDayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|workingDayOvertime_4leave")));
|
|
|
|
|
|
|
|
workingDayOvertime_4leave = workingDayOvertime_4leave<0?0:workingDayOvertime_4leave;
|
|
|
|
|
|
|
|
double restDayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|restDayOvertime_4leave")));
|
|
|
|
|
|
|
|
restDayOvertime_4leave = restDayOvertime_4leave<0?0:restDayOvertime_4leave;
|
|
|
|
|
|
|
|
double holidayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|holidayOvertime_4leave")));
|
|
|
|
|
|
|
|
holidayOvertime_4leave = holidayOvertime_4leave<0?0:holidayOvertime_4leave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double workingDayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|workingDayOvertime_nonleave")));
|
|
|
|
|
|
|
|
workingDayOvertime_nonleave = workingDayOvertime_nonleave<0?0:workingDayOvertime_nonleave;
|
|
|
|
|
|
|
|
double restDayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|restDayOvertime_nonleave")));
|
|
|
|
|
|
|
|
restDayOvertime_nonleave = restDayOvertime_nonleave<0?0:restDayOvertime_nonleave;
|
|
|
|
|
|
|
|
double holidayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|holidayOvertime_nonleave")));
|
|
|
|
|
|
|
|
holidayOvertime_nonleave = holidayOvertime_nonleave<0?0:holidayOvertime_nonleave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double overtimeDuration = workingDayOvertime_4leave+restDayOvertime_4leave+holidayOvertime_4leave+
|
|
|
|
|
|
|
|
workingDayOvertime_nonleave+restDayOvertime_nonleave+holidayOvertime_nonleave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//请假时长统计
|
|
|
|
|
|
|
|
String leaveData = Util.null2String(flowData.get(id+"|leaveType_5"));
|
|
|
|
|
|
|
|
String leavebackData = Util.null2s(Util.null2String(flowData.get(id+"|leavebackType_5")),"0.0");
|
|
|
|
|
|
|
|
String b_flowLeaveData = "";
|
|
|
|
|
|
|
|
String flowLeaveData = "";
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
//以防止出现精度问题
|
|
|
|
|
|
|
|
if(leaveData.length() == 0){
|
|
|
|
|
|
|
|
leaveData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(leavebackData.length() == 0){
|
|
|
|
|
|
|
|
leavebackData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BigDecimal b_leaveData = new BigDecimal(leaveData);
|
|
|
|
|
|
|
|
BigDecimal b_leavebackData = new BigDecimal(leavebackData);
|
|
|
|
|
|
|
|
b_flowLeaveData = b_leaveData.subtract(b_leavebackData).toString();
|
|
|
|
|
|
|
|
if(Util.getDoubleValue(b_flowLeaveData, -1) < 0){
|
|
|
|
|
|
|
|
b_flowLeaveData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
writeLog("GetKQReportCmd:leaveData"+leaveData+":leavebackData:"+leavebackData+":"+e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//考虑下冻结的数据
|
|
|
|
|
|
|
|
if(b_flowLeaveData.length() > 0){
|
|
|
|
|
|
|
|
flowLeaveData = KQDurationCalculatorUtil.getDurationRound(b_flowLeaveData);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
flowLeaveData = KQDurationCalculatorUtil.getDurationRound(Util.null2String(Util.getDoubleValue(leaveData,0.0)-Util.getDoubleValue(leavebackData,0.0)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
double leaveDuration = Math.max(Util.getDoubleValue(Util.null2String(flowLeaveData)),0.00);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double temp = overtimeDuration - leaveDuration;
|
|
|
|
|
|
|
|
fieldValue = String.valueOf(temp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if(fieldName.equals("lastRemOt")){//上月加班剩余
|
|
|
|
|
|
|
|
double workingDayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|workingDayOvertime_4leavelast")));
|
|
|
|
|
|
|
|
workingDayOvertime_4leave = workingDayOvertime_4leave<0?0:workingDayOvertime_4leave;
|
|
|
|
|
|
|
|
double restDayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|restDayOvertime_4leavelast")));
|
|
|
|
|
|
|
|
restDayOvertime_4leave = restDayOvertime_4leave<0?0:restDayOvertime_4leave;
|
|
|
|
|
|
|
|
double holidayOvertime_4leave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|holidayOvertime_4leavelast")));
|
|
|
|
|
|
|
|
holidayOvertime_4leave = holidayOvertime_4leave<0?0:holidayOvertime_4leave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double workingDayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|workingDayOvertime_nonleavelast")));
|
|
|
|
|
|
|
|
workingDayOvertime_nonleave = workingDayOvertime_nonleave<0?0:workingDayOvertime_nonleave;
|
|
|
|
|
|
|
|
double restDayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|restDayOvertime_nonleavelast")));
|
|
|
|
|
|
|
|
restDayOvertime_nonleave = restDayOvertime_nonleave<0?0:restDayOvertime_nonleave;
|
|
|
|
|
|
|
|
double holidayOvertime_nonleave = Util.getDoubleValue(Util.null2String(flowData.get(id+"|holidayOvertime_nonleavelast")));
|
|
|
|
|
|
|
|
holidayOvertime_nonleave = holidayOvertime_nonleave<0?0:holidayOvertime_nonleave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double overtimeDuration = workingDayOvertime_4leave+restDayOvertime_4leave+holidayOvertime_4leave+
|
|
|
|
|
|
|
|
workingDayOvertime_nonleave+restDayOvertime_nonleave+holidayOvertime_nonleave;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//请假时长统计
|
|
|
|
|
|
|
|
String leaveData = Util.null2String(flowData.get(id+"|lastleaveType_5"));
|
|
|
|
|
|
|
|
String leavebackData = Util.null2s(Util.null2String(flowData.get(id+"|lastleavebackType_5")),"0.0");
|
|
|
|
|
|
|
|
String b_flowLeaveData = "";
|
|
|
|
|
|
|
|
String flowLeaveData = "";
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
//以防止出现精度问题
|
|
|
|
|
|
|
|
if(leaveData.length() == 0){
|
|
|
|
|
|
|
|
leaveData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(leavebackData.length() == 0){
|
|
|
|
|
|
|
|
leavebackData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BigDecimal b_leaveData = new BigDecimal(leaveData);
|
|
|
|
|
|
|
|
BigDecimal b_leavebackData = new BigDecimal(leavebackData);
|
|
|
|
|
|
|
|
b_flowLeaveData = b_leaveData.subtract(b_leavebackData).toString();
|
|
|
|
|
|
|
|
if(Util.getDoubleValue(b_flowLeaveData, -1) < 0){
|
|
|
|
|
|
|
|
b_flowLeaveData = "0.0";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
writeLog("GetKQReportCmd:leaveData"+leaveData+":leavebackData:"+leavebackData+":"+e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//考虑下冻结的数据
|
|
|
|
|
|
|
|
if(b_flowLeaveData.length() > 0){
|
|
|
|
|
|
|
|
flowLeaveData = KQDurationCalculatorUtil.getDurationRound(b_flowLeaveData);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
flowLeaveData = KQDurationCalculatorUtil.getDurationRound(Util.null2String(Util.getDoubleValue(leaveData,0.0)-Util.getDoubleValue(leavebackData,0.0)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
double leaveDuration = Math.max(Util.getDoubleValue(Util.null2String(flowLeaveData)),0.00);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double temp = overtimeDuration - leaveDuration;
|
|
|
|
|
|
|
|
fieldValue = String.valueOf(temp);
|
|
|
|
|
|
|
|
|
|
|
|
} else if(kqReportFieldComInfo.getParentid().equals("overtime")||kqReportFieldComInfo.getParentid().equals("overtime_nonleave")
|
|
|
|
} else if(kqReportFieldComInfo.getParentid().equals("overtime")||kqReportFieldComInfo.getParentid().equals("overtime_nonleave")
|
|
|
|
||kqReportFieldComInfo.getParentid().equals("overtime_4leave")||fieldName.equals("businessLeave") || fieldName.equals("officialBusiness")){
|
|
|
|
||kqReportFieldComInfo.getParentid().equals("overtime_4leave")||fieldName.equals("businessLeave") || fieldName.equals("officialBusiness")){
|
|
|
|
if(fieldName.equals("overtimeTotal")){
|
|
|
|
if(fieldName.equals("overtimeTotal")){
|
|
|
@ -502,7 +619,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
fieldValue = KQDurationCalculatorUtil.getDurationRound(Util.null2String(flowData.get(id+"|"+fieldName)));
|
|
|
|
fieldValue = KQDurationCalculatorUtil.getDurationRound(Util.null2String(flowData.get(id+"|"+fieldName)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else if("holiDuration".equals(fieldName)){
|
|
|
|
} else if("holiDuration".equals(fieldName)){
|
|
|
|
int intValue = Util.getIntValue(Util.null2String(flowData.get("HoliDurationData|" + id)));
|
|
|
|
int intValue = Util.getIntValue(Util.null2String(flowData.get("HoliDurationData|" + id)));
|
|
|
|
if (intValue >= 0) {
|
|
|
|
if (intValue >= 0) {
|
|
|
|
data.put(fieldName,intValue);
|
|
|
|
data.put(fieldName,intValue);
|
|
|
@ -529,7 +646,49 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bb.writeLog("劳务公司 fieldValue: " + fieldValue);
|
|
|
|
bb.writeLog("劳务公司 fieldValue: " + fieldValue);
|
|
|
|
data.put(fieldName, fieldValue);
|
|
|
|
data.put(fieldName, fieldValue);
|
|
|
|
}else if ("laborHours".equals(kqReportFieldComInfo.getParentid()) ) {
|
|
|
|
} else if ("startOrEndDays".equals(fieldName)) {//考勤二开--入离职工时
|
|
|
|
|
|
|
|
int absenceDays = 0;
|
|
|
|
|
|
|
|
if ("3".equals(typeselect) || "7".equals(typeselect)) {
|
|
|
|
|
|
|
|
Map<String, String> employAndResignDates = getEmployAndResignDateById(id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String companystartdate = Util.null2String(employAndResignDates.get("companystartdate"));
|
|
|
|
|
|
|
|
String resignDate = Util.null2String(employAndResignDates.get("resignDate"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(companystartdate) && StringUtils.isBlank(resignDate)) {
|
|
|
|
|
|
|
|
String substring1 = companystartdate.substring(0, 7);
|
|
|
|
|
|
|
|
String substring2 = fromDate.substring(0, 7);
|
|
|
|
|
|
|
|
if (substring1.equals(substring2)) {
|
|
|
|
|
|
|
|
absenceDays = getAbsenceDays(id, fromDate, companystartdate, toDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (StringUtils.isBlank(companystartdate) && StringUtils.isNotBlank(resignDate)) {
|
|
|
|
|
|
|
|
String substring1 = resignDate.substring(0, 7);
|
|
|
|
|
|
|
|
String substring2 = toDate.substring(0, 7);
|
|
|
|
|
|
|
|
if (substring1.equals(substring2)) {
|
|
|
|
|
|
|
|
absenceDays = getAbsenceDays(id, resignDate, toDate, fromDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (StringUtils.isNotBlank(companystartdate) && StringUtils.isNotBlank(resignDate)) {
|
|
|
|
|
|
|
|
String substring1 = companystartdate.substring(0, 7);
|
|
|
|
|
|
|
|
String substring2 = resignDate.substring(0, 7);
|
|
|
|
|
|
|
|
String substring3 = fromDate.substring(0, 7);
|
|
|
|
|
|
|
|
String substring4 = toDate.substring(0, 7);
|
|
|
|
|
|
|
|
if ( substring1.equals(substring2) && substring2.equals(substring3)
|
|
|
|
|
|
|
|
&& substring3.equals(substring4) ) {//考勤月入职且离职
|
|
|
|
|
|
|
|
int temp1 = getAbsenceDays(id, fromDate, companystartdate, toDate);
|
|
|
|
|
|
|
|
int temp2 = getAbsenceDays(id, resignDate, toDate, fromDate);
|
|
|
|
|
|
|
|
absenceDays = temp1 + temp2;
|
|
|
|
|
|
|
|
} else if (substring1.equals(substring3) && !substring2.equals(substring3)) {//考勤月入职,非考勤月离职
|
|
|
|
|
|
|
|
absenceDays = getAbsenceDays(id, fromDate, companystartdate, toDate);
|
|
|
|
|
|
|
|
} else if ( !substring1.equals(substring3) && !substring2.equals(substring3)){//非考勤月入职,考勤月离职
|
|
|
|
|
|
|
|
absenceDays = getAbsenceDays(id, resignDate, toDate, fromDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
fieldValue = String.valueOf(absenceDays);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.put(fieldName, fieldValue);
|
|
|
|
|
|
|
|
} else if ("laborHours".equals(kqReportFieldComInfo.getParentid()) ) {
|
|
|
|
|
|
|
|
|
|
|
|
if ("laborHoursTotal".equals(fieldName)) {
|
|
|
|
if ("laborHoursTotal".equals(fieldName)) {
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -728,6 +887,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return retmap;
|
|
|
|
return retmap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*获取人员多级部门*/
|
|
|
|
/*获取人员多级部门*/
|
|
|
|
private String getMultiLevelDepartmentById(String id){
|
|
|
|
private String getMultiLevelDepartmentById(String id){
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
@ -756,6 +916,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return str;
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*获取人员加班类型*/
|
|
|
|
/*获取人员加班类型*/
|
|
|
|
private String getOvertimeTypeById(String id){
|
|
|
|
private String getOvertimeTypeById(String id){
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
@ -768,6 +929,7 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return field35;
|
|
|
|
return field35;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*获取人员入离职时间*/
|
|
|
|
/*获取人员入离职时间*/
|
|
|
|
private Map<String,String> getEmployAndResignDateById(String id){
|
|
|
|
private Map<String,String> getEmployAndResignDateById(String id){
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
@ -834,7 +996,8 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
lsChildColumns.add(column);
|
|
|
|
lsChildColumns.add(column);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else if(parentid.equals("overtime")){
|
|
|
|
}else if(parentid.equals("overtime")){
|
|
|
|
String[] overtimeChild = {"overtime_nonleave","overtime_4leave","overtimeTotal"};
|
|
|
|
// String[] overtimeChild = {"overtime_nonleave","overtime_4leave","overtimeTotal"};
|
|
|
|
|
|
|
|
String[] overtimeChild = {"overtime_4leave","overtimeTotal"};
|
|
|
|
for(int i=0;i<overtimeChild.length;i++){
|
|
|
|
for(int i=0;i<overtimeChild.length;i++){
|
|
|
|
String id = overtimeChild[i];
|
|
|
|
String id = overtimeChild[i];
|
|
|
|
column = new HashMap();
|
|
|
|
column = new HashMap();
|
|
|
@ -929,6 +1092,42 @@ public class GetKQReportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
|
|
|
return lsChildColumns;
|
|
|
|
return lsChildColumns;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getAbsenceDays(String resourceId, String startDate, String endDate, String groupDate){
|
|
|
|
|
|
|
|
int days = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LocalDate startDateL = LocalDate.parse(startDate, formatter);
|
|
|
|
|
|
|
|
LocalDate endDateL = LocalDate.parse(endDate, formatter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> dates = new ArrayList<>();
|
|
|
|
|
|
|
|
LocalDate currentDate = startDateL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (!currentDate.isAfter(endDateL)) {
|
|
|
|
|
|
|
|
dates.add("'"+currentDate.format(formatter)+"'");
|
|
|
|
|
|
|
|
currentDate = currentDate.plusDays(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String selDates = String.join(",", dates);
|
|
|
|
|
|
|
|
int size = dates.size();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KQGroupMemberComInfo kqGroupMemberComInfo = new KQGroupMemberComInfo();
|
|
|
|
|
|
|
|
String groupid = Util.null2String(kqGroupMemberComInfo.getKQGroupId(resourceId, groupDate));
|
|
|
|
|
|
|
|
String acqNumberSql = "select count(*) as number from KQ_HolidaySet where groupid = " + groupid +" changeType in (1,3) " +
|
|
|
|
|
|
|
|
"and holidayDate in ("+selDates+")";
|
|
|
|
|
|
|
|
bb.writeLog("acqNumberSql: " + acqNumberSql);
|
|
|
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
|
|
|
rs.executeQuery(acqNumberSql);
|
|
|
|
|
|
|
|
int number = 0;
|
|
|
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
|
|
|
number = Math.max(Util.getIntValue(Util.null2String(rs.getString("number"))), 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
days = size - number;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return days;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BizLogContext getLogContext() {
|
|
|
|
public BizLogContext getLogContext() {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|