zm_dev
liuliang 11 months ago
parent 81d913eeb5
commit 0126f71ab4

@ -10,10 +10,56 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="baeb3dfb-5097-46c5-933e-6d1dab18b815" name="Changes" comment=""> <list default="true" id="baeb3dfb-5097-46c5-933e-6d1dab18b815" name="Changes" comment="">
<change afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetScheduleResultListCmd.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/test/TestAttendanceAllowance/Test2.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/WEB-INF/prop/weaver.properties" beforeDir="false" afterPath="$PROJECT_DIR$/WEB-INF/prop/weaver.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/WEB-INF/sqllog/ecologysql" beforeDir="false" afterPath="$PROJECT_DIR$/WEB-INF/sqllog/ecologysql" afterDir="false" />
<change beforePath="$PROJECT_DIR$/log/sdk.log" beforeDir="false" afterPath="$PROJECT_DIR$/log/sdk.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/artifacts/hrm_attendance/hrm-attendance.jar" beforeDir="false" afterPath="$PROJECT_DIR$/out/artifacts/hrm_attendance/hrm-attendance.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetClockInTimeListCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetClockInTimeListCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/RecordDataCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/RecordDataCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/UpdateAttendanceResultsCmd.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/item/BeAwayItemCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/item/BeAwayItemCmd.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AllowanceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AllowanceServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/wrapper/AttendanceAnalysisWrapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/wrapper/AttendanceAnalysisWrapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetAskForLeaveCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetClockInTimeListCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetClockInTimeListCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/GetEvectionCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/UpdateAttendanceResultsCmd.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/AdjustByWorkOverTimeCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/recordDataCmd.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/cmd/recordDataCmd.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO$ClockPointDTOBuilder.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO$ClockPointDTOBuilder.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/dto/ClockPointDTO.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/AllowanceServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/AllowanceServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/AskForLeaveServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/UtilServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/web/AttendanceanalysisAction.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/AttendanceAnalysisWrapper.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/AttendanceAnalysisWrapper.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/workflow/service/impl/AttendanceSummaryServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/common/util/Utils.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/util/Utils.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/TestAttendanceAllowance/Test.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/TestAttendanceAllowance/Test.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/TestAttendanceAllowance/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/TestAttendanceAllowance/Test.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -56,7 +102,7 @@
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File" value="PLAIN_TEXT" /> <property name="com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File" value="PLAIN_TEXT" />
<property name="last_directory_selection" value="$PROJECT_DIR$/src/com/engine/kq" /> <property name="last_directory_selection" value="$PROJECT_DIR$/src/com/engine/kq" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../easyentry" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../../浩鲸项目/haojing" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Artifacts" /> <property name="project.structure.last.edited" value="Artifacts" />
<property name="project.structure.proportion" value="0.15" /> <property name="project.structure.proportion" value="0.15" />
@ -91,20 +137,6 @@
</option> </option>
</component> </component>
<component name="RunManager" selected="JUnit.Test.testAnalysis"> <component name="RunManager" selected="JUnit.Test.testAnalysis">
<configuration name="Test1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="vocation.Test1" />
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="vocation.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="TestMain" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <configuration name="TestMain" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="shuju.TestMain" /> <option name="MAIN_CLASS_NAME" value="shuju.TestMain" />
<module name="hrm-attendance" /> <module name="hrm-attendance" />
@ -158,6 +190,23 @@
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="Test2.testAnalysis" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="TestAttendanceAllowance.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="TestAttendanceAllowance" />
<option name="MAIN_CLASS_NAME" value="TestAttendanceAllowance.Test2" />
<option name="METHOD_NAME" value="testAnalysis" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Test.testAnalysis" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true"> <configuration name="Test.testAnalysis" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" /> <module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" /> <shortenClasspath name="MANIFEST" />
@ -185,10 +234,10 @@
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="JUnit.Test.testAnalysis" /> <item itemvalue="JUnit.Test.testAnalysis" />
<item itemvalue="JUnit.Test2.testAnalysis" />
<item itemvalue="JUnit.Test1.test1" /> <item itemvalue="JUnit.Test1.test1" />
<item itemvalue="Application.TestMain" /> <item itemvalue="Application.TestMain" />
<item itemvalue="Application.TestMethod" /> <item itemvalue="Application.TestMethod" />
<item itemvalue="Application.Test1" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -591,7 +640,15 @@
<workItem from="1715406393526" duration="7053000" /> <workItem from="1715406393526" duration="7053000" />
<workItem from="1715414317145" duration="8285000" /> <workItem from="1715414317145" duration="8285000" />
<workItem from="1715577518625" duration="5016000" /> <workItem from="1715577518625" duration="5016000" />
<workItem from="1715584285304" duration="5261000" /> <workItem from="1715584285304" duration="15058000" />
<workItem from="1715649887756" duration="7330000" />
<workItem from="1715658587543" duration="18717000" />
<workItem from="1715736226086" duration="1413000" />
<workItem from="1715742238742" duration="2752000" />
<workItem from="1715750795223" duration="1391000" />
<workItem from="1715752378133" duration="18584000" />
<workItem from="1715822142239" duration="6885000" />
<workItem from="1715837102628" duration="16034000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -626,24 +683,19 @@
<option name="timeStamp" value="54" /> <option name="timeStamp" value="54" />
</breakpoint> </breakpoint>
<line-breakpoint enabled="true" type="java-line"> <line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AllowanceServiceImpl.java</url> <url>file://$PROJECT_DIR$/src/com/engine/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java</url>
<line>104</line> <line>280</line>
<option name="timeStamp" value="71" /> <option name="timeStamp" value="99" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/item/LeaveEarlyItemCmd.java</url>
<line>37</line>
<option name="timeStamp" value="83" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="java-line"> <line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/item/LeaveEarlyItemCmd.java</url> <url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.java</url>
<line>54</line> <line>312</line>
<option name="timeStamp" value="84" /> <option name="timeStamp" value="122" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="java-line"> <line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/vacation/job/holidaygeneration/tactics/SinglePaymentInFullWay.java</url> <url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/WorkOverTimeServiceImpl.java</url>
<line>280</line> <line>304</line>
<option name="timeStamp" value="99" /> <option name="timeStamp" value="123" />
</line-breakpoint> </line-breakpoint>
</breakpoints> </breakpoints>
</breakpoint-manager> </breakpoint-manager>

@ -1,12 +1,16 @@
DriverClasses=oracle.jdbc.OracleDriver DriverClasses = com.mysql.cj.jdbc.Driver
ecology.url = jdbc:oracle:thin:@192.168.0.106:1521:ecology ecology.url = jdbc:mysql://221.226.25.34:8286/ecologyjcl?characterEncoding=utf8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai
ecology.user = hrm_test ecology.user = fanwei
ecology.password = ecology ecology.password = alpwsl92
ecology.charset = ISO ecology.charset = ISO
ecology.maxconn = 300 ecology.maxconn = 300
ecology.minconn = 50 ecology.minconn = 50
ecology.maxusecount = 6000 ecology.maxusecount = 6000
ecology.maxidletime = 600 ecology.maxidletime = 600
ecology.maxalivetime = 10 ecology.maxalivetime = 10
ecology.checktime = 3600 ecology.checktime = 3600
ecology.isgoveproj = 0
LOG_FORMAT = yyyy.MM.dd'-'hh:mm:ss
DEBUG_MODE = false

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -14,6 +14,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
*
*/
@Slf4j @Slf4j
public class ComputeAttendanceDurationCmd extends AbstractCommonCommand<Map<String,Object>> { public class ComputeAttendanceDurationCmd extends AbstractCommonCommand<Map<String,Object>> {

@ -21,6 +21,9 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
*
*/
@Slf4j @Slf4j
public class GetAskForLeaveCmd extends AbstractCommonCommand<Map<String,Object>> { public class GetAskForLeaveCmd extends AbstractCommonCommand<Map<String,Object>> {

@ -113,8 +113,8 @@ public class GetClockInTimeListCmd extends AbstractCommonCommand<Map<String,Obje
if (firstKsdkSchedule != null){ if (firstKsdkSchedule != null){
earliestTime = Utils.getkssjEarliestTime(firstKsdkSchedule,needGetDate); earliestTime = Utils.getkssjEarliestTime(firstKsdkSchedule,needGetDate);
} }
String earlyTime = Utils.getkssjEarliestTime(scheduleList.get(0),needGetDate); String earlyTime = Utils.getkssjEarliestTime(needGetDateScheduling.get(0),needGetDate);
if (DateUtil.getTime(earliestTime).compareTo(DateUtil.getTime(earlyTime)) > 0){ if (earliestTime == "" || DateUtil.getTime(earliestTime).compareTo(DateUtil.getTime(earlyTime)) > 0){
earliestTime = earlyTime; earliestTime = earlyTime;
} }
//当天班次最晚会打卡的时间点 //当天班次最晚会打卡的时间点
@ -122,8 +122,8 @@ public class GetClockInTimeListCmd extends AbstractCommonCommand<Map<String,Obje
if (lastKsdkSchedule != null){ if (lastKsdkSchedule != null){
lastestTime = Utils.getjssjLastestTime(lastKsdkSchedule,needGetDate); lastestTime = Utils.getjssjLastestTime(lastKsdkSchedule,needGetDate);
} }
String lastTime = Utils.getjssjLastestTime(scheduleList.get(scheduleList.size()-1),needGetDate); String lastTime = Utils.getjssjLastestTime(needGetDateScheduling.get(needGetDateScheduling.size()-1),needGetDate);
if (DateUtil.getTime(lastestTime).compareTo(DateUtil.getTime(lastTime)) < 0){ if (lastestTime == "" || DateUtil.getTime(lastestTime).compareTo(DateUtil.getTime(lastTime)) < 0){
lastestTime = lastTime; lastestTime = lastTime;
} }

@ -21,6 +21,9 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/**
*
*/
@Slf4j @Slf4j
public class GetEvectionCmd extends AbstractCommonCommand<Map<String,Object>> { public class GetEvectionCmd extends AbstractCommonCommand<Map<String,Object>> {

@ -0,0 +1,267 @@
package com.engine.attendance.attendanceanalysis.cmd;
import com.engine.attendance.attendanceanalysis.cmd.item.WorkOvertimeItemCmd;
import com.engine.attendance.enums.CheckBoxEnum;
import com.engine.attendance.enums.ClassBelongToEnum;
import com.engine.attendance.enums.ClassSegmentTypeEnum;
import com.engine.attendance.enums.WorkForTimeEnum;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.cmd.GetDateCmd;
import com.engine.common.entity.BizLogContext;
import com.engine.common.util.DateUtil;
import com.engine.common.util.DbTools;
import com.engine.common.util.Utils;
import com.engine.core.context.Context;
import com.engine.core.interceptor.CommandContext;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import weaver.general.Util;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
*
*/
@Slf4j
public class GetScheduleResultListCmd extends AbstractCommonCommand<Map<String,Object>> {
public GetScheduleResultListCmd(Map<String,Object> params){
this.params=params;
}
@Override
public BizLogContext getLogContext() {
return null;
}
@Override
public Map<String, Object> execute(CommandContext commandContext) {
/** 班次信息*/
List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems");
Map<String,Object> schedulingResultsMap = (Map<String,Object>)params.get("schedulingResultsMap");
List<Map<String,Object>> schedulingResultsList = (List<Map<String,Object>>)schedulingResultsMap.get("data");
schedulingResultsList = Utils.getSchedulingList(schedulingResultsList);
Map<String,Object> schedulMap = Maps.newHashMap();
String glpb = "";
if (schedulingResultsList.size() >0){
glpb = Util.null2String(schedulingResultsList.get(0).get("pbgl"));
}
//schedulingResultsList = schedulingResultsList.stream().filter(e -> !"1".equals(e.get("sfxx"))).collect(Collectors.toList());
// Map<String,String> schedulingMap = schedulingResultsList.stream().collect(Collectors.toMap(e-> Util.null2String(e.get("bcxx")).split("-")[0], e->Util.null2String(e.get("bcrq"))+"&"+Util.null2String(e.get("rqlx"))));
Map<String,List<Map<String,Object>>> schedulingMap = schedulingResultsList.stream().collect(Collectors.groupingBy(e-> Util.null2String(e.get("bcxx")).split("-")[0]));
Map<String,List<Map<String,Object>>> schedulingMapBydate = schedulingResultsList.stream().collect(Collectors.groupingBy(e-> Util.null2String(e.get("bcrq"))));
schedulMap.put("schedulingMapBydate",schedulingMapBydate);
Map<String,List<Map<String,Object>>> resultMap = Maps.newHashMap();
String sql = "select a.id bcxx,a.edsc,a.zgzsc,a.bcsdxx,a.sfdx,a.sfkt,b.bdlx,a.btgz,a.fgsjd,a.zddxfz,a.dxhs,b.kssj dtkssj,b.jssj dtjssj,b.ksdk,b.jsdk,b.tqdkfzs,b.thdkfzs,b.edxss,b.sfdx dtsfdx,b.zddxfz dtzddxfz,b.dxhs dtdxhs,b.gsrq from uf_jcl_kq_bcxx a left join uf_jcl_kq_bcxx_dt1 b on a.id=b.mainid where a.id in (";
String bcxxIds = "";
for (Map.Entry<String,List<Map<String,Object>>> entry :schedulingMap.entrySet()){
if (!entry.getKey().equals("")){
bcxxIds +=entry.getKey() +",";
}
}
List<Map<String,Object>> dataList = Lists.newArrayList();
if (!"".equals(bcxxIds)){
bcxxIds = bcxxIds.substring(0,bcxxIds.length()-1);
sql = sql +bcxxIds+") order by b.gsrq,b.kssj";
dataList = DbTools.getSqlToList(sql);
Map<String,List<Map<String,Object>>> dataMap = dataList.stream().collect(Collectors.groupingBy(e->Util.null2String(e.get("bcxx"))));
List<Map<String, Object>> finalAttendanceItems = attendanceItems;
dataMap.entrySet().forEach(e -> {
List<Map<String,Object>> schedulingList = schedulingMap.get(e.getKey());
List<Map<String,Object>> bcxxs = e.getValue();
for (Map<String,Object> scheduling :schedulingList){
String bcrq = Util.null2String(scheduling.get("bcrq"));
String rqlx = Util.null2String(scheduling.get("rqlx"));
String sfxx = Util.null2String(scheduling.get("sfxx"));
List<Map<String,Object>> classs = Lists.newArrayList();
for (Map<String,Object> map:bcxxs){
Map<String,Object> newMap = Maps.newHashMap();
newMap.putAll(map);
newMap.put("rqlx",rqlx);
newMap.put("sfxx",sfxx);
//adjustWorkOverTimeClass(newMap, finalAttendanceItems,commandContext);
classs.add(newMap);
}
resultMap.put(bcrq,classs);
}
});
}
/** 加班计划*/
sql = "select b.jbry,b.ksrq,b.kssj,a.jblx,b.jsrq,b.jssj,b.jbsc from uf_jcl_kq_jbjh a left join uf_jcl_kq_jbjh_dt1 b on a.id=b.mainid where b.jbry =? and b.ksrq>=? and b.ksrq<=? and (b.jbcx=0 or b.jbcx is null)";
Map<String,List<Map<String,Object>>> overtimePlanMap = DbTools.getSqlToList(sql,params.get("pbdx"),params.get("startDate"),params.get("endDate")).stream().collect(Collectors.groupingBy(e -> Util.null2String(e.get("ksrq"))));
//考勤项目
//日期集合
Map<String,Object> dateParam = Maps.newHashMap();
dateParam.put("nd",Util.null2String(params.get("startDate")).split("-")[0]);
dateParam.put("glpb",glpb);
List<Map<String,Object>> list = getDate(dateParam);
Map<String,String> dateMap = list.stream().collect(Collectors.toMap(e->Util.null2String(e.get("rq")),e->Util.null2String(e.get("rqlx"))));
for (Map.Entry<String,List<Map<String,Object>>> e: overtimePlanMap.entrySet()){
if (resultMap.get(e.getKey()) == null){
resultMap.put(e.getKey(),Lists.newArrayList());
}
List<Map<String,Object>> resultList = resultMap.get(e.getKey());
List<Map<String,Object>> schedulingdateMap = schedulingMapBydate.get(e.getKey());
Map<String,Object> overtimePlan = e.getValue().get(0);
Map<String,Object> map = Maps.newHashMap();
if (!overtimePlan.get("ksrq").equals(overtimePlan.get("jsrq"))){
map.put("sfkt","1");
}else {
map.put("sfkt","0");
}
//查找对应的考勤项目
String querySql = "select id keyid,ksjbbxydk,jsjbbxydk,tqdkyxfzs,thdkyxfzs,jbwdhlfzs,jbzzhlfzs,tqdkjrjb,thdkjrjb,jbscbdccsqsc,zdkcjcxxsc,ccclfs,rzdjbxss,yzdjbxss,zzdjbxss,jbzdzjqye,jbqsfzs,ccqszhdhsfzs,hsl,hsdw from uf_jcl_kq_kqxm where id=?";
attendanceItems = DbTools.getSqlToList(querySql,overtimePlan.get("jblx"));
map.put("bcxx",schedulingdateMap == null || schedulingdateMap.get(0) ==null ? "0" :schedulingdateMap.get(0).get("bcxx"));
map.put("bcsdxx",schedulingdateMap == null || schedulingdateMap.get(0) ==null ? "":schedulingdateMap.get(0).get("bcsdxx"));
if (resultList.size()>0){
map.put("edsc",Util.null2String(resultList.get(0).get("edsc")));
map.put("sfdx",Util.null2String(resultList.get(0).get("sfdx")));
map.put("zddxfz",Util.null2String(resultList.get(0).get("zddxfz")));
map.put("dxhs",Util.null2String(resultList.get(0).get("dxhs")));
}else {
map.put("edsc","0");
}
map.put("bdlx", ClassSegmentTypeEnum.OVERTIME_PLAN.getKey());
map.put("dtkssj",overtimePlan.get("kssj"));
map.put("dtjssj",overtimePlan.get("jssj"));
map.put("ksdk","0");
map.put("jsdk","0");
if (schedulingdateMap != null && schedulingdateMap.size()>0){
map.put("sfxx",Util.null2String(schedulingdateMap.get(0).get("sfxx")));
}
map.put("tqdkfzs","60");
map.put("thdkfzs","60");
map.put("rqlx",dateMap.get(e.getKey()));
map.put("edxss",overtimePlan.get("jbsc"));
map.put("jblx",attendanceItems);
map.put("gsrq", ClassBelongToEnum.NOWDAY.getKey());
if (attendanceItems.size() >0){
map.put("ksdk",attendanceItems.get(0).get("ksjbbxydk"));
map.put("jsdk",attendanceItems.get(0).get("jsjbbxydk"));
map.put("tqdkfzs",attendanceItems.get(0).get("tqdkyxfzs"));
map.put("thdkfzs",attendanceItems.get(0).get("thdkyxfzs"));
map.put("jbwdhlfzs",attendanceItems.get(0).get("jbwdhlfzs"));
map.put("jbzzhlfzs",attendanceItems.get(0).get("jbzzhlfzs"));
}
if (resultList.size() > 1){
String kssjbegin = Utils.getkssjTime(resultList.get(0),e.getKey());
String kssjend = Utils.getkssjTime(resultList.get(resultList.size()-1),e.getKey());
String kssj = overtimePlan.get("ksrq")+" "+overtimePlan.get("kssj");
if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(kssjbegin)) <0){
//加班计划在开头
if (resultList.get(0).get("dtkssj").equals(overtimePlan.get("jssj")) &&
resultList.get(0).get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey())){
//当加班结束时间和早上打卡时间重合时
}
resultList.add(0,map);
}else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(kssjend)) >0){
//加班计划在末尾
if (resultList.get(0).get("dtjssj").equals(overtimePlan.get("kssj")) &&
resultList.get(0).get("jsdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey())){
//当加班结束时间和晚上下班时间重合时1
}
resultList.add(map);
}else {
//加班计划在中间
for (int j=1;j<resultList.size();j++){
String kssj1 = Utils.getkssjTime(resultList.get(j),e.getKey());
String kssj2 = overtimePlan.get("ksrq")+" "+overtimePlan.get("kssj");
String kssj3 = Utils.getkssjTime(resultList.get(j-1),e.getKey());
if (DateUtil.getTime(kssj1).compareTo(DateUtil.getTime(kssj2)) >=0 && DateUtil.getTime(kssj3).compareTo(DateUtil.getTime(kssj2)) <=0){
resultList.add(j,map);
break;
}
}
}
}else {
resultList.add(map);
}
}
schedulMap.put("schedulingResultsMap",resultMap);
log.info("SchedulingResults : [{}]",resultMap);
return schedulMap;
}
public List<Map<String,Object>> getDate(Map<String,Object> param){
String nd = Util.null2String(param.get("nd"));
String glpb = Util.null2String(param.get("glpb"));
String sql = "select nd,rq,nlrq,rqlx,xq,rlmc from uf_jcl_kq_rlxx a left join uf_jcl_kq_glpb b on a.rlmc=b.qyrl where b.id=? and a.nd=? ";
List<Map<String,Object>> dataList=null;
if ("".equals(glpb)){
sql = "select a.nd,a.rq,a.nlrq,a.rqlx,a.xq,a.rlmc from uf_jcl_kq_rlxx a left join uf_jcl_kq_rlmc b on a.rlmc=b.id where a.nd=? and b.mrrl=1";
dataList = DbTools.getSqlToList(sql,nd);
}else {
dataList = DbTools.getSqlToList(sql,glpb,nd);
}
return dataList;
}
/**
* 1
*
* @param scheduleMap
*/
public void adjustWorkOverTimeClass(Map<String,Object> scheduleMap,List<Map<String,Object>> attendanceItems,CommandContext commandContext){
String bdlx = Util.null2String(scheduleMap.get("bdlx"));
if (Utils.ifOverTimeClassSegment(scheduleMap.get("bdlx").toString())){
Map<String,Object> getWorkOverTimeParam = Maps.newHashMap();
getWorkOverTimeParam.put("attendanceItems",attendanceItems);
getWorkOverTimeParam.put("rqlx",scheduleMap.get("rqlx"));
List<Map<String,Object>> workTimeBeItems = Lists.newArrayList();
if (ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor", WorkForTimeEnum.DELAY_TO_WORK_OVERTIME.getKey());
Map<String,Object> result = new WorkOvertimeItemCmd(getWorkOverTimeParam).execute(commandContext);
//加班项目
workTimeBeItems = (List<Map<String,Object>>)result.get("attendanceItems");
}else if (ClassSegmentTypeEnum.EARLY_OVERTIME.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor",WorkForTimeEnum.EARLY_TO_WORK_OVERTIME.getKey());
Map<String,Object> result = new WorkOvertimeItemCmd(getWorkOverTimeParam).execute(commandContext);
workTimeBeItems = (List<Map<String,Object>>)result.get("attendanceItems");
}else if (ClassSegmentTypeEnum.OVERTIME_PLAN.getKey().equals(bdlx)){
workTimeBeItems = (List<Map<String,Object>>)scheduleMap.get("jblx");
}else if (ClassSegmentTypeEnum.OVERTIME_IN_CLASS.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor",WorkForTimeEnum.OVERTIME_IN_CLASS.getKey());
Map<String,Object> result = new WorkOvertimeItemCmd(getWorkOverTimeParam).execute(commandContext);
workTimeBeItems = (List<Map<String,Object>>)result.get("attendanceItems");
}
if (workTimeBeItems.size() > 0){
//开始加班必须打卡
String ksjbbxydk = Util.null2String(workTimeBeItems.get(0).get("ksjbbxydk"));
if (ksjbbxydk.equals(CheckBoxEnum.CHECKED.getKey())){
scheduleMap.put("ksdk",CheckBoxEnum.CHECKED.getKey());
}
//结束加班必须打卡
String jsjbbxydk = Util.null2String(workTimeBeItems.get(0).get("jsjbbxydk"));
if (jsjbbxydk.equals(CheckBoxEnum.CHECKED.getKey())){
scheduleMap.put("jsdk",CheckBoxEnum.CHECKED.getKey());
}
}
}
}
}

@ -14,7 +14,11 @@ import weaver.general.Util;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
/**
*
*/
@Slf4j @Slf4j
public class RecordDataCmd extends AbstractCommonCommand<Map<String,Object>> { public class RecordDataCmd extends AbstractCommonCommand<Map<String,Object>> {

@ -1,141 +0,0 @@
package com.engine.attendance.attendanceanalysis.cmd;
import com.engine.attendance.enums.SystemItemEnum;
import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext;
import com.engine.common.util.DateUtil;
import com.engine.common.util.DbTools;
import com.engine.core.interceptor.CommandContext;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.icbc.api.internal.apache.http.impl.cookie.S;
import weaver.conn.RecordSet;
import weaver.general.Util;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
*
*/
public class UpdateAttendanceResultsCmd extends AbstractCommonCommand<Map<String,Object>> {
@Override
public BizLogContext getLogContext() {
return null;
}
public UpdateAttendanceResultsCmd(Map<String,Object> params){
this.params=params;
}
@Override
public Map<String, Object> execute(CommandContext commandContext) {
String userId = Util.null2String(params.get("userId"));
String date = Util.null2String(params.get("date"));
//项目
String item = Util.null2String(params.get("item"));
//项目时长
String itemduration = params.get("itemduration") == null ? null:params.get("itemduration").toString();
//是否异常
String cqzt = params.get("cqzt") == null ? "0":Util.null2String(params.get("cqzt"));
String formmodeid = Util.null2String(params.get("modeId"));
Map<String,Object> resultMap = Maps.newHashMap();
RecordSet rs = new RecordSet();
List<Map<String,Object>> classInfo = (List<Map<String,Object>>)params.get("classInfo");
String sql = "select ygid,rq,bc,xm1,xm2,xm3,xm4,xm5,xm6,xm7,xm8,j1,c1,j2,c2,j3,c3,j4,c4,j5,c5,j6,c6,j7,c7,j8,c8 from uf_jcl_kq_cqjg where ygid=? and rq=?";
List<Map<String,Object>> dataList = DbTools.getSqlToList(sql,userId,date);
//班次信息
if (params.get("classInfo") == null){
//当天没有排班,计入异常
noScheduling(params,rs,dataList);
return resultMap;
}
if (dataList.size() >0){
//有出勤结果
int index = 0;
int i = 0;
while (index==0){
i++;
if (dataList.get(0).get("xm"+i) == null || "".equals(dataList.get(0).get("xm"+i))){
index = i;
break;
}
}
sql = "update uf_jcl_kq_cqjg set xm"+index+"=?,sc"+index+"=? where ygid=? and rq=?";
DbTools.update(rs,sql,item,itemduration,userId,date);
}else {
//没有出勤结果
sql = "select subcompanyid1,departmentid,jobtitle from hrmresource where id=?";
List<Map<String,Object>> userList = DbTools.getSqlToList(sql,userId);
sql = "insert into uf_jcl_kq_cqjg (szjg,ygid,fbid,bm,zw,rq,bc,bcbdxx,cqzt,cqsc,xm1,sc1,sjzt,fxrq,formmodeid,modeuuid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
DbTools.update(rs,sql,userList.get(0).get("subcompanyid1"),userId,userList.get(0).get("subcompanyid1"),userList.get(0).get("departmentid"),
userList.get(0).get("jobtitle"),date,classInfo.get(0).get("bcxx"),classInfo.get(0).get("bcsdxx"),1,0,item,itemduration,1, DateUtil.getCurrentDate(),formmodeid, UUID.randomUUID().toString(),1,0,DateUtil.getCurrentDate(),DateUtil.getCurrentTime().split(" ")[1]);
}
return resultMap;
}
/**
*
* @param params
*/
public void noScheduling(Map<String,Object> params, RecordSet rs,List<Map<String,Object>> dataList){
String userId = Util.null2String(params.get("userId"));
String date = Util.null2String(params.get("date"));
String formmodeid = Util.null2String(params.get("modeId"));
List<Map<String, Object>> scheduleList = params.get("scheduleList") == null? Lists.newArrayList():(List<Map<String, Object>>)params.get("scheduleList");
String sql = "select subcompanyid1,departmentid,jobtitle from hrmresource where id=?";
String rqlx = "NULL";
String sfxx = "NULL";
String cqzt = "1";
if (scheduleList.size()>0){
rqlx = Util.null2String(scheduleList.get(0).get("rqlx"));
sfxx = Util.null2String(scheduleList.get(0).get("sfxx"));
cqzt = "0";
}
List<Map<String,Object>> userList = DbTools.getSqlToList(sql,userId);
if (dataList.size() >0){
if ("1".equals(sfxx)){
sql = "update uf_jcl_kq_cqjg set bc=NULL,bcbdxx=NULL,cqzt="+cqzt+",cqsc=0,sjzt=1,rqlx="+rqlx+",sfxx="+sfxx+",fxrq='"+DateUtil.getCurrentTime()+"',";
for (int i=1;i<9;i++){
sql = sql +"xm"+i+"=NULL,sc"+i+"=NULL,"+ "j"+i+"=NULL,c"+i+"=NULL,";
}
sql = sql.substring(0,sql.length()-1) +" where ygid=? and rq=?";
DbTools.update(rs,sql,userId,date);
}else {
sql = "update uf_jcl_kq_cqjg set bc=NULL,bcbdxx=NULL,xm1=?,sc1=NULL,j1=NULL,c1=NULL,cqzt="+cqzt+",cqsc=0,sjzt=1,rqlx="+rqlx+",sfxx="+sfxx+",fxrq='"+DateUtil.getCurrentTime()+"',";
for (int i=2;i<9;i++){
sql = sql +"xm"+i+"=NULL,sc"+i+"=NULL,"+ "j"+i+"=NULL,c"+i+"=NULL,";
}
sql = sql.substring(0,sql.length()-1) +" where ygid=? and rq=?";
DbTools.update(rs,sql,SystemItemEnum.NO_SCHEDULING.getKey(),userId,date);
}
}else {
if (scheduleList.size()>0){
if ("1".equals(sfxx)){
sql = "insert into uf_jcl_kq_cqjg (cqsc,szjg,ygid,fbid,bm,zw,rq,cqzt,sjzt,fxrq,formmodeid,modeuuid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,rqlx,sfxx) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
DbTools.update(rs,sql,0,userList.get(0).get("subcompanyid1"),userId,userList.get(0).get("subcompanyid1"),
userList.get(0).get("departmentid"),userList.get(0).get("jobtitle"),date,cqzt,1, DateUtil.getCurrentTime(),formmodeid, UUID.randomUUID().toString(),1,0,DateUtil.getCurrentDate(),DateUtil.getCurrentTime().split(" ")[1],rqlx,sfxx);
}else {
sql = "insert into uf_jcl_kq_cqjg (cqsc,szjg,ygid,fbid,bm,zw,rq,xm1,cqzt,sjzt,fxrq,formmodeid,modeuuid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,rqlx,sfxx) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
DbTools.update(rs,sql,0,userList.get(0).get("subcompanyid1"),userId,userList.get(0).get("subcompanyid1"),
userList.get(0).get("departmentid"),userList.get(0).get("jobtitle"),date, SystemItemEnum.NO_SCHEDULING.getKey(),cqzt,1, DateUtil.getCurrentTime(),formmodeid, UUID.randomUUID().toString(),1,0,DateUtil.getCurrentDate(),DateUtil.getCurrentTime().split(" ")[1],rqlx,sfxx);
}
}else {
sql = "insert into uf_jcl_kq_cqjg (cqsc,szjg,ygid,fbid,bm,zw,rq,xm1,cqzt,sjzt,fxrq,formmodeid,modeuuid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
DbTools.update(rs,sql,0,userList.get(0).get("subcompanyid1"),userId,userList.get(0).get("subcompanyid1"),
userList.get(0).get("departmentid"),userList.get(0).get("jobtitle"),date, SystemItemEnum.NO_SCHEDULING.getKey(),cqzt,1, DateUtil.getCurrentTime(),formmodeid, UUID.randomUUID().toString(),1,0,DateUtil.getCurrentDate(),DateUtil.getCurrentTime().split(" ")[1]);
}
}
}
}

@ -1,19 +1,27 @@
package com.engine.attendance.attendanceanalysis.cmd.getclockInpoint; package com.engine.attendance.attendanceanalysis.cmd.getclockInpoint;
import com.engine.attendance.attendanceanalysis.dto.ClockPointDTO; import com.engine.attendance.attendanceanalysis.dto.ClockPointDTO;
import com.engine.attendance.enums.ClassSegmentTypeEnum;
import com.engine.attendance.enums.ClockPointEnum;
import com.engine.common.biz.AbstractCommonCommand; import com.engine.common.biz.AbstractCommonCommand;
import com.engine.common.entity.BizLogContext; import com.engine.common.entity.BizLogContext;
import com.engine.common.util.DateUtil;
import com.engine.common.util.Utils; import com.engine.common.util.Utils;
import com.engine.core.interceptor.CommandContext; import com.engine.core.interceptor.CommandContext;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
*
* *
* *
*/ */
@Slf4j
public class AdjustByWorkOverTimeCmd extends AbstractCommonCommand<Map<String, Object>> { public class AdjustByWorkOverTimeCmd extends AbstractCommonCommand<Map<String, Object>> {
public AdjustByWorkOverTimeCmd(Map<String, Object> params) { public AdjustByWorkOverTimeCmd(Map<String, Object> params) {
@ -27,12 +35,139 @@ public class AdjustByWorkOverTimeCmd extends AbstractCommonCommand<Map<String, O
@Override @Override
public Map<String, Object> execute(CommandContext commandContext) { public Map<String, Object> execute(CommandContext commandContext) {
List<ClockPointDTO> clcokInPointList = (List<ClockPointDTO>)params.get("clcokInTimeData"); Map<String,Object> resultMap = Maps.newHashMap();
List<ClockPointDTO> clcokInPointList = (List<ClockPointDTO>)params.get("clcokInPointList");
List<Map<String, Object>> scheduleResult = (List<Map<String, Object>>)params.get("scheduleResult"); List<Map<String, Object>> scheduleResult = (List<Map<String, Object>>)params.get("scheduleResult");
scheduleResult = scheduleResult.stream().filter(e -> !ClassSegmentTypeEnum.ASK_FOR_LEAVE.getKey().equals(e.get("bdlx")) && !ClassSegmentTypeEnum.EVECTION.getKey().equals(e.get("bdlx"))).collect(Collectors.toList());
String analysisDate = params.get("analysisDate").toString(); String analysisDate = params.get("analysisDate").toString();
// for () List<Map<String, Object>> askForLeaveAndEvctionScheduleList = (List<Map<String, Object>>)params.get("askForLeaveAndEvctionScheduleList");
List<ClockPointDTO> adjustClcokInPointList = Lists.newArrayList();
for (int i=0;i<clcokInPointList.size();i++){
ClockPointDTO clockPointDTO = clcokInPointList.get(i);
//班次时间
String classTime = clockPointDTO.getClassTime();
String classSegmentType = clockPointDTO.getClassSegmentType();
return null; //当为加班卡点时
if (Utils.ifOverTimeClassSegment(classSegmentType)){
int scheduleIndex = getScheduleIndex(classTime,scheduleResult,analysisDate);
if (clockPointDTO.getPointType() == ClockPointEnum.END){
int adjustScheduleIndex = getBeforeAccordWithScheduleIndex(clcokInPointList,scheduleIndex,scheduleResult,clockPointDTO.getClockTime(),analysisDate);
if (adjustScheduleIndex<scheduleIndex){
//将原先的打卡调整为该班段的结束打卡卡点
Map<String, Object> adjustScheduleMap = scheduleResult.get(adjustScheduleIndex);
String jssj = Utils.getjssjTime(adjustScheduleMap,analysisDate);
//原先卡点不计异常
clockPointDTO.setRecord(false);
ClockPointDTO adjustClockPointDTO = ClockPointDTO.builder().classTime(jssj).pointType(ClockPointEnum.END).timeType(clockPointDTO.getTimeType())
.classSegmentType(adjustScheduleMap.get("bdlx").toString()).clockTime(clockPointDTO.getClockTime()).record(true).build();
adjustClcokInPointList.add(adjustClockPointDTO);
}
}else if (clockPointDTO.getPointType() == ClockPointEnum.START){
//上班卡
int adjustScheduleIndex = getAfterAccordWithScheduleIndex(clcokInPointList,scheduleIndex,scheduleResult,clockPointDTO.getClockTime(),analysisDate);
if (adjustScheduleIndex>scheduleIndex){
//将原先的打卡调整为该班段的结束打卡卡点
Map<String, Object> adjustScheduleMap = scheduleResult.get(adjustScheduleIndex);
String kssj = Utils.getkssjTime(adjustScheduleMap,analysisDate);
//原先卡点不计异常
clockPointDTO.setRecord(false);
ClockPointDTO adjustClockPointDTO = ClockPointDTO.builder().classTime(kssj).pointType(ClockPointEnum.START).timeType(clockPointDTO.getTimeType())
.classSegmentType(adjustScheduleMap.get("bdlx").toString()).clockTime(clockPointDTO.getClockTime()).record(true).build();
adjustClcokInPointList.add(adjustClockPointDTO);
}
}
}
}
adjustClcokInPointList.addAll(clcokInPointList);
log.info("AdjustByWorkOverTimeCmd : [{}]",adjustClcokInPointList);
resultMap.put("clcokInPointList",adjustClcokInPointList);
return resultMap;
}
/**
*
* @param scheduleIndex
* @param scheduleResult
* @param clockTimeMap
* @return
*/
public int getBeforeAccordWithScheduleIndex(List<ClockPointDTO> clcokInPointList,int scheduleIndex,List<Map<String, Object>> scheduleResult,Map<String, Object> clockTimeMap,String analysisDate){
if (scheduleIndex == 0){
return scheduleIndex;
}
Map<String, Object> scheduleMap = scheduleResult.get(scheduleIndex);
Map<String, Object> beforeScheduleMap = scheduleResult.get(scheduleIndex-1);
String dtkssj = Utils.getkssjTime(scheduleMap,analysisDate);
String beforeDtjssj = Utils.getjssjTime(beforeScheduleMap,analysisDate);
ClockPointDTO nowclockPointDTO = null;
for (ClockPointDTO clockPointDTO :clcokInPointList){
if (clockPointDTO.getClassTime().equals(dtkssj)){
nowclockPointDTO = clockPointDTO;
}
}
String beforeClassSegment = scheduleMap.get("bdlx").toString();
String clockTime = clockTimeMap == null?"" : clockTimeMap.get("signdate")+" "+clockTimeMap.get("signtime");
if (Utils.ifRestClassSegment(beforeClassSegment) || DateUtil.getTime(beforeDtjssj).compareTo(DateUtil.getTime(dtkssj)) != 0 || scheduleMap.get("bdlx").equals(ClassSegmentTypeEnum.WORK_TIME.getKey()) ||
(nowclockPointDTO != null && nowclockPointDTO.getTimeType() != ClockPointEnum.EMPTY)){
//前一个班段为休息班段、与前一个班段不连续时、当前班次为工作时段,不作处理直接返回
return scheduleIndex;
}
if (clockTimeMap == null || DateUtil.getTime(clockTime).compareTo(DateUtil.getTime(dtkssj)) <0){
//当前加班为漏卡或者打卡时间小于加班开始时间进行往前递归
scheduleIndex--;
return getBeforeAccordWithScheduleIndex(clcokInPointList,scheduleIndex,scheduleResult,clockTimeMap,analysisDate);
}else {
return scheduleIndex;
}
}
/**
*
* @param scheduleIndex
* @param scheduleResult
* @param clockTimeMap
* @return
*/
public int getAfterAccordWithScheduleIndex(List<ClockPointDTO> clcokInPointList,int scheduleIndex,List<Map<String, Object>> scheduleResult,Map<String, Object> clockTimeMap,String analysisDate){
if (scheduleIndex == scheduleResult.size()-1){
return scheduleIndex;
}
Map<String, Object> scheduleMap = scheduleResult.get(scheduleIndex);
Map<String, Object> afterScheduleMap = scheduleResult.get(scheduleIndex+1);
String dtjssj = Utils.getjssjTime(scheduleMap,analysisDate);
String afterDtkssj = Utils.getkssjTime(afterScheduleMap,analysisDate);
String afterClassSegment = scheduleMap.get("bdlx").toString();
String clockTime = clockTimeMap == null?"" : clockTimeMap.get("signdate")+" "+clockTimeMap.get("signtime");
ClockPointDTO nowclockPointDTO = null;
for (ClockPointDTO clockPointDTO :clcokInPointList){
if (clockPointDTO.getClassTime().equals(dtjssj)){
nowclockPointDTO = clockPointDTO;
}
}
if (Utils.ifRestClassSegment(afterClassSegment) || DateUtil.getTime(afterDtkssj).compareTo(DateUtil.getTime(dtjssj)) != 0 || scheduleMap.get("bdlx").equals(ClassSegmentTypeEnum.WORK_TIME.getKey()) ||
(nowclockPointDTO != null && nowclockPointDTO.getTimeType() != ClockPointEnum.EMPTY)){
//后一个班段为休息班段、与后一个上班段不连续时、当前班次为工作时段,不作处理直接返回
return scheduleIndex;
}
if (clockTimeMap == null || DateUtil.getTime(clockTime).compareTo(DateUtil.getTime(dtjssj)) >0){
//当前加班为漏卡或者打卡时间小于加班开始时间进行往前递归
scheduleIndex++;
return getAfterAccordWithScheduleIndex(clcokInPointList,scheduleIndex,scheduleResult,clockTimeMap,analysisDate);
}else {
return scheduleIndex;
}
} }
public int getScheduleIndex(String time,List<Map<String, Object>> scheduleResult,String analysisDate){ public int getScheduleIndex(String time,List<Map<String, Object>> scheduleResult,String analysisDate){
@ -46,4 +181,5 @@ public class AdjustByWorkOverTimeCmd extends AbstractCommonCommand<Map<String, O
return -1; return -1;
} }
} }

@ -46,13 +46,20 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
List<Map<String, Object>> needClockInList = scheduleResult.stream().filter(e -> !ClassSegmentTypeEnum.REST_AND_DINE.getKey().equals(e.get("bdlx")) && !ClassSegmentTypeEnum.REST_PERIOD.getKey().equals(e.get("bdlx")) && List<Map<String, Object>> needClockInList = scheduleResult.stream().filter(e -> !ClassSegmentTypeEnum.REST_AND_DINE.getKey().equals(e.get("bdlx")) && !ClassSegmentTypeEnum.REST_PERIOD.getKey().equals(e.get("bdlx")) &&
!ClassSegmentTypeEnum.DINING_PERIOD.getKey().equals(e.get("bdlx")) ).collect(Collectors.toList()); !ClassSegmentTypeEnum.DINING_PERIOD.getKey().equals(e.get("bdlx")) ).collect(Collectors.toList());
log.info("未重新计算卡点时 老的scheduleResult : [{}],askForLeaveAndEvctionScheduleList:[{}]",scheduleResult,askForLeaveAndEvctionScheduleList);
//调整加班计时间段的打卡
scheduleResult = adjustWorkOverTimeClock(scheduleResult,analysisDate);
log.info("经过adjustWorkOverTimeClock 加班调整过后的 的scheduleResult: [{}]",scheduleResult);
/** /**
* *
*/ */
log.info("未重新计算卡点时 老的scheduleResult : [{}],askForLeaveAndEvctionScheduleList:[{}]",scheduleResult,askForLeaveAndEvctionScheduleList); //判断是否骑在上班卡或下班卡
boolean ifStartNeedClock=false; boolean ifStartNeedClock=false;
String startNeedClockTime = "";
boolean ifEndNeedClock=false; boolean ifEndNeedClock=false;
String endNeedClockTime = "";
if (needClockInList.size() > 0 && askForLeaveAndEvctionScheduleList.size() > 0) { if (needClockInList.size() > 0 && askForLeaveAndEvctionScheduleList.size() > 0) {
String startTime = Utils.getkssjTime(needClockInList.get(0),analysisDate); String startTime = Utils.getkssjTime(needClockInList.get(0),analysisDate);
String endStartTime = Utils.getkssjTime(needClockInList.get(needClockInList.size()-1),analysisDate); String endStartTime = Utils.getkssjTime(needClockInList.get(needClockInList.size()-1),analysisDate);
@ -75,9 +82,10 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
String kssj = Utils.getkssjTime(needClockMap,analysisDate); String kssj = Utils.getkssjTime(needClockMap,analysisDate);
String jssj = Utils.getjssjTime(needClockMap,analysisDate); String jssj = Utils.getjssjTime(needClockMap,analysisDate);
//中间只要有开始打卡,即上班需要打卡
if (CheckBoxEnum.CHECKED.getKey().equals(needClockMap.get("ksdk")) && DateUtil.getTime(dtjssj).compareTo(DateUtil.getTime(jssj)) >=0){ if (CheckBoxEnum.CHECKED.getKey().equals(needClockMap.get("ksdk")) && DateUtil.getTime(dtjssj).compareTo(DateUtil.getTime(jssj)) >=0){
ifStartNeedClock=true; ifStartNeedClock=true;
startNeedClockTime = dtjssj;
} }
} }
} }
@ -86,9 +94,10 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
//骑在下班时间 //骑在下班时间
for (Map<String,Object> needClockMap:needClockInList){ for (Map<String,Object> needClockMap:needClockInList){
String kssj = Utils.getkssjTime(needClockMap,analysisDate); String kssj = Utils.getkssjTime(needClockMap,analysisDate);
//中间只要有结束打卡,即下班需要打卡
if (CheckBoxEnum.CHECKED.getKey().equals(needClockMap.get("jsdk")) && DateUtil.getTime(dtkssj).compareTo(DateUtil.getTime(kssj)) <=0){ if (CheckBoxEnum.CHECKED.getKey().equals(needClockMap.get("jsdk")) && DateUtil.getTime(dtkssj).compareTo(DateUtil.getTime(kssj)) <=0){
ifEndNeedClock=true; ifEndNeedClock=true;
endNeedClockTime = dtkssj;
} }
} }
} }
@ -190,23 +199,28 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
*/ */
if (needClockDateList.size() == 1){ if (needClockDateList.size() == 1){
for (int i=0;i<scheduleResult.size();i++){ for (int i=0;i<scheduleResult.size();i++){
String dtkssj = Util.null2String(scheduleResult.get(i).get("dtkssj")); String dtkssj = Utils.getkssjTime(scheduleResult.get(i),analysisDate);
String dtjssj = Util.null2String(scheduleResult.get(i).get("dtjssj")); String dtjssj = Utils.getjssjTime(scheduleResult.get(i),analysisDate);
String bdlx = Util.null2String(scheduleResult.get(i).get("bdlx")); String bdlx = Util.null2String(scheduleResult.get(i).get("bdlx"));
if (ifStartNeedClock && needClockInList.get(0).get("dtkssj").equals(dtkssj) && if (ifStartNeedClock && DateUtil.getTime(startNeedClockTime).compareTo(DateUtil.getTime(dtkssj)) >=0 &&
DateUtil.getTime(startNeedClockTime).compareTo(DateUtil.getTime(dtjssj)) <0 &&
!ClassSegmentTypeEnum.EVECTION.getKey().equals(bdlx) && !ClassSegmentTypeEnum.EVECTION.getKey().equals(bdlx) &&
!ClassSegmentTypeEnum.ASK_FOR_LEAVE.getKey().equals(bdlx)){ !ClassSegmentTypeEnum.ASK_FOR_LEAVE.getKey().equals(bdlx)){
String firstKssj = Utils.getkssjTime(scheduleResult.get(0),analysisDate);
String kssj = Utils.getkssjTime(scheduleResult.get(i),analysisDate);
scheduleResult.get(i).put("ksdk",CheckBoxEnum.CHECKED.getKey()); scheduleResult.get(i).put("ksdk",CheckBoxEnum.CHECKED.getKey());
needClockDateList.add(0,Utils.getkssjTime(scheduleResult.get(i),analysisDate)); scheduleResult.get(i).put("tqdkfzs",DateUtil.getBetWeenMinutes(firstKssj,kssj));
needClockDateList.add(0,dtkssj);
break; break;
} }
if (ifEndNeedClock && needClockInList.get(needClockInList.size()-1).get("dtjssj").equals(dtjssj) && if (ifEndNeedClock && DateUtil.getTime(endNeedClockTime).compareTo(DateUtil.getTime(dtkssj)) >0 &&
DateUtil.getTime(endNeedClockTime).compareTo(DateUtil.getTime(dtjssj)) <=0 &&
!ClassSegmentTypeEnum.EVECTION.getKey().equals(bdlx) && !ClassSegmentTypeEnum.EVECTION.getKey().equals(bdlx) &&
!ClassSegmentTypeEnum.ASK_FOR_LEAVE.getKey().equals(bdlx)){ !ClassSegmentTypeEnum.ASK_FOR_LEAVE.getKey().equals(bdlx)){
String lastjssj = Utils.getjssjTime(scheduleResult.get(scheduleResult.size()-1),analysisDate);
String jssj = Utils.getjssjTime(scheduleResult.get(i),analysisDate);
scheduleResult.get(i).put("jsdk",CheckBoxEnum.CHECKED.getKey()); scheduleResult.get(i).put("jsdk",CheckBoxEnum.CHECKED.getKey());
dtkssj = Utils.getkssjTime(scheduleResult.get(i),analysisDate); scheduleResult.get(i).put("thdkfzs",DateUtil.getBetWeenMinutes(jssj,lastjssj));
dtjssj = Utils.getjssjTime(scheduleResult.get(i),analysisDate);
needClockDateList.add(dtjssj); needClockDateList.add(dtjssj);
break; break;
} }
@ -224,6 +238,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
resultMap.put("clcokInPointList", clcokInPointList); resultMap.put("clcokInPointList", clcokInPointList);
resultMap.put("scheduleResult",scheduleResult); resultMap.put("scheduleResult",scheduleResult);
resultMap.put("needClockDateList",needClockDateList); resultMap.put("needClockDateList",needClockDateList);
resultMap.put("askForLeaveAndEvctionScheduleList",askForLeaveAndEvctionScheduleList);
return resultMap; return resultMap;
} }
@ -280,7 +295,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
} }
//clcokInTimeMap.put(dtkssj + "|" + ClockPointEnum.START.getKey() + "|" + timeType, ksdkNearestClcokInTime.get(timeType)); //clcokInTimeMap.put(dtkssj + "|" + ClockPointEnum.START.getKey() + "|" + timeType, ksdkNearestClcokInTime.get(timeType));
clcokInTimeData.add(ClockPointDTO.builder().classTime(dtkssj).pointType(ClockPointEnum.START).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(ksdkNearestClcokInTime.get(timeType)).build()); clcokInTimeData.add(ClockPointDTO.builder().classTime(dtkssj).pointType(ClockPointEnum.START).timeType(timeType).record(true).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(ksdkNearestClcokInTime.get(timeType)).build());
} }
/**非请假外出结束打卡逻辑处理*/ /**非请假外出结束打卡逻辑处理*/
if (CheckBoxEnum.CHECKED.getKey().equals(needClockIn.get("jsdk")) && !ClassSegmentTypeEnum.EVECTION.getKey().equals(needClockIn.get("bdlx")) && if (CheckBoxEnum.CHECKED.getKey().equals(needClockIn.get("jsdk")) && !ClassSegmentTypeEnum.EVECTION.getKey().equals(needClockIn.get("bdlx")) &&
@ -316,7 +331,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
} }
//clcokInTimeMap.put(dtjssj + "|" + ClockPointEnum.END.getKey() + "|" + timeType, jsdkNearestClcokInTime.get(timeType)); //clcokInTimeMap.put(dtjssj + "|" + ClockPointEnum.END.getKey() + "|" + timeType, jsdkNearestClcokInTime.get(timeType));
clcokInTimeData.add(ClockPointDTO.builder().classTime(dtjssj).pointType(ClockPointEnum.END).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(jsdkNearestClcokInTime.get(timeType)).build()); clcokInTimeData.add(ClockPointDTO.builder().classTime(dtjssj).pointType(ClockPointEnum.END).timeType(timeType).record(true).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(jsdkNearestClcokInTime.get(timeType)).build());
} }
/** /**
@ -351,7 +366,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
} }
// clcokInTimeMap.put(dtkssj + "|" + ClockPointEnum.END.getKey() + "|" + timeType+"|0", jsdkNearestClcokInTime.get(timeType)); // clcokInTimeMap.put(dtkssj + "|" + ClockPointEnum.END.getKey() + "|" + timeType+"|0", jsdkNearestClcokInTime.get(timeType));
clcokInTimeData.add(ClockPointDTO.builder().classTime(dtkssj).pointType(ClockPointEnum.END).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(jsdkNearestClcokInTime.get(timeType)).build()); clcokInTimeData.add(ClockPointDTO.builder().classTime(dtkssj).pointType(ClockPointEnum.END).record(true).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(jsdkNearestClcokInTime.get(timeType)).build());
} }
/** /**
@ -391,7 +406,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
} }
//clcokInTimeMap.put(dtjssj + "|" + ClockPointEnum.START.getKey() + "|" + timeType+"|0", ksdkNearestClcokInTime.get(timeType)); //clcokInTimeMap.put(dtjssj + "|" + ClockPointEnum.START.getKey() + "|" + timeType+"|0", ksdkNearestClcokInTime.get(timeType));
clcokInTimeData.add(ClockPointDTO.builder().classTime(dtjssj).pointType(ClockPointEnum.START).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(ksdkNearestClcokInTime.get(timeType)).build()); clcokInTimeData.add(ClockPointDTO.builder().classTime(dtjssj).pointType(ClockPointEnum.START).record(true).timeType(timeType).classSegmentType(needClockIn.get("bdlx").toString()).clockTime(ksdkNearestClcokInTime.get(timeType)).build());
} }
@ -476,7 +491,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
//empty:漏卡equal:打卡时间和班次时间相等before打卡时间在班次时间之前after打卡时间在班次时间之后 //empty:漏卡equal:打卡时间和班次时间相等before打卡时间在班次时间之前after打卡时间在班次时间之后
ClockPointEnum timeType = clockdto.getTimeType(); ClockPointEnum timeType = clockdto.getTimeType();
if (pointTime.equals(kssjStart) && ClockPointEnum.START.getKey().equals(pointType) && clcokInTime != null if (pointTime.equals(kssjStart) && ClockPointEnum.START.equals(pointType) && clcokInTime != null
&& CheckBoxEnum.CHECKED.getKey().equals(ifToWorkClock)) { && CheckBoxEnum.CHECKED.getKey().equals(ifToWorkClock)) {
String signTime = clcokInTime.get("signdate") + " " + clcokInTime.get("signtime"); String signTime = clcokInTime.get("signdate") + " " + clcokInTime.get("signtime");
//该卡点是弹性开始时间 //该卡点是弹性开始时间
@ -508,7 +523,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
//弹性上班期间被请假开始时间占据 //弹性上班期间被请假开始时间占据
clockdto.setElasticTime(flexibleWorkTime); clockdto.setElasticTime(flexibleWorkTime);
} }
} else if (pointTime.equals(jssjEnd) && ClockPointEnum.END.getKey().equals(pointType) && CheckBoxEnum.CHECKED.getKey().equals(ifToCloseClock)) { } else if (pointTime.equals(jssjEnd) && ClockPointEnum.END.equals(pointType) && CheckBoxEnum.CHECKED.getKey().equals(ifToCloseClock)) {
//该卡点是弹性下班点 //该卡点是弹性下班点
if ("".equals(flexibleOffWorkTime) && !"".equals(flexibleWorkTime)){ if ("".equals(flexibleOffWorkTime) && !"".equals(flexibleWorkTime)){
int betweenToWorkTime = DateUtil.getBetWeenMinutes(flexibleWorkTime, kssjStart); int betweenToWorkTime = DateUtil.getBetWeenMinutes(flexibleWorkTime, kssjStart);
@ -748,7 +763,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
String newClockTime = newClockTimeMap.get("signdate")+ " "+newClockTimeMap.get("signtime"); String newClockTime = newClockTimeMap.get("signdate")+ " "+newClockTimeMap.get("signtime");
int index = clcokInTimeData.indexOf(resetClcokDTO); int index = clcokInTimeData.indexOf(resetClcokDTO);
if (newtimeType.equals(ClockPointEnum.BEFORE)){ if (newtimeType.equals(ClockPointEnum.BEFORE)){
if (pointType.equals(ClockPointEnum.START.getKey())){ if (pointType.equals(ClockPointEnum.START)){
//开始卡点 //开始卡点
Map<String,Object> needClockIn = scheduleResult.stream().filter(e -> { Map<String,Object> needClockIn = scheduleResult.stream().filter(e -> {
String dtkssj = Utils.getkssjTime(e,analysisDate); String dtkssj = Utils.getkssjTime(e,analysisDate);
@ -783,7 +798,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
} }
}else if (newtimeType.equals(ClockPointEnum.AFTER)){ }else if (newtimeType.equals(ClockPointEnum.AFTER)){
if (pointType.equals(ClockPointEnum.END.getKey())){ if (pointType.equals(ClockPointEnum.END)){
//结束卡点 //结束卡点
Map<String,Object> needClockIn = scheduleResult.stream().filter(e -> { Map<String,Object> needClockIn = scheduleResult.stream().filter(e -> {
String dtjssj = Utils.getjssjTime(e,analysisDate); String dtjssj = Utils.getjssjTime(e,analysisDate);
@ -816,4 +831,54 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
} }
return false; return false;
} }
/**
*
* @param scheduleResult
* @return
*/
public List<Map<String, Object>> adjustWorkOverTimeClock(List<Map<String, Object>> scheduleResult,String analysisDate){
scheduleResult = scheduleResult.stream().sorted(Comparator.comparing(e->DateUtil.getTime(Utils.getkssjTime(e,analysisDate)).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
for (int i=0;i<scheduleResult.size();i++){
Map<String, Object> scheduleMap = scheduleResult.get(i);
if (scheduleMap.get("bdlx").equals(ClassSegmentTypeEnum.OVERTIME_PLAN.getKey())){
String kssj = Utils.getkssjTime(scheduleMap,analysisDate);
String jssj = Utils.getjssjTime(scheduleMap,analysisDate);
Map<String, Object> beforeScheduleMap = i-1 >=0?scheduleResult.get(i-1):null;
Map<String, Object> afterScheduleMap = i+1 <=scheduleResult.size()-1?scheduleResult.get(i+1):null;
if (beforeScheduleMap != null){
String beforejssj = Utils.getjssjTime(beforeScheduleMap,analysisDate);
if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(beforejssj)) == 0 && ifWorkClassSegment(beforeScheduleMap.get("bdlx").toString()) &&
scheduleMap.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) && beforeScheduleMap.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey())){
scheduleMap.put("ksdk",CheckBoxEnum.UNCHECKED.getKey());
beforeScheduleMap.put("jsdk",CheckBoxEnum.UNCHECKED.getKey());
}
}
if (afterScheduleMap != null){
String afterkssj = Utils.getkssjTime(afterScheduleMap,analysisDate);
if (DateUtil.getTime(jssj).compareTo(DateUtil.getTime(afterkssj)) == 0 && ifWorkClassSegment(afterScheduleMap.get("bdlx").toString()) &&
scheduleMap.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey()) && afterScheduleMap.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey())){
scheduleMap.put("jsdk",CheckBoxEnum.UNCHECKED.getKey());
afterScheduleMap.put("ksdk",CheckBoxEnum.UNCHECKED.getKey());
}
}
}
}
return scheduleResult;
}
/**
*
* @param classSegmentType
* @return
*/
public boolean ifWorkClassSegment(String classSegmentType){
if (classSegmentType.equals(ClassSegmentTypeEnum.WORK_TIME.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey())
||classSegmentType.equals(ClassSegmentTypeEnum.OVERTIME_PLAN.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.EARLY_OVERTIME.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.OVERTIME_IN_CLASS.getKey())){
return true;
}else {
return false;
}
}
} }

@ -5,6 +5,7 @@ import com.engine.attendance.enums.WorkForTimeEnum;
import com.engine.common.biz.AbstractCommonCommand; 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.sun.jna.platform.win32.Shell32Util;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import weaver.general.Util; import weaver.general.Util;
@ -29,6 +30,7 @@ public class BeAwayItemCmd extends AbstractCommonCommand<Map<String,Object>> {
@Override @Override
public Map<String, Object> execute(CommandContext commandContext) { public Map<String, Object> execute(CommandContext commandContext) {
//作用时段 //作用时段
String workfor = Util.null2String(params.get("workfor")); String workfor = Util.null2String(params.get("workfor"));
//考勤项目 //考勤项目
List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems"); List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems");

@ -41,9 +41,13 @@ public class ClockPointDTO {
* ClassSegmentTypeEnum * ClassSegmentTypeEnum
*/ */
private String classSegmentType; private String classSegmentType;
/** /**
* *
*/ */
private Map<String, Object> clockTime; private Map<String, Object> clockTime;
/**
* false
* true:false
*/
private boolean record;
} }

@ -85,7 +85,7 @@ public class AllowanceServiceImpl extends Service implements AllowanceService {
int delayMinute = Double.valueOf(Util.null2String(param.get("delayMinute"))).intValue(); int delayMinute = Double.valueOf(Util.null2String(param.get("delayMinute"))).intValue();
List<Map<String,Object>> lateList = abnormalClockInList.stream().filter(e-> AttendanceItemTypeEnum.LATE.equals(e.get("itemType"))).collect(Collectors.toList()); List<Map<String,Object>> lateList = abnormalClockInList.stream().filter(e-> AttendanceItemTypeEnum.LATE.equals(e.get("itemType")) && (boolean)e.get("record")).collect(Collectors.toList());
lateList = lateList.stream().sorted(Comparator.comparing(e-> DateUtil.getTime(e.get("classStartTime").toString()).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList()); lateList = lateList.stream().sorted(Comparator.comparing(e-> DateUtil.getTime(e.get("classStartTime").toString()).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
Map<String,Object> lateMap = lateList.get(0); Map<String,Object> lateMap = lateList.get(0);
@ -95,14 +95,13 @@ public class AllowanceServiceImpl extends Service implements AllowanceService {
//早上打卡时间 //早上打卡时间
String classEndTime = Util.null2String(lateMap.get("classEndTime")); String classEndTime = Util.null2String(lateMap.get("classEndTime"));
int index = 0; //消除迟到
for (Map<String,Object> abnormalClockIn:abnormalClockInList){ for (Map<String,Object> abnormalClockIn:abnormalClockInList){
if (abnormalClockIn.get("itemType").equals(AttendanceItemTypeEnum.LATE) && if (abnormalClockIn.get("itemType").equals(AttendanceItemTypeEnum.LATE) &&
abnormalClockIn.get("classStartTime").equals(lateMap.get("classStartTime")) ){ abnormalClockIn.get("classStartTime").equals(lateMap.get("classStartTime")) ){
index = 0; abnormalClockInList.remove(abnormalClockIn);
} }
} }
abnormalClockInList.remove(index);
//延迟上班后新的上班时间 //延迟上班后新的上班时间
String newClassStartTime = DateUtil.AfterMinutes(classStartTime,delayMinute); String newClassStartTime = DateUtil.AfterMinutes(classStartTime,delayMinute);
@ -160,6 +159,7 @@ public class AllowanceServiceImpl extends Service implements AllowanceService {
saveWorkTimeBeLateParam.put("classEndTime",classEndTime); saveWorkTimeBeLateParam.put("classEndTime",classEndTime);
saveWorkTimeBeLateParam.put("pointTime",lateMap.get("pointTime")); saveWorkTimeBeLateParam.put("pointTime",lateMap.get("pointTime"));
saveWorkTimeBeLateParam.put("bdlx",lateMap.get("bdlx")); saveWorkTimeBeLateParam.put("bdlx",lateMap.get("bdlx"));
saveWorkTimeBeLateParam.put("record",lateMap.get("record"));
abnormalClockInList.add(saveWorkTimeBeLateParam); abnormalClockInList.add(saveWorkTimeBeLateParam);
} }

@ -8,16 +8,16 @@ import com.engine.attendance.attendanceanalysis.service.UtilService;
import com.engine.attendance.component.persongroup.service.SchedulingResultsService; import com.engine.attendance.component.persongroup.service.SchedulingResultsService;
import com.engine.attendance.component.persongroup.service.impl.SchedulingResultsServiceImpl; import com.engine.attendance.component.persongroup.service.impl.SchedulingResultsServiceImpl;
import com.engine.attendance.enums.*; import com.engine.attendance.enums.*;
import com.engine.common.cmd.GetDateCmd;
import com.engine.common.util.DateUtil; import com.engine.common.util.DateUtil;
import com.engine.common.util.DbTools;
import com.engine.common.util.ServiceUtil; import com.engine.common.util.ServiceUtil;
import com.engine.common.util.Utils; import com.engine.common.util.Utils;
import com.engine.core.impl.Service; import com.engine.core.impl.Service;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import weaver.general.Util; import weaver.general.Util;
import java.time.ZoneOffset;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -33,170 +33,10 @@ public class UtilServiceImpl extends Service implements UtilService {
*/ */
@Override @Override
public Map<String, Object> getSchedulingInFormation(Map<String, Object> params) { public Map<String, Object> getSchedulingInFormation(Map<String, Object> params) {
/** 班次信息*/ /** 班次信息*/
Map<String,Object> schedulingResultsMap = schedulingResultsService.queryDataTableActualUse(params); Map<String,Object> schedulingResultsMap = schedulingResultsService.queryDataTableActualUse(params);
List<Map<String,Object>> schedulingResultsList = (List<Map<String,Object>>)schedulingResultsMap.get("data"); params.put("schedulingResultsMap",schedulingResultsMap);
schedulingResultsList = Utils.getSchedulingList(schedulingResultsList); return commandExecutor.execute(new GetScheduleResultListCmd(params));
Map<String,Object> schedulMap = Maps.newHashMap();
String glpb = "";
if (schedulingResultsList.size() >0){
glpb = Util.null2String(schedulingResultsList.get(0).get("pbgl"));
}
//schedulingResultsList = schedulingResultsList.stream().filter(e -> !"1".equals(e.get("sfxx"))).collect(Collectors.toList());
// Map<String,String> schedulingMap = schedulingResultsList.stream().collect(Collectors.toMap(e-> Util.null2String(e.get("bcxx")).split("-")[0], e->Util.null2String(e.get("bcrq"))+"&"+Util.null2String(e.get("rqlx"))));
Map<String,List<Map<String,Object>>> schedulingMap = schedulingResultsList.stream().collect(Collectors.groupingBy(e-> Util.null2String(e.get("bcxx")).split("-")[0]));
Map<String,List<Map<String,Object>>> schedulingMapBydate = schedulingResultsList.stream().collect(Collectors.groupingBy(e-> Util.null2String(e.get("bcrq"))));
schedulMap.put("schedulingMapBydate",schedulingMapBydate);
Map<String,List<Map<String,Object>>> resultMap = Maps.newHashMap();
String sql = "select a.id bcxx,a.edsc,a.zgzsc,a.bcsdxx,a.sfdx,a.sfkt,b.bdlx,a.btgz,a.fgsjd,a.zddxfz,a.dxhs,b.kssj dtkssj,b.jssj dtjssj,b.ksdk,b.jsdk,b.tqdkfzs,b.thdkfzs,b.edxss,b.sfdx dtsfdx,b.zddxfz dtzddxfz,b.dxhs dtdxhs,b.gsrq from uf_jcl_kq_bcxx a left join uf_jcl_kq_bcxx_dt1 b on a.id=b.mainid where a.id in (";
String bcxxIds = "";
for (Map.Entry<String,List<Map<String,Object>>> entry :schedulingMap.entrySet()){
if (!entry.getKey().equals("")){
bcxxIds +=entry.getKey() +",";
}
}
List<Map<String,Object>> dataList = Lists.newArrayList();
if (!"".equals(bcxxIds)){
bcxxIds = bcxxIds.substring(0,bcxxIds.length()-1);
sql = sql +bcxxIds+") order by b.gsrq,b.kssj";
dataList = DbTools.getSqlToList(sql);
Map<String,List<Map<String,Object>>> dataMap = dataList.stream().collect(Collectors.groupingBy(e->Util.null2String(e.get("bcxx"))));
dataMap.entrySet().forEach(e -> {
List<Map<String,Object>> schedulingList = schedulingMap.get(e.getKey());
List<Map<String,Object>> bcxxs = e.getValue();
for (Map<String,Object> scheduling :schedulingList){
String bcrq = Util.null2String(scheduling.get("bcrq"));
String rqlx = Util.null2String(scheduling.get("rqlx"));
String sfxx = Util.null2String(scheduling.get("sfxx"));
List<Map<String,Object>> classs = Lists.newArrayList();
for (Map<String,Object> map:bcxxs){
Map<String,Object> newMap = Maps.newHashMap();
newMap.putAll(map);
newMap.put("rqlx",rqlx);
newMap.put("sfxx",sfxx);
classs.add(newMap);
}
resultMap.put(bcrq,classs);
}
});
}
/** 加班计划*/
sql = "select b.jbry,b.ksrq,b.kssj,a.jblx,b.jsrq,b.jssj,b.jbsc from uf_jcl_kq_jbjh a left join uf_jcl_kq_jbjh_dt1 b on a.id=b.mainid where b.jbry =? and b.ksrq>=? and b.ksrq<=? and (b.jbcx=0 or b.jbcx is null)";
Map<String,List<Map<String,Object>>> overtimePlanMap = DbTools.getSqlToList(sql,params.get("pbdx"),params.get("startDate"),params.get("endDate")).stream().collect(Collectors.groupingBy(e -> Util.null2String(e.get("ksrq"))));
//考勤项目
List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems");
//日期集合
Map<String,Object> dateParam = Maps.newHashMap();
dateParam.put("nd",Util.null2String(params.get("startDate")).split("-")[0]);
dateParam.put("glpb",glpb);
Map<String,Object> result = commandExecutor.execute(new GetDateCmd(dateParam));
List<Map<String,Object>> list = (List<Map<String,Object>>)result.get("data");
Map<String,String> dateMap = list.stream().collect(Collectors.toMap(e->Util.null2String(e.get("rq")),e->Util.null2String(e.get("rqlx"))));
for (Map.Entry<String,List<Map<String,Object>>> e: overtimePlanMap.entrySet()){
if (resultMap.get(e.getKey()) == null){
resultMap.put(e.getKey(),Lists.newArrayList());
}
List<Map<String,Object>> resultList = resultMap.get(e.getKey());
List<Map<String,Object>> schedulingdateMap = schedulingMapBydate.get(e.getKey());
Map<String,Object> overtimePlan = e.getValue().get(0);
Map<String,Object> map = Maps.newHashMap();
if (!overtimePlan.get("ksrq").equals(overtimePlan.get("jsrq"))){
map.put("sfkt","1");
}else {
map.put("sfkt","0");
}
//查找对应的考勤项目
String querySql = "select id keyid,ksjbbxydk,jsjbbxydk,tqdkyxfzs,thdkyxfzs,jbwdhlfzs,jbzzhlfzs,tqdkjrjb,thdkjrjb,jbscbdccsqsc,zdkcjcxxsc,ccclfs,rzdjbxss,yzdjbxss,zzdjbxss,jbzdzjqye,jbqsfzs,ccqszhdhsfzs,hsl,hsdw from uf_jcl_kq_kqxm where id=?";
attendanceItems = DbTools.getSqlToList(querySql,overtimePlan.get("jblx"));
map.put("bcxx",schedulingdateMap == null || schedulingdateMap.get(0) ==null ? "0" :schedulingdateMap.get(0).get("bcxx"));
map.put("bcsdxx",schedulingdateMap == null || schedulingdateMap.get(0) ==null ? "":schedulingdateMap.get(0).get("bcsdxx"));
if (resultList.size()>0){
map.put("edsc",Util.null2String(resultList.get(0).get("edsc")));
map.put("sfdx",Util.null2String(resultList.get(0).get("sfdx")));
map.put("zddxfz",Util.null2String(resultList.get(0).get("zddxfz")));
map.put("dxhs",Util.null2String(resultList.get(0).get("dxhs")));
}else {
map.put("edsc","0");
}
map.put("bdlx", ClassSegmentTypeEnum.OVERTIME_PLAN.getKey());
map.put("dtkssj",overtimePlan.get("kssj"));
map.put("dtjssj",overtimePlan.get("jssj"));
map.put("ksdk","0");
map.put("jsdk","0");
if (schedulingdateMap != null && schedulingdateMap.size()>0){
map.put("sfxx",Util.null2String(schedulingdateMap.get(0).get("sfxx")));
}
map.put("tqdkfzs","60");
map.put("thdkfzs","60");
map.put("rqlx",dateMap.get(e.getKey()));
map.put("edxss",overtimePlan.get("jbsc"));
map.put("jblx",attendanceItems);
map.put("gsrq",ClassBelongToEnum.NOWDAY.getKey());
if (attendanceItems.size() >0){
map.put("ksdk",attendanceItems.get(0).get("ksjbbxydk"));
map.put("jsdk",attendanceItems.get(0).get("jsjbbxydk"));
map.put("tqdkfzs",attendanceItems.get(0).get("tqdkyxfzs"));
map.put("thdkfzs",attendanceItems.get(0).get("thdkyxfzs"));
map.put("jbwdhlfzs",attendanceItems.get(0).get("jbwdhlfzs"));
map.put("jbzzhlfzs",attendanceItems.get(0).get("jbzzhlfzs"));
}
if (resultList.size() > 1){
String kssjbegin = Utils.getkssjTime(resultList.get(0),e.getKey());
String kssjend = Utils.getkssjTime(resultList.get(resultList.size()-1),e.getKey());
String kssj = overtimePlan.get("ksrq")+" "+overtimePlan.get("kssj");
if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(kssjbegin)) <0){
//加班计划在开头
if (resultList.get(0).get("dtkssj").equals(overtimePlan.get("jssj")) &&
resultList.get(0).get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey())){
//当加班结束时间和早上打卡时间重合时
}
resultList.add(0,map);
}else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(kssjend)) >0){
//加班计划在末尾
if (resultList.get(0).get("dtjssj").equals(overtimePlan.get("kssj")) &&
resultList.get(0).get("jsdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("ksdk").equals(CheckBoxEnum.CHECKED.getKey()) &&
map.get("jsdk").equals(CheckBoxEnum.CHECKED.getKey())){
//当加班结束时间和晚上下班时间重合时1
}
resultList.add(map);
}else {
//加班计划在中间
for (int j=1;j<resultList.size();j++){
String kssj1 = Utils.getkssjTime(resultList.get(j),e.getKey());
String kssj2 = overtimePlan.get("ksrq")+" "+overtimePlan.get("kssj");
String kssj3 = Utils.getkssjTime(resultList.get(j-1),e.getKey());
if (DateUtil.getTime(kssj1).compareTo(DateUtil.getTime(kssj2)) >=0 && DateUtil.getTime(kssj3).compareTo(DateUtil.getTime(kssj2)) <=0){
resultList.add(j,map);
break;
}
}
}
}else {
resultList.add(map);
}
}
schedulMap.put("schedulingResultsMap",resultMap);
log.info("SchedulingResults : [{}]",resultMap);
return schedulMap;
} }
@ -217,6 +57,7 @@ public class UtilServiceImpl extends Service implements UtilService {
commandExecutor.execute(new RecordDataCmd(params)); commandExecutor.execute(new RecordDataCmd(params));
} }
@Override @Override
public Map<String, Object> getNeedRecordClockInTime(List<ClockPointDTO> clcokInTimeData) { public Map<String, Object> getNeedRecordClockInTime(List<ClockPointDTO> clcokInTimeData) {
Map<String, Object> resultMap = Maps.newHashMap(); Map<String, Object> resultMap = Maps.newHashMap();
@ -224,6 +65,9 @@ public class UtilServiceImpl extends Service implements UtilService {
int outIndex = 1; int outIndex = 1;
int jcCloumns = 8; int jcCloumns = 8;
for (ClockPointDTO clockPointDTO : clcokInTimeData){ for (ClockPointDTO clockPointDTO : clcokInTimeData){
if (!clockPointDTO.isRecord()){
continue;
}
//当天打卡数据 //当天打卡数据
Map<String,Object> clcokInTime = clockPointDTO.getClockTime(); Map<String,Object> clcokInTime = clockPointDTO.getClockTime();
@ -306,9 +150,11 @@ public class UtilServiceImpl extends Service implements UtilService {
@Override @Override
public List<ClockPointDTO> getClockInPointCmd(Map<String,Object> params) { public List<ClockPointDTO> getClockInPointCmd(Map<String,Object> params) {
Map<String,Object> resultMap = commandExecutor.execute(new GetClockInPointCmd(params)); Map<String,Object> resultMap = commandExecutor.execute(new GetClockInPointCmd(params));
// params.putAll(resultMap); params.putAll(resultMap);
// resultMap = commandExecutor.execute(new AdjustByWorkOverTimeCmd(params)); resultMap = commandExecutor.execute(new AdjustByWorkOverTimeCmd(params));
return (List<ClockPointDTO>)resultMap.get("clcokInPointList"); List<ClockPointDTO> clcokInPointList = (List<ClockPointDTO>)resultMap.get("clcokInPointList");
clcokInPointList = clcokInPointList.stream().sorted(Comparator.comparing(e->DateUtil.getTime(e.getClassTime()).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
return clcokInPointList;
} }
/** /**

@ -46,11 +46,15 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
List<Map<String,Object>> offsetEvectionAnomaly = (List<Map<String,Object>>)params.get("offsetEvectionAnomaly"); List<Map<String,Object>> offsetEvectionAnomaly = (List<Map<String,Object>>)params.get("offsetEvectionAnomaly");
//经过请假外出处理过的异常项目 //经过请假外出处理过的异常项目
List<Map<String,Object>> abnormalClockInList = (List<Map<String,Object>>)params.get("abnormalClockInList"); List<Map<String,Object>> abnormalClockInList = (List<Map<String,Object>>)params.get("abnormalClockInList");
//不需要记录的异常项目
List<Map<String,Object>> notRecordAbnormalClockInList = (List<Map<String,Object>>)params.get("notRecordAbnormalClockInList");
abnormalClockInList.addAll(notRecordAbnormalClockInList);
//总抵消异常 //总抵消异常
List<Map<String,Object>> anomalyList = Lists.newArrayList(); List<Map<String,Object>> anomalyList = Lists.newArrayList();
anomalyList.addAll(offsetEvectionAnomaly); anomalyList.addAll(offsetEvectionAnomaly);
anomalyList.addAll(abnormalClockInList); anomalyList.addAll(offsetAskForLeaveAnomaly);
Map<String,Map<String,Object>> clcokInTimeMap = Maps.newHashMap(); Map<String,Map<String,Object>> clcokInTimeMap = Maps.newHashMap();
@ -95,6 +99,10 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
getWorkOverTimeParam.put("rqlx",scheduleMap.get("rqlx")); getWorkOverTimeParam.put("rqlx",scheduleMap.get("rqlx"));
List<Map<String,Object>> workTimeBeLateItems = Lists.newArrayList(); List<Map<String,Object>> workTimeBeLateItems = Lists.newArrayList();
//开始必须打卡,当为加班计划类型的加班时已考勤项目设置为准
String ksjbbxydk = scheduleMap.get("ksdk").toString();
//结束必须打卡,当为加班计划类型的加班时已考勤项目设置为准
String jsjbbxydk = scheduleMap.get("jsdk").toString();
if (ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey().equals(bdlx)){ if (ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor", WorkForTimeEnum.DELAY_TO_WORK_OVERTIME.getKey()); getWorkOverTimeParam.put("workfor", WorkForTimeEnum.DELAY_TO_WORK_OVERTIME.getKey());
@ -108,6 +116,7 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
}else if (ClassSegmentTypeEnum.OVERTIME_PLAN.getKey().equals(bdlx)){ }else if (ClassSegmentTypeEnum.OVERTIME_PLAN.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor",WorkForTimeEnum.PLAN_WORK_OVERTIME.getKey()); getWorkOverTimeParam.put("workfor",WorkForTimeEnum.PLAN_WORK_OVERTIME.getKey());
workTimeBeLateItems = (List<Map<String,Object>>)scheduleMap.get("jblx"); workTimeBeLateItems = (List<Map<String,Object>>)scheduleMap.get("jblx");
}else if (ClassSegmentTypeEnum.OVERTIME_IN_CLASS.getKey().equals(bdlx)){ }else if (ClassSegmentTypeEnum.OVERTIME_IN_CLASS.getKey().equals(bdlx)){
getWorkOverTimeParam.put("workfor",WorkForTimeEnum.OVERTIME_IN_CLASS.getKey()); getWorkOverTimeParam.put("workfor",WorkForTimeEnum.OVERTIME_IN_CLASS.getKey());
Map<String,Object> result = commandExecutor.execute(new WorkOvertimeItemCmd(getWorkOverTimeParam)); Map<String,Object> result = commandExecutor.execute(new WorkOvertimeItemCmd(getWorkOverTimeParam));
@ -122,10 +131,7 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
double jbsc = Double.valueOf(Util.null2String(scheduleMap.get("edxss"))); double jbsc = Double.valueOf(Util.null2String(scheduleMap.get("edxss")));
//开始加班必须打卡
String ksjbbxydk = Util.null2String(workTimeBeLateItems.get(0).get("ksjbbxydk"));
//结束加班必须打卡
String jsjbbxydk = Util.null2String(workTimeBeLateItems.get(0).get("jsjbbxydk"));
//提前打卡开始的时长计入加班 //提前打卡开始的时长计入加班
String tqdkjrjb = Util.null2String(workTimeBeLateItems.get(0).get("tqdkjrjb")); String tqdkjrjb = Util.null2String(workTimeBeLateItems.get(0).get("tqdkjrjb"));
//推后打卡结束的时长计入加班 //推后打卡结束的时长计入加班
@ -299,11 +305,16 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
int evectionTime = removeEvection(realityStartTime,realityEndime,Util.null2String(getWorkOverTimeParam.get("workfor")) int evectionTime = removeEvection(realityStartTime,realityEndime,Util.null2String(getWorkOverTimeParam.get("workfor"))
,bdlx,evectionList,evectionItems,offsetEvectionAnomaly); ,bdlx,evectionList,evectionItems,offsetEvectionAnomaly);
log.info("加班时长: {}",jbsc); /**
log.info("beLateTime :[{}],leaveElaryTime :[{}],askForLeaveTime:[{}],evectionTime:[{}]",beLateTime,leaveElaryTime,askForLeaveTime,evectionTime); *
*/
int dinnerTime = Utils.dinnerTime(realityStartTime,realityEndime,scheduleResult,analysisDate);
log.info("未扣减过的加班时长: {}",jbsc);
log.info("beLateTime :[{}],leaveElaryTime :[{}],askForLeaveTime:[{}],evectionTime:[{}],dinnerTime:[{}]",beLateTime,leaveElaryTime,askForLeaveTime,evectionTime,dinnerTime);
BigDecimal jbscbig = new BigDecimal(jbsc); BigDecimal jbscbig = new BigDecimal(jbsc);
jbsc = jbscbig.subtract(new BigDecimal(beLateTime)).subtract(new BigDecimal(leaveElaryTime)).subtract(new BigDecimal(askForLeaveTime)).subtract(new BigDecimal(evectionTime)).intValue(); jbsc = jbscbig.subtract(new BigDecimal(beLateTime)).subtract(new BigDecimal(leaveElaryTime)).subtract(new BigDecimal(askForLeaveTime)).subtract(new BigDecimal(evectionTime)).subtract(new BigDecimal(dinnerTime)).intValue();
log.info("jbsc :[{}]",jbsc); log.info("最终加班时长 :[{}]",jbsc);
if (!"".equals(jbqsfzs)){ if (!"".equals(jbqsfzs)){
if (jbsc < Integer.valueOf(jbqsfzs)){ if (jbsc < Integer.valueOf(jbqsfzs)){
//小于最小加班分钟数不算加班 //小于最小加班分钟数不算加班
@ -529,9 +540,9 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
Map<String,Object> askForLeaveItem = askForLeaveItems.get(askForLeaveList.get(i).get("jqlx")); Map<String,Object> askForLeaveItem = askForLeaveItems.get(askForLeaveList.get(i).get("jqlx"));
//作用时段 //作用时段
String zysd = Util.null2String(askForLeaveItem.get("zysd")); String zysd = Util.null2String(askForLeaveItem.get("zysd"));
if (!zysd.contains(workFor) && !zysd.contains(WorkForTimeEnum.ALL_TIME.getKey())){ // if (!zysd.contains(workFor) && !zysd.contains(WorkForTimeEnum.ALL_TIME.getKey())){
continue; // continue;
} // }
if ("".equals(Util.null2String(askForLeaveList.get(i).get("kssj"))) || "".equals(Util.null2String(askForLeaveList.get(i).get("jssj")))){ if ("".equals(Util.null2String(askForLeaveList.get(i).get("kssj"))) || "".equals(Util.null2String(askForLeaveList.get(i).get("jssj")))){
if (!"".equals(qjsc)){ if (!"".equals(qjsc)){
//时长请假 //时长请假
@ -565,9 +576,9 @@ public class WorkOverTimeServiceImpl extends Service implements WorkOverTimeServ
Map<String,Object> evectionItem = evectionItems.get(evectionList.get(i).get("cclx")); Map<String,Object> evectionItem = evectionItems.get(evectionList.get(i).get("cclx"));
//作用时段 //作用时段
String zysd = Util.null2String(evectionItem.get("zysd")); String zysd = Util.null2String(evectionItem.get("zysd"));
if (!zysd.contains(workFor) && !WorkForTimeEnum.ALL_TIME.getKey().equals(zysd)){ // if (!zysd.contains(workFor) && !WorkForTimeEnum.ALL_TIME.getKey().equals(zysd)){
continue; // continue;
} // }
if ("".equals(Util.null2String(evectionList.get(i).get("kssj"))) || "".equals(Util.null2String(evectionList.get(i).get("jssj")))){ if ("".equals(Util.null2String(evectionList.get(i).get("kssj"))) || "".equals(Util.null2String(evectionList.get(i).get("jssj")))){
if (!"".equals(qjsc)){ if (!"".equals(qjsc)){

@ -43,9 +43,9 @@ public class AttendanceanalysisAction {
try { try {
Map<String,Object> paramMap = ParamUtil.request2Map(request); Map<String,Object> paramMap = ParamUtil.request2Map(request);
// Map<String,Object> paramMap = Maps.newHashMap(); // Map<String,Object> paramMap = Maps.newHashMap();
// paramMap.put("startDate","2024-05-12"); // paramMap.put("startDate","2024-05-02");
// paramMap.put("endDate","2024-05-12"); // paramMap.put("endDate","2024-05-02");
// paramMap.put("userIds","23"); // paramMap.put("userIds","81");
String startDate = Util.null2String(paramMap.get("startDate")); String startDate = Util.null2String(paramMap.get("startDate"));

@ -5,6 +5,7 @@ import com.engine.attendance.attendanceanalysis.service.ComprehensiveWorkingHour
import com.engine.attendance.attendanceanalysis.service.UtilService; import com.engine.attendance.attendanceanalysis.service.UtilService;
import com.engine.attendance.attendanceanalysis.service.impl.ComprehensiveWorkingHourServiceImpl; import com.engine.attendance.attendanceanalysis.service.impl.ComprehensiveWorkingHourServiceImpl;
import com.engine.attendance.attendanceanalysis.service.impl.UtilServiceImpl; import com.engine.attendance.attendanceanalysis.service.impl.UtilServiceImpl;
import com.engine.attendance.enums.AttendanceItemTypeEnum;
import com.engine.attendance.enums.CheckBoxEnum; import com.engine.attendance.enums.CheckBoxEnum;
import com.engine.common.util.CommonUtil; import com.engine.common.util.CommonUtil;
import com.engine.common.util.DateUtil; import com.engine.common.util.DateUtil;
@ -238,11 +239,15 @@ public class AttendanceAnalysisWrapper extends Service {
recordAbnormalParam.put("evectionItems",evectionDataMap.get("evectionItems")); recordAbnormalParam.put("evectionItems",evectionDataMap.get("evectionItems"));
List<Map<String,Object>> abnormalClockInList = updateAttendanceResultWrapper.recordAbnormalClockIn(recordAbnormalParam); List<Map<String,Object>> abnormalClockInList = updateAttendanceResultWrapper.recordAbnormalClockIn(recordAbnormalParam);
//需要记录的异常卡点
List<Map<String,Object>> needRecordAbnormalClockInList = abnormalClockInList.stream().filter(e-> (boolean)e.get("record")).collect(Collectors.toList());
//不需要记录的异常卡点
List<Map<String,Object>> notRecordAbnormalClockInList = abnormalClockInList.stream().filter(e-> !(boolean)e.get("record")).collect(Collectors.toList());
/** /**
* *
*/ */
recordAbnormalParam.put("abnormalClockInList",abnormalClockInList); recordAbnormalParam.put("abnormalClockInList",needRecordAbnormalClockInList);
recordAbnormalParam.put("notRecordAbnormalClockInList",notRecordAbnormalClockInList);
String ifnotWork = Util.null2String(allowanceMap.get("ifnotWork")); String ifnotWork = Util.null2String(allowanceMap.get("ifnotWork"));
if (!"".equals(ifnotWork)){ if (!"".equals(ifnotWork)){
//次日免班 //次日免班
@ -275,6 +280,7 @@ public class AttendanceAnalysisWrapper extends Service {
Map<String, Object> recordEvection= updateAttendanceResultWrapper.recordEvection(recordAbnormalParam); Map<String, Object> recordEvection= updateAttendanceResultWrapper.recordEvection(recordAbnormalParam);
List<Map<String,Object>> abnormalClockInListByEvction = (List<Map<String,Object>>)recordEvection.get("abnormalClockInList"); List<Map<String,Object>> abnormalClockInListByEvction = (List<Map<String,Object>>)recordEvection.get("abnormalClockInList");
List<Map<String,Object>> evectionResultList = (List<Map<String,Object>>)recordEvection.get("resultList"); List<Map<String,Object>> evectionResultList = (List<Map<String,Object>>)recordEvection.get("resultList");
recordAbnormalParam.put("abnormalClockInList",abnormalClockInListByEvction); recordAbnormalParam.put("abnormalClockInList",abnormalClockInListByEvction);
recordAbnormalParam.put("offsetEvectionAnomaly",recordEvection.get("offsetEvectionAnomaly")); recordAbnormalParam.put("offsetEvectionAnomaly",recordEvection.get("offsetEvectionAnomaly"));
log.info("出差外出后消除的异常 : [{}]",recordEvection.get("offsetEvectionAnomaly")); log.info("出差外出后消除的异常 : [{}]",recordEvection.get("offsetEvectionAnomaly"));
@ -296,6 +302,7 @@ public class AttendanceAnalysisWrapper extends Service {
List<Map<String,Object>> recordData = Lists.newArrayList(); List<Map<String,Object>> recordData = Lists.newArrayList();
recordData.addAll(vactionList); recordData.addAll(vactionList);
recordData.addAll(evectionResultList); recordData.addAll(evectionResultList);
abnormalClockInListByEvction = abnormalClockInListByEvction.stream().filter(e-> (boolean)e.get("record")).collect(Collectors.toList());
recordData.addAll(abnormalClockInListByEvction); recordData.addAll(abnormalClockInListByEvction);
recordData.addAll(recordWorkOverTime); recordData.addAll(recordWorkOverTime);
recordParam.put("recordData",recordData); recordParam.put("recordData",recordData);

@ -102,6 +102,7 @@ public class UpdateAttendanceResultWrapper extends Service {
if (iforgetClockIn.size() >0){ if (iforgetClockIn.size() >0){
iforgetClockIn.get(0).put("pointTime",pointTime); iforgetClockIn.get(0).put("pointTime",pointTime);
iforgetClockIn.get(0).put("bdlx",classInfo.get("bdlx")); iforgetClockIn.get(0).put("bdlx",classInfo.get("bdlx"));
iforgetClockIn.get(0).put("record",clcokInTimedto.isRecord());
resultList.add(iforgetClockIn.get(0)); resultList.add(iforgetClockIn.get(0));
} }
@ -124,6 +125,7 @@ public class UpdateAttendanceResultWrapper extends Service {
if (ifBeLate.size() > 0){ if (ifBeLate.size() > 0){
ifBeLate.get(0).put("pointTime",pointTime); ifBeLate.get(0).put("pointTime",pointTime);
ifBeLate.get(0).put("bdlx",classInfo.get("bdlx")); ifBeLate.get(0).put("bdlx",classInfo.get("bdlx"));
ifBeLate.get(0).put("record",clcokInTimedto.isRecord());
resultList.add(ifBeLate.get(0)); resultList.add(ifBeLate.get(0));
} }
}else if (ClockPointEnum.END.equals(pointType) && ClockPointEnum.BEFORE.equals(timeType)){ }else if (ClockPointEnum.END.equals(pointType) && ClockPointEnum.BEFORE.equals(timeType)){
@ -145,6 +147,7 @@ public class UpdateAttendanceResultWrapper extends Service {
if (ifLeaveEarly.size() > 0){ if (ifLeaveEarly.size() > 0){
ifLeaveEarly.get(0).put("pointTime",pointTime); ifLeaveEarly.get(0).put("pointTime",pointTime);
ifLeaveEarly.get(0).put("bdlx",classInfo.get("bdlx")); ifLeaveEarly.get(0).put("bdlx",classInfo.get("bdlx"));
ifLeaveEarly.get(0).put("record",clcokInTimedto.isRecord());
resultList.add(ifLeaveEarly.get(0)); resultList.add(ifLeaveEarly.get(0));
} }
} }

@ -379,7 +379,20 @@ public class Utils<T> {
public static int removeRestTime(String kssj,String jssj,List<Map<String, Object>> scheduleResult,String analysisDate){ public static int removeRestTime(String kssj,String jssj,List<Map<String, Object>> scheduleResult,String analysisDate){
scheduleResult = scheduleResult.stream().filter(e -> ClassSegmentTypeEnum.REST_AND_DINE.getKey().equals(e.get("bdlx")) || scheduleResult = scheduleResult.stream().filter(e -> ClassSegmentTypeEnum.REST_AND_DINE.getKey().equals(e.get("bdlx")) ||
ClassSegmentTypeEnum.REST_PERIOD.getKey().equals(e.get("bdlx")) || ClassSegmentTypeEnum.DINING_PERIOD.getKey().equals(e.get("bdlx"))).collect(Collectors.toList()); ClassSegmentTypeEnum.REST_PERIOD.getKey().equals(e.get("bdlx")) || ClassSegmentTypeEnum.DINING_PERIOD.getKey().equals(e.get("bdlx"))).collect(Collectors.toList());
int betweenMinutes = DateUtil.getBetWeenMinutes(kssj,jssj); int betweenMinutes = DateUtil.getBetWeenMinutes(kssj,jssj)-removeTime(kssj,jssj,scheduleResult,analysisDate);
return betweenMinutes;
}
/**
*
* @param kssj
* @param jssj
* @param scheduleResult
* @param analysisDate
* @return
*/
public static int removeTime(String kssj,String jssj,List<Map<String, Object>> scheduleResult,String analysisDate){
int betweenMinutes = 0;
log.info("removeRestTime scheduleResult : {}",scheduleResult); log.info("removeRestTime scheduleResult : {}",scheduleResult);
for (Map<String, Object> restSchedule :scheduleResult){ for (Map<String, Object> restSchedule :scheduleResult){
String dtkssj = Utils.getkssjTime(restSchedule,analysisDate); String dtkssj = Utils.getkssjTime(restSchedule,analysisDate);
@ -387,15 +400,15 @@ public class Utils<T> {
if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) >=0){ if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) >=0){
//休息时间在请假时间中间 //休息时间在请假时间中间
betweenMinutes = betweenMinutes - DateUtil.getBetWeenMinutes(dtkssj,dtjssj); betweenMinutes = DateUtil.getBetWeenMinutes(dtkssj,dtjssj);
log.info("休息时间在请假时间中间"); log.info("休息时间在请假时间中间");
}else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtkssj)) >=0){ }else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) <=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtkssj)) >=0){
//休息时间在请假时间 右边 //休息时间在请假时间 右边
betweenMinutes = betweenMinutes - DateUtil.getBetWeenMinutes(dtkssj,jssj); betweenMinutes = DateUtil.getBetWeenMinutes(dtkssj,jssj);
log.info("休息时间在请假时间 右边"); log.info("休息时间在请假时间 右边");
}else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) >=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) >=0 && DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtjssj)) <=0){ }else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) >=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) >=0 && DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtjssj)) <=0){
//休息时间在请假时间 左边 //休息时间在请假时间 左边
betweenMinutes = betweenMinutes - DateUtil.getBetWeenMinutes(kssj,dtjssj); betweenMinutes = DateUtil.getBetWeenMinutes(kssj,dtjssj);
log.info("休息时间在请假时间 左边"); log.info("休息时间在请假时间 左边");
}else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) >=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) <=0){ }else if (DateUtil.getTime(kssj).compareTo(DateUtil.getTime(dtkssj)) >=0 && DateUtil.getTime(jssj).compareTo(DateUtil.getTime(dtjssj)) <=0){
//请假时间在休息时间中间 //请假时间在休息时间中间
@ -403,11 +416,22 @@ public class Utils<T> {
log.info("请假时间在休息时间中间"); log.info("请假时间在休息时间中间");
} }
} }
return betweenMinutes; return betweenMinutes;
} }
/**
*
* @param kssj
* @param jssj
* @param scheduleResult
* @return
*/
public static int dinnerTime(String kssj,String jssj,List<Map<String, Object>> scheduleResult,String analysisDate){
scheduleResult = scheduleResult.stream().filter(e ->ClassSegmentTypeEnum.DINING_PERIOD.getKey().equals(e.get("bdlx"))).collect(Collectors.toList());
int dinnerTime = removeTime(kssj,jssj,scheduleResult,analysisDate);
return dinnerTime;
}
/** /**
* *
* @return * @return
@ -645,6 +669,12 @@ public class Utils<T> {
return time; return time;
} }
/**
*
* @param schedulingMap
* @param date
* @return
*/
public static String getkssjEarliestTime(Map<String,Object> schedulingMap,String date){ public static String getkssjEarliestTime(Map<String,Object> schedulingMap,String date){
String tqdkfzs = Util.null2String(schedulingMap.get("tqdkfzs")); String tqdkfzs = Util.null2String(schedulingMap.get("tqdkfzs"));
if ("".equals(tqdkfzs)){ if ("".equals(tqdkfzs)){
@ -652,6 +682,13 @@ public class Utils<T> {
} }
return DateUtil.beforeMinutes(getkssjTime(schedulingMap,date),Integer.valueOf(tqdkfzs)); return DateUtil.beforeMinutes(getkssjTime(schedulingMap,date),Integer.valueOf(tqdkfzs));
} }
/**
*
* @param schedulingMap
* @param date
* @return
*/
public static String getkssjTime(Map<String,Object> schedulingMap,String date){ public static String getkssjTime(Map<String,Object> schedulingMap,String date){
String gsrq = Util.null2String(schedulingMap.get("gsrq")); String gsrq = Util.null2String(schedulingMap.get("gsrq"));
String kssj = Util.null2String(schedulingMap.get("dtkssj")); String kssj = Util.null2String(schedulingMap.get("dtkssj"));
@ -664,6 +701,12 @@ public class Utils<T> {
return kssj; return kssj;
} }
/**
* 退
* @param schedulingMap
* @param date
* @return
*/
public static String getjssjLastestTime(Map<String,Object> schedulingMap,String date){ public static String getjssjLastestTime(Map<String,Object> schedulingMap,String date){
String thdkfzs = Util.null2String(schedulingMap.get("thdkfzs")); String thdkfzs = Util.null2String(schedulingMap.get("thdkfzs"));
@ -673,7 +716,12 @@ public class Utils<T> {
return DateUtil.AfterMinutes(getjssjTime(schedulingMap,date),Integer.valueOf(thdkfzs)); return DateUtil.AfterMinutes(getjssjTime(schedulingMap,date),Integer.valueOf(thdkfzs));
} }
/**
*
* @param schedulingMap
* @param date
* @return
*/
public static String getjssjTime(Map<String,Object> schedulingMap,String date){ public static String getjssjTime(Map<String,Object> schedulingMap,String date){
String gsrq = Util.null2String(schedulingMap.get("gsrq")); String gsrq = Util.null2String(schedulingMap.get("gsrq"));
String jssj = Util.null2String(schedulingMap.get("dtjssj")); String jssj = Util.null2String(schedulingMap.get("dtjssj"));
@ -691,4 +739,31 @@ public class Utils<T> {
return jssj; return jssj;
} }
/**
*
* @param classSegmentType
* @return
*/
public static boolean ifOverTimeClassSegment(String classSegmentType){
if (classSegmentType.equals(ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.EARLY_OVERTIME.getKey())
|| classSegmentType.equals(ClassSegmentTypeEnum.OVERTIME_IN_CLASS.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.OVERTIME_PLAN.getKey())){
return true;
}else {
return false;
}
}
/**
*
* @param classSegmentType
* @return
*/
public static boolean ifRestClassSegment(String classSegmentType){
if (classSegmentType.equals(ClassSegmentTypeEnum.REST_AND_DINE.getKey()) || classSegmentType.equals(ClassSegmentTypeEnum.REST_PERIOD.getKey())
|| classSegmentType.equals(ClassSegmentTypeEnum.DINING_PERIOD.getKey())){
return true;
}else {
return false;
}
}
} }

@ -14,8 +14,8 @@ Test extends beforlog{
@org.junit.Test @org.junit.Test
public void testAnalysis() throws Exception{ public void testAnalysis() throws Exception{
Map<String,Object> paramMap = Maps.newHashMap(); Map<String,Object> paramMap = Maps.newHashMap();
paramMap.put("startDate","2024-04-10"); paramMap.put("startDate","2024-04-15");
paramMap.put("endDate","2024-04-10"); paramMap.put("endDate","2024-04-15");
paramMap.put("userIds","81"); paramMap.put("userIds","81");
beforlog be = new beforlog(); beforlog be = new beforlog();

@ -0,0 +1,18 @@
package TestAttendanceAllowance;
import com.engine.attendance.attendanceanalysis.dto.ClockPointDTO;
import com.engine.attendance.attendanceanalysis.web.AttendanceanalysisAction;
import com.engine.attendance.enums.ClockPointEnum;
import com.google.common.collect.Maps;
import java.util.Map;
public class Test2 {
@org.junit.Test
public void testAnalysis() throws Exception{
ClockPointDTO clockPointDTO = ClockPointDTO.builder().build();
clockPointDTO.setRecord(true);
System.out.println(clockPointDTO.isRecord());
}
}
Loading…
Cancel
Save