zm_dev
liuliang 11 months ago
parent 2daf6e009a
commit 28061f710c

@ -1 +1 @@
<EFBFBD><EFBFBD>Y<EFBFBD>Y<EFBFBD>Y<EFBFBD>r<EFBFBD>t<EFBFBD><EFBFBD><EFBFBD>~<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>J<EFBFBD>I
а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

@ -10,7 +10,24 @@
</component>
<component name="ChangeListManager">
<list default="true" id="baeb3dfb-5097-46c5-933e-6d1dab18b815" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/src/com/engine/common/util/CommonUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/com/engine/common/util/CommonUtil.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/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.at" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.at" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.s" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat.values.s" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat_i" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dataSources/ade958e9-d72b-48ba-8be1-0441de7da9a5/entities/entities.dat_i" 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/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$/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$/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/test-classes/vocation/Test1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/vocation/Test1.class" 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" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -649,7 +666,10 @@
<workItem from="1717495483305" duration="5307000" />
<workItem from="1717551326927" duration="7073000" />
<workItem from="1717565799282" duration="8912000" />
<workItem from="1717577182099" duration="3567000" />
<workItem from="1717577182099" duration="10185000" />
<workItem from="1717589991214" duration="2702000" />
<workItem from="1717638933204" duration="5993000" />
<workItem from="1717651863418" duration="1777000" />
</task>
<servers />
</component>
@ -713,6 +733,21 @@
<line>407</line>
<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" />
</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" />
</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" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<watches-manager>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -115,7 +115,7 @@ public class GetEvectionCmd extends AbstractCommonCommand<Map<String,Object>> {
}else if (DateUtil.getTime(ksrq).compareTo(DateUtil.getTime(analysisDate)) > 0){
evectioneMap.put("gsrq",ClassBelongToEnum.NEXTDAY.getKey());
}
evectionSchedule.add(evectionData);
evectionSchedule.add(evectioneMap);
}
}

@ -575,7 +575,7 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
List<Map<String, Object>> restScheduleList = 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"))) && CheckBoxEnum.CHECKED.getKey().equals(e.get("dtsfdx"))).collect(Collectors.toList());
if (restScheduleList.size() > 0){
adjustClockPointDTOByRestClass(restScheduleList,clcokInTimeData,needClockDateList,scheduleResult);
}
/**
* 22
@ -874,5 +874,121 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
}
}
/**
*
*/
public void adjustClockPointDTOByRestClass(List<Map<String, Object>> restScheduleList,List<ClockPointDTO> clcokInTimeData,List<String> needClockDateList,List<Map<String, Object>> scheduleResult){
String analysisDate = Util.null2String(params.get("analysisDate"));
List<Map<String, Object>> clockInTimeList = (List<Map<String, Object>>) params.get("clockInTimeList");
for (Map<String, Object> restSchedule:restScheduleList){
String dtkssj = Utils.getkssjTime(restSchedule,analysisDate);
String dtjssj = Utils.getjssjTime(restSchedule,analysisDate);
//最大弹性分钟
int dtzddxfz = Integer.valueOf(Util.null2String(restSchedule.get("dtzddxfz")));
//弹性核算
double dtdxhs = Utils.convertDouble(restSchedule.get("dtdxhs"));
//下班去休息卡点
ClockPointDTO toRestClockPointDTO = null;
//休息完上班卡点
ClockPointDTO endRestClockPointDTO = null;
for (ClockPointDTO clockPointDTO:clcokInTimeData){
if (clockPointDTO.getClassTime().equals(dtkssj) && clockPointDTO.getPointType()==ClockPointEnum.END){
toRestClockPointDTO = clockPointDTO;
}else if (clockPointDTO.getClassTime().equals(dtjssj) && clockPointDTO.getPointType()==ClockPointEnum.START){
endRestClockPointDTO = clockPointDTO;
}
}
List<Map<String, Object>> endRestSchedule = scheduleResult.stream().filter(e->dtjssj.equals(Utils.getkssjTime(e,analysisDate))).collect(Collectors.toList());
/**
*
*/
if (toRestClockPointDTO != null && endRestClockPointDTO != null){
String toRestClassTime = toRestClockPointDTO.getClassTime();
String endRestClassTime = endRestClockPointDTO.getClassTime();
Map<String, Object> toRestClockTimeMap = toRestClockPointDTO.getClockTime();
if (toRestClockTimeMap == null || toRestClockTimeMap.size() == 0 || toRestClockPointDTO.getTimeType() == ClockPointEnum.EQUAL || toRestClockPointDTO.getTimeType() == ClockPointEnum.EMPTY){
//不存在打卡时间,打卡时间与班次时间相等,漏卡
continue;
}
String toRestClockTime = toRestClockTimeMap.get("signdate")+" "+toRestClockTimeMap.get("signtime");
int betweenMinute = 0;
//设置下上班的弹性时间
if (toRestClockPointDTO.getTimeType() == ClockPointEnum.BEFORE){
betweenMinute = DateUtil.getBetWeenMinutes(toRestClockTime,toRestClassTime);
if (betweenMinute > dtzddxfz){
toRestClockPointDTO.setElasticTime(DateUtil.beforeMinutes(toRestClassTime,dtzddxfz));
toRestClockPointDTO.setTimeType(ClockPointEnum.BEFORE);
endRestClockPointDTO.setElasticTime(DateUtil.beforeMinutes(endRestClassTime,dtzddxfz));
}else {
betweenMinute = Double.valueOf(Utils.getItemdurationDown(dtdxhs, AccountingUnitEnum.MINUTES.getKey(), betweenMinute, AccountingUnitEnum.MINUTES)).intValue();
endRestClockPointDTO.setElasticTime(DateUtil.beforeMinutes(endRestClassTime,betweenMinute));
}
}else if (toRestClockPointDTO.getTimeType() == ClockPointEnum.AFTER){
betweenMinute = DateUtil.getBetWeenMinutes(toRestClassTime,toRestClockTime);
betweenMinute = Double.valueOf(Utils.getItemdurationDown(dtdxhs, AccountingUnitEnum.MINUTES.getKey(), betweenMinute, AccountingUnitEnum.MINUTES)).intValue();
endRestClockPointDTO.setElasticTime(DateUtil.AfterMinutes(endRestClassTime,betweenMinute));
if (betweenMinute > dtzddxfz){
toRestClockPointDTO.setElasticTime(DateUtil.AfterMinutes(toRestClassTime,dtzddxfz));
toRestClockPointDTO.setTimeType(ClockPointEnum.AFTER);
endRestClockPointDTO.setElasticTime(DateUtil.AfterMinutes(endRestClassTime,dtzddxfz));
}else {
betweenMinute = Double.valueOf(Utils.getItemdurationDown(dtdxhs, AccountingUnitEnum.MINUTES.getKey(), betweenMinute, AccountingUnitEnum.MINUTES)).intValue();
endRestClockPointDTO.setElasticTime(DateUtil.AfterMinutes(endRestClassTime,betweenMinute));
}
}
if (betweenMinute <= dtzddxfz){
toRestClockPointDTO.setElasticTime(toRestClockTime);
toRestClockPointDTO.setTimeType(ClockPointEnum.EQUAL);
}
//变更休息时间
restSchedule.put("dtkssj",toRestClockPointDTO.getElasticTime().split(" ")[1]);
restSchedule.put("dtjssj",endRestClockPointDTO.getElasticTime().split(" ")[1]);
//根据弹性上班时间点重新获取打卡时间
//计算最大提前打卡分钟数
int tqdkfzs = 60;
if (Util.null2String(endRestSchedule.get(0).get("tqdkfzs")).equals("") && !"".equals(getBeforeClockTime(needClockDateList,dtkssj))){
tqdkfzs = DateUtil.getBetWeenMinutes(getBeforeClockTime(needClockDateList,dtkssj),dtkssj);
}else {
tqdkfzs = Util.null2String(endRestSchedule.get(0).get("tqdkfzs")).equals("")?60:Integer.valueOf(endRestSchedule.get(0).get("tqdkfzs").toString());
}
Map<ClockPointEnum, Map<String, Object>> ksdkNearestClcokInTime = Utils.getNearestClcokInTimeCmd(endRestClockPointDTO.getElasticTime(), clockInTimeList);
ClockPointEnum timeType = ClockPointEnum.EMPTY;
if (ksdkNearestClcokInTime.get(ClockPointEnum.EQUAL) != null) {
timeType = ClockPointEnum.EQUAL;
}
if (ClockPointEnum.EMPTY.equals(timeType) && ksdkNearestClcokInTime.get(ClockPointEnum.BEFORE) != null) {
String clockInTime = ksdkNearestClcokInTime.get(ClockPointEnum.BEFORE).get("signdate") + " " + ksdkNearestClcokInTime.get(ClockPointEnum.BEFORE).get("signtime");
if (DateUtil.getTime(clockInTime).compareTo(DateUtil.getTime(DateUtil.beforeMinutes(endRestClockPointDTO.getElasticTime(), tqdkfzs))) >= 0 &&
(getBeforeClockTime(needClockDateList,endRestClockPointDTO.getElasticTime()).equals("") || DateUtil.getTime(clockInTime).compareTo(DateUtil.getTime(getBeforeClockTime(needClockDateList,endRestClockPointDTO.getElasticTime()))) > 0)) {
//打卡时间大于等于最早打卡时间
timeType = ClockPointEnum.BEFORE;
}
}
if (ClockPointEnum.EMPTY.equals(timeType) && ksdkNearestClcokInTime.get(ClockPointEnum.AFTER) != null) {
String clockInTime = ksdkNearestClcokInTime.get(ClockPointEnum.AFTER).get("signdate") + " " + ksdkNearestClcokInTime.get(ClockPointEnum.AFTER).get("signtime");
if (getNextClockTime(needClockDateList,endRestClockPointDTO.getElasticTime()).equals("") || DateUtil.getTime(clockInTime).compareTo(DateUtil.getTime(getNextClockTime(needClockDateList,endRestClockPointDTO.getElasticTime()))) < 0) {
//打卡时间小于结束时间
timeType = ClockPointEnum.AFTER;
}
}
endRestClockPointDTO.setClockTime(ksdkNearestClcokInTime.get(timeType));
endRestClockPointDTO.setTimeType(timeType);
}
}
}
}

@ -41,11 +41,11 @@ public class AttendanceanalysisAction {
@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-04-28");
// paramMap.put("endDate","2024-04-28");
// 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"));

@ -43,7 +43,7 @@ public class Test1 extends beforlog {
}
@Test
public void test3() throws Exception{
System.out.println(DateUtil.getTime("2024-06-05 12:11:01"));
System.out.println(DateUtil.getBetWeenMinutes("2024-06-05 12:11:10","2024-06-05 13:11:10"));
}

Loading…
Cancel
Save