zm_dev
liuliang 11 months ago
parent 28061f710c
commit ad5de70136

@ -1 +1 @@
аyГ~цЭ|дй~Й~хд|И}фЛ~ш}Т~М|юй~с}С}юЯ}У}Ь~к~Х}Н~г}ЭЖ|б}О}ЪрqчhаjЖkЛjВhТjгiлjфkзiУhЭlЩkуoжpжxЯuЭtЧvВvтwЛvа{иxяyТxЙvЮxЦvБyиxрzпwЧvзxаЫЧшСжМЧСъмЖСЪзнНШзЭдДоЩЪДвкдЩРыщчАяПЬэяЮчцПГЗУЪлощбЭхдЪтзЖТНБУщПсЩлэррЦькмИпЙПРжпАлиШФмюмШдшжиИЖъВнлОЙНиwбsСsЪvцsЕwаtПsщyАlГtДoфsшqлlЬqЦpЗrКlыsЖsвuрsХmхoьqЛrщlйjНZК\т^Й\ФZоVфZХXШ\РVИhбwчxкzБyп{Шzб|ш{оxОxЙ|фzд|яwи{ЗvБyК|ЦVеZюUаYфSТYхXе\цXэaцcвeщ_ЮWхWц^бTмRюTЫTПZсWж[ъTЕ]ы[ЪWТRДWгVоZГZЧUЮYСQсXЮWБYЦ[кZшgО~В~ыzю~л{РzвyК{Бxи~ц|М{ъ~тж|Ф}к~н}ычaчdВ]вhп]вaь^ГaК`гaй^ж_Ш]С]И]в^Т^в^и]Т]Х`ЯkКgшgюgЩgюhШcТ]жWЬkшiцqжhЧoяLбLшLюMБMГMКMКMНMсNХMКMНMГMХMЙMНMФMХMЯKДKЕKЙKюKаJцJЪJЕKЦKБKоLшKФKГKГKЕKИKЕKЕKИJюJФJсKЕKИKФKЕKФKДKГKГKпLДKЕKшKжJаJХJДKЕKХKЦKоLЦKДKЦKИKГKФKЕKюKдJЧIсKБKЦKХKГKЕKДKГKЕKГKрLФKГKКJЪIсJтKЕKФKГKДKоLФKФKФKДKЙKДKвKшJюJФJЧKДKДKДKДK
<EFBFBD><EFBFBD>Y<EFBFBD>Y<EFBFBD>Y<EFBFBD>r<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>~<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

@ -18,15 +18,31 @@
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/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/getclockInpoint/GetClockInPointCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java" 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/service/impl/AbnormalAttendanceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/service/impl/AbnormalAttendanceServiceImpl.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$/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/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/service/impl/AttendanceSummaryServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/attendanceanalysis/service/impl/AttendanceSummaryServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/DbTools.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/DbTools.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/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/common/util/CommonUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/util/CommonUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$2.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$2.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$3.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$3.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$4.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$4.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$5.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$5.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$6.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$6.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$7.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl$7.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/calendarscheduling/web/WorkRulesController.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/attendance/component/persongroup/commonutil/PersongroupCommonUtil.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/engine/common/util/DbTools.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/engine/common/util/DbTools.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/calendarscheduling/Test1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/calendarscheduling/Test1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/test-classes/vocation/Test1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/vocation/Test1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/calendarscheduling/Test1.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/calendarscheduling/Test1.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/vocation/Test1.java" beforeDir="false" afterPath="$PROJECT_DIR$/test/vocation/Test1.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -70,12 +86,12 @@
<property name="WebServerToolWindowFactoryState" value="false" />
<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_opened_file_path" value="$PROJECT_DIR$" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../easyentry" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Artifacts" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.15287958" />
<property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
<property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" />
</component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
@ -104,7 +120,7 @@
<command value="organzationList" />
</option>
</component>
<component name="RunManager" selected="JUnit.Test.testAnalysis">
<component name="RunManager" selected="JUnit.TestgetDepartSchedule.test2">
<configuration name="TestObj" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="TestObj" />
<module name="hrm-attendance" />
@ -119,58 +135,58 @@
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Test1.test1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<configuration name="Test1.test3 (1)" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="workflow.*" />
<option name="PATTERN" value="vocation.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="vocation" />
<option name="MAIN_CLASS_NAME" value="vocation.Test1" />
<option name="METHOD_NAME" value="test1" />
<option name="METHOD_NAME" value="test3" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Test1.test2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<configuration name="Test1.test3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="vocation.*" />
<option name="PATTERN" value="calendarscheduling.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="vocation" />
<option name="MAIN_CLASS_NAME" value="vocation.Test1" />
<option name="METHOD_NAME" value="test2" />
<option name="PACKAGE_NAME" value="calendarscheduling" />
<option name="MAIN_CLASS_NAME" value="calendarscheduling.Test1" />
<option name="METHOD_NAME" value="test3" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Test1.test3 (1)" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<configuration name="Test.testAnalysis" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="vocation.*" />
<option name="PATTERN" value="TestAttendanceAllowance.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="vocation" />
<option name="MAIN_CLASS_NAME" value="vocation.Test1" />
<option name="METHOD_NAME" value="test3" />
<option name="PACKAGE_NAME" value="TestAttendanceAllowance" />
<option name="MAIN_CLASS_NAME" value="TestAttendanceAllowance.Test" />
<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.testJob" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<module name="hrm-attendance" />
<shortenClasspath name="MANIFEST" />
<extension name="coverage">
@ -181,24 +197,24 @@
</extension>
<option name="PACKAGE_NAME" value="TestAttendanceAllowance" />
<option name="MAIN_CLASS_NAME" value="TestAttendanceAllowance.Test" />
<option name="METHOD_NAME" value="testAnalysis" />
<option name="METHOD_NAME" value="testJob" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Test.testJob" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
<configuration name="TestgetDepartSchedule.test2" 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="PATTERN" value="calendarscheduling.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<option name="PACKAGE_NAME" value="TestAttendanceAllowance" />
<option name="MAIN_CLASS_NAME" value="TestAttendanceAllowance.Test" />
<option name="METHOD_NAME" value="testJob" />
<option name="PACKAGE_NAME" value="calendarscheduling" />
<option name="MAIN_CLASS_NAME" value="calendarscheduling.TestgetDepartSchedule" />
<option name="METHOD_NAME" value="test2" />
<option name="TEST_OBJECT" value="method" />
<method v="2">
<option name="Make" enabled="true" />
@ -213,11 +229,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="JUnit.Test.testAnalysis" />
<item itemvalue="JUnit.TestgetDepartSchedule.test2" />
<item itemvalue="JUnit.Test1.test3 (1)" />
<item itemvalue="JUnit.Test.testAnalysis" />
<item itemvalue="JUnit.Test1.test3" />
<item itemvalue="JUnit.Test.testJob" />
<item itemvalue="JUnit.Test1.test2" />
<item itemvalue="JUnit.Test1.test1" />
</list>
</recent_temporary>
</component>
@ -669,7 +685,8 @@
<workItem from="1717577182099" duration="10185000" />
<workItem from="1717589991214" duration="2702000" />
<workItem from="1717638933204" duration="5993000" />
<workItem from="1717651863418" duration="1777000" />
<workItem from="1717651863418" duration="15566000" />
<workItem from="1717724528067" duration="11539000" />
</task>
<servers />
</component>
@ -720,7 +737,7 @@
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/test/calendarscheduling/TestgetDepartSchedule.java</url>
<line>27</line>
<line>29</line>
<option name="timeStamp" value="122" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
@ -734,19 +751,24 @@
<option name="timeStamp" value="155" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java</url>
<line>41</line>
<option name="timeStamp" value="156" />
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/wrapper/UpdateAttendanceResultWrapper.java</url>
<line>38</line>
<option name="timeStamp" value="161" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/ComputeAttendanceDurationCmd.java</url>
<line>65</line>
<option name="timeStamp" value="162" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java</url>
<line>576</line>
<option name="timeStamp" value="157" />
<url>file://$PROJECT_DIR$/src/com/engine/attendance/component/calendarscheduling/service/impl/WorkRulesServiceImpl.java</url>
<line>86</line>
<option name="timeStamp" value="163" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/com/engine/attendance/attendanceanalysis/cmd/getclockInpoint/GetClockInPointCmd.java</url>
<line>587</line>
<option name="timeStamp" value="158" />
<url>file://$PROJECT_DIR$/src/com/engine/common/util/Utils.java</url>
<line>576</line>
<option name="timeStamp" value="165" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -47,6 +47,8 @@ public class ComputeAttendanceDurationCmd extends AbstractCommonCommand<Map<Stri
List<Map<String,Object>> offsetEvectionAnomaly = (List<Map<String,Object>>)params.get("offsetEvectionAnomaly");
//分析日期
String analysisDate = Util.null2String(params.get("analysisDate"));
//考勤项目
List<Map<String,Object>> attendanceItems = (List<Map<String,Object>>)params.get("attendanceItems");
//经过请假外出处理过的异常项目
List<Map<String,Object>> abnormalClockInList = (List<Map<String,Object>>)params.get("abnormalClockInList");
@ -63,9 +65,10 @@ public class ComputeAttendanceDurationCmd extends AbstractCommonCommand<Map<Stri
abnormalClockInList = abnormalClockInList.stream().filter(e->e.get("bdlx").equals(ClassSegmentTypeEnum.WORK_TIME.getKey())).collect(Collectors.toList());
double abnormalTime = 0;
for (Map<String,Object> abnormalClockInMap : abnormalClockInList){
String hsdw = Util.null2String(abnormalClockInMap.get("hsdw"));
double itemduration = Double.valueOf(Util.null2String(abnormalClockInMap.get("itemduration")));
int betweenMinutes = Integer.valueOf(Util.null2String(abnormalClockInMap.get("betweenMinutes")));
AttendanceItemTypeEnum itemType = (AttendanceItemTypeEnum)abnormalClockInMap.get("itemType");
String item = Util.null2String(abnormalClockInMap.get("item"));
String kczgsc = Util.null2String(abnormalClockInMap.get("kczgsc"));
if (itemType == AttendanceItemTypeEnum.MISSE_CARD){
//早上漏卡
@ -74,14 +77,20 @@ public class ComputeAttendanceDurationCmd extends AbstractCommonCommand<Map<Stri
if (!CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
continue;
}
if (AccountingUnitEnum.DAY.getKey().equals(hsdw)){
abnormalTime = abnormalTime + edsc*Double.valueOf(itemduration)*60;
}else if (AccountingUnitEnum.HOUR.getKey().equals(hsdw)){
abnormalTime = abnormalTime+Double.valueOf(itemduration)*60;
}else if (AccountingUnitEnum.MINUTES.getKey().equals(hsdw)){
abnormalTime = abnormalTime+Double.valueOf(itemduration);
List<Map<String,Object>> abnormalItemList = attendanceItems.stream().filter(e->e.get("key").equals(item)).collect(Collectors.toList());
if (abnormalItemList.size() > 0){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(abnormalItemList.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(abnormalItemList.get(0).get("cckcbc")));
if (betweenMinutes <= qbkcsc){
betweenMinutes = qbkcsc;
}else {
int deductionDuration = betweenMinutes-qbkcsc;
betweenMinutes = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
abnormalTime = abnormalTime+betweenMinutes;
}
/**
*

@ -87,19 +87,7 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
double hsl = Double.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("hsl")));
String hsdw = Util.null2String(workTimeBeLateItems.get(0).get("hsdw"));
String kczgsc = Util.null2String(workTimeBeLateItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
saveWorkTimeBeLateParam.put("item",workTimeBeLateItems.get(0).get("key"));
saveWorkTimeBeLateParam.put("itemduration",itemduration);
@ -142,19 +130,6 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
if (!"".equals(jbwdhlfzs) && between > Integer.valueOf(jbwdhlfzs)){
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
String kczgsc = Util.null2String(lateItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(lateItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(lateItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
saveWorkTimeBeLateParam.put("item",lateItems.get(0).get("key"));
saveWorkTimeBeLateParam.put("itemduration",itemduration);
@ -189,19 +164,6 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
String thfghlfzs = Util.null2String(beAwayItems.get(0).get("thfghlfzs"));
if (!"".equals(thfghlfzs) && between> Integer.valueOf(thfghlfzs)){
String kczgsc = Util.null2String(lateItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(lateItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(lateItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
saveWorkTimeBeLateParam.put("item",lateItems.get(0).get("key"));
@ -284,23 +246,7 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
double hsl = Double.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("hsl")));
String hsdw = Util.null2String(workTimeBeLateItems.get(0).get("hsdw"));
String kczgsc = Util.null2String(workTimeBeLateItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(workTimeBeLateItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
// saveWorkTimeBeLateParam.put("userId",userId);
// saveWorkTimeBeLateParam.put("date",analysisDate);
saveWorkTimeBeLateParam.put("item",workTimeBeLateItems.get(0).get("key"));
saveWorkTimeBeLateParam.put("itemduration",itemduration);
saveWorkTimeBeLateParam.put("betweenMinutes",between);
@ -337,22 +283,9 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
double hsl = Double.valueOf(Util.null2String(beEarlyItems.get(0).get("hsl")));
if (!"".equals(jbzzhlfzs) && between > Integer.valueOf(jbzzhlfzs)){
log.info("between :{},jbzzhlfzs:{}",between,jbzzhlfzs);
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
String kczgsc = Util.null2String(beEarlyItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(beEarlyItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(beEarlyItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
saveWorkTimeBeLateParam.put("item",beEarlyItems.get(0).get("key"));
saveWorkTimeBeLateParam.put("itemduration",itemduration);
saveWorkTimeBeLateParam.put("betweenMinutes",between);
@ -386,19 +319,6 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
String tqlghlfzs = Util.null2String(beAwayItems.get(0).get("tqlghlfzs"));
if (!"".equals(tqlghlfzs) && between> Integer.valueOf(tqlghlfzs) && beEarlyItems.size()>0){
String kczgsc = Util.null2String(beEarlyItems.get(0).get("kczgsc"));
if (CheckBoxEnum.CHECKED.getKey().equals(kczgsc)){
//起步扣除分钟数
int qbkcsc = Integer.valueOf(Util.null2String(beEarlyItems.get(0).get("qbkcsc")));
//超出后单次累加扣除分钟数
int cckcbc = Integer.valueOf(Util.null2String(beEarlyItems.get(0).get("cckcbc")));
if (between <= qbkcsc){
between = qbkcsc;
}else {
int deductionDuration = between-qbkcsc;
between = Double.valueOf(Utils.getItemduration(cckcbc,AccountingUnitEnum.MINUTES.getKey(),deductionDuration,AccountingUnitEnum.MINUTES)).intValue()+qbkcsc;
}
}
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();

@ -15,6 +15,7 @@ import weaver.general.Util;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@ -36,16 +37,16 @@ public class AttendanceanalysisAction {
*
* @return
*/
@POST
@GET
@Path("/attendanceAnalysisByHrmAndDate")
@Produces({"text/plain"})
public String getSchedulingData(@Context HttpServletRequest request, @Context HttpServletResponse response) {
try {
// Map<String,Object> paramMap = ParamUtil.request2Map(request);
Map<String,Object> paramMap = Maps.newHashMap();
paramMap.put("startDate","2024-06-03");
paramMap.put("endDate","2024-06-03");
paramMap.put("userIds","31");
Map<String,Object> paramMap = ParamUtil.request2Map(request);
// Map<String,Object> paramMap = Maps.newHashMap();
// paramMap.put("startDate","2024-06-03");
// paramMap.put("endDate","2024-06-03");
// paramMap.put("userIds","31");
String startDate = Util.null2String(paramMap.get("startDate"));

@ -40,7 +40,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
private Map<String,Object> departMentMap = PersongroupCommonUtil.getDepartMent();
private Map<String,Object> subCompanyMap = PersongroupCommonUtil.getSubCompany();
private Map<String,Object> classesInformationMap = PersongroupCommonUtil.getClassesInformation();
private Map<String,String> classesInformationMap = PersongroupCommonUtil.getClassesAndSimpleNameInformation();
@Override
public Map<String, Object> getWorkRulesList(String resourceIds) {
Map<String, Object> resultMap = new HashMap<>(4);
@ -62,7 +62,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
String fromSql = " from uf_jcl_kq_bcxx t ";
table.setSqlform(fromSql);
String sqlWhere = " where 1=1 and t.id in ("+String.join(",",bcids)+")";
String sqlWhere = " where 1=1 and t.id in ("+String.join(",",bcids)+") or (attendance_organization = '[]' or attendance_organization is null)";
table.setSqlwhere(sqlWhere);
table.setSqlprimarykey("id");
@ -89,18 +89,28 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
int pageindex = Integer.valueOf(Util.null2String(params.get("pageindex")));
String deparmentId = Util.null2String(params.get("deparment"));
String subcompanyId = Util.null2String(params.get("subcompany"));
String employeeIds = Util.null2String(params.get("employeeIds"));
String userId = Util.null2String(user.getUID());
//0:全体人员、1分部、2部门
//0:全体人员、1分部、2部门,3:人员
String type = Util.null2String(params.get("type"));
String conditions ="";
if (type.equals("0")){
conditions = " 1=1 ";
}else if (type.equals("1")){
conditions = " subcompanyid1="+subcompanyId;
}else if (type.equals("2")){
conditions = " departmentid="+deparmentId;
String conditions =" 1=1";
// if (type.equals("0")){
// conditions = " 1=1 ";
// }else if (type.equals("1")){
// conditions = " subcompanyid1="+subcompanyId;
// }else if (type.equals("2")){
// conditions = " departmentid="+deparmentId;
// }
if (!"".equals(subcompanyId)){
conditions = conditions +" and subcompanyid1="+subcompanyId;
}
if (!"".equals(deparmentId)){
conditions = conditions +" and departmentid="+deparmentId;
}
if (!"".equals(employeeIds)){
conditions = conditions +" and id in ("+employeeIds+")";
}
RecordSet rs = new RecordSet();
List<Map<String,Object>> dataTable = null;
@ -249,25 +259,35 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
String bcrq = Util.null2String(scheduleMap.get("bcrq"));
String bcxx = Util.null2String(scheduleMap.get("bcxx"));
if (!"".equals(bcxx)){
String[] strArr = classesInformationMap.get(bcxx).split("&");
String content = strArr.length>1?strArr[1]:"";
String title = strArr.length>0?strArr[0]:"";
String color = strArr.length>2?strArr[2]:"";
if (!"".equals(effectTime)){
if (DateUtil.getTime(bcrq).compareTo(DateUtil.getTime(startEffectTime)) >=0 && DateUtil.getTime(bcrq).compareTo(DateUtil.getTime(endEffectTime)) <=0){
data.put(bcrq,new HashMap(){{
put("content",classesInformationMap.get(bcxx));
put("content",content);
put("title",title);
put("id",bcxx);
put("edit",true);
put("color",color);
}});
}else {
data.put(bcrq,new HashMap(){{
put("content",classesInformationMap.get(bcxx));
put("content",content);
put("title",title);
put("id",bcxx);
put("edit",false);
put("color",color);
}});
}
}else {
data.put(bcrq,new HashMap(){{
put("content",classesInformationMap.get(bcxx));
put("content",content);
put("title",title);
put("id",bcxx);
put("edit",true);
put("color",color);
}});
}
}
@ -287,38 +307,34 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
List<Map<String,Object>> cloumns = Lists.newArrayList();
cloumns.add(new HashMap(){{
put("title","编号");
put("width",120);
put("width",60);
put("dataIndex","workcode");
put("key","workcode");
put("fixed","left");
put("height",40);
put("align","center");
}});
cloumns.add(new HashMap(){{
put("title","姓名");
put("width",80);
put("width",40);
put("dataIndex","lastname");
put("key","lastname");
put("fixed","left");
put("height",40);
put("align","center");
}});
cloumns.add(new HashMap(){{
put("title","分部");
put("width",120);
put("width",50);
put("dataIndex","subcompany");
put("key","subcompany");
put("fixed","left");
put("height",40);
put("align","center");
}});
cloumns.add(new HashMap(){{
put("title","部门");
put("width",120);
put("width",50);
put("dataIndex","department");
put("key","department");
put("fixed","left");
put("height",40);
put("align","center");
}});
@ -327,8 +343,7 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
map.put("title",i+1);
map.put("dataIndex",DateUtil.AfterDay(startTime,i));
map.put("key",i+1);
map.put("width",80);
map.put("height",40);
map.put("width",50);
map.put("isCalendar",0);
cloumns.add(map);
}
@ -341,38 +356,41 @@ public class WorkRulesServiceImpl extends Service implements WorkRulesService {
public Map<String, Object> saveCalendarWork(Map<String, Object> params) {
String bcxxId = Util.null2String(params.get("bcxx"));
String resourceIds = Util.null2String(params.get("resourceIds"));
String date = Util.null2String(params.get("date"));
String dateArrs = Util.null2String(params.get("date"));
Map<String,Object> resultMap = Maps.newHashMap();
List<String> resourceList = Arrays.asList(resourceIds.split(","));
//系统管理员
List<String> beContainIds = null;
if (user.getUID() == 1){
beContainIds=resourceList;
}else {
beContainIds = getHaveResourceIds(String.valueOf(user.getUID()),resourceList,date);
}
//排班结果模块
List<String> dateList = Arrays.asList(dateArrs.split(","));
List<Map<String,Object>> insertDataList = Lists.newArrayList();
String formmodeid = Utils.getFormmodeIdMap().get("uf_pbjg");
List<Map<String,Object>> organizationList = Lists.newArrayList();
for (String str :beContainIds){
Map<String,Object> map = Maps.newHashMap();
map.put("dx",str);
map.put("dxlx", "0");
map.put("rqlx",CommonUtil.getRqlx(str,date));
organizationList.add(map);
for (String date : dateList){
//系统管理员
List<String> beContainIds = null;
if (user.getUID() == 1){
beContainIds=resourceList;
}else {
beContainIds = getHaveResourceIds(String.valueOf(user.getUID()),resourceList,date);
}
//排班结果模块
for (String str :beContainIds){
Map<String,Object> map = Maps.newHashMap();
map.put("dx",str);
map.put("dxlx", "0");
map.put("rqlx",CommonUtil.getRqlx(str,date));
organizationList.add(map);
}
String sql = "select id,mc,sfxx from uf_jcl_kq_bcxx where id=?";
List<Map<String,Object>> bcxxList = DbTools.getSqlToList(sql,bcxxId);
Map<String,Object> insertDataMap = Maps.newHashMap();
insertDataList.add(insertDataMap);
insertDataMap.put("pbtj",RegularScheduleTypeEnum.CALENDAR.getKey());
insertDataMap.put("bcrq",date);
insertDataMap.put("sfxx", bcxxList.get(0).get("sfxx"));
insertDataMap.put("sfdkpp",CheckBoxEnum.UNCHECKED.getKey());
insertDataMap.put("bcxx",bcxxId);
insertDataMap.put("pbrq",DateUtil.getCurrentDate());
insertDataMap.put("pbsj",DateUtil.getCurrentTime("yyyy-MM-dd HH:mm").split(" ")[1]);
}
String sql = "select id,mc,sfxx from uf_jcl_kq_bcxx where id=?";
List<Map<String,Object>> bcxxList = DbTools.getSqlToList(sql,bcxxId);
List<Map<String,Object>> insertDataList = Lists.newArrayList();
Map<String,Object> insertDataMap = Maps.newHashMap();
insertDataList.add(insertDataMap);
insertDataMap.put("pbtj",RegularScheduleTypeEnum.CALENDAR.getKey());
insertDataMap.put("bcrq",date);
insertDataMap.put("sfxx", bcxxList.get(0).get("sfxx"));
insertDataMap.put("sfdkpp",CheckBoxEnum.UNCHECKED.getKey());
insertDataMap.put("bcxx",bcxxId);
insertDataMap.put("pbrq",DateUtil.getCurrentDate());
insertDataMap.put("pbsj",DateUtil.getCurrentTime("yyyy-MM-dd HH:mm").split(" ")[1]);
/**插入排班结果表*/
resultMap.put("result",PersongroupCommonUtil.insertShiftSchedulingResults(organizationList,insertDataList,formmodeid));

@ -50,7 +50,7 @@ public class WorkRulesController {
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getReportCollectService(user) :: getDepartSchedule,paramMap);
}
@Post
@GET
@Path("/saveCalendarWork")
@Produces(MediaType.APPLICATION_JSON)
public String saveCalendarWork(@Context HttpServletRequest request, @Context HttpServletResponse response) {

@ -381,5 +381,14 @@ public class PersongroupCommonUtil {
return DbTools.getSqlToMapList(sql);
}
/**
*
* @return
*/
public static Map<String,String> getClassesAndSimpleNameInformation(){
String sql = "select id,mc name,jc simplename,ys from uf_jcl_kq_bcxx";
return DbTools.getSimpleNameMap(sql);
}
}

@ -150,4 +150,18 @@ public class DbTools {
return rs.executeBatchSql(sql,dataList);
}
public static Map<String,String> getSimpleNameMap(String sql,Object...value){
RecordSet rs = thread.get();
Map<String,String> result = Maps.newHashMap();
if (value == null || value.length <=0 || "".equals(value)){
rs.executeQuery(sql);
}else {
rs.executeQuery(sql,value);
}
while (rs.next()){
result.put(rs.getString("id"),rs.getString("name")+"&"+rs.getString("simplename")+"&"+rs.getString("ys"));
}
return result;
}
}

@ -581,7 +581,11 @@ public class Utils<T> {
if (classList.size() > 1){
classList = classList.stream().filter(e->!e.get("pbtj").equals(RegularScheduleTypeEnum.REGULAR.getKey())).collect(Collectors.toList());
classList = classList.stream().sorted(Comparator.comparing(e->DateUtil.getTime(e.get("pbrq")+" "+e.get("pbsj")).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
resultList.add(classList.get(classList.size()-1));
if (classList.size() > 0){
resultList.add(classList.get(classList.size()-1));
}else {
resultList.add(entry.getValue().get(0));
}
}else {
resultList.addAll(classList);
}

@ -8,6 +8,7 @@ import com.engine.common.util.ServiceUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import weaver.hrm.User;
import java.util.HashMap;
import java.util.Map;
@ -37,6 +38,18 @@ public class Test1 extends beforlog {
System.out.println(success);
}
@org.junit.Test
public void test3() throws Exception{
User user = new User(1);
WorkRulesService basicsetService = ServiceUtil.getService(WorkRulesServiceImpl.class,user);
Map<String, Object> param = Maps.newHashMap();
param.put("resourceIds","36,56");
param.put("bcxx","8");
param.put("date","2024-06-15,2024-06-14,2024-06-13,2024-06-12");
basicsetService.saveCalendarWork(param);
}
public String getJsonString(Object apidatas) throws JsonProcessingException {
Gson gson = new Gson();
// ObjectMapper mapper = new ObjectMapper();

@ -16,14 +16,16 @@ public class TestgetDepartSchedule extends beforlog {
@org.junit.Test
public void test2() throws Exception{
Map<String,Object> param = Maps.newHashMap();
param.put("dateTime","2024-05");
param.put("dateTime","2024-06");
param.put("pageSize","10");
param.put("pageindex","1");
param.put("deparment","");
param.put("type","0");
param.put("subcompany","521");
param.put("deparment","1");
param.put("type","2");
param.put("subcompany","");
param.put("employeeIds","");
param.put("tableName","uf_pbjg");
User user = new User(23);
param.put("total","0");
User user = new User(1);
Map<String, Object> result =getReportCollectService(user).getDepartSchedule(param);
System.out.println(result);

@ -1,8 +1,10 @@
package vocation;
import com.engine.attendance.component.persongroup.commonutil.PersongroupCommonUtil;
import com.engine.attendance.vacation.service.VocationService;
import com.engine.attendance.vacation.service.impl.VocationServiceImpl;
import com.engine.common.util.DateUtil;
import com.engine.common.util.DbTools;
import com.engine.common.util.ServiceUtil;
import com.engine.common.util.Utils;
import com.engine.cube.service.ModeImpExpService;
@ -43,8 +45,7 @@ public class Test1 extends beforlog {
}
@Test
public void test3() throws Exception{
System.out.println(DateUtil.getBetWeenMinutes("2024-06-05 12:11:10","2024-06-05 13:11:10"));
System.out.println(PersongroupCommonUtil.getClassesAndSimpleNameInformation().get("1").split("&")[2]);
}

Loading…
Cancel
Save