|
|
|
@ -2,10 +2,7 @@ package com.engine.attendance.attendanceanalysis.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.engine.attendance.attendanceanalysis.cmd.item.*;
|
|
|
|
|
import com.engine.attendance.attendanceanalysis.service.AbnormalAttendanceService;
|
|
|
|
|
import com.engine.attendance.enums.AccountingUnitEnum;
|
|
|
|
|
import com.engine.attendance.enums.AttendanceItemTypeEnum;
|
|
|
|
|
import com.engine.attendance.enums.ClassSegmentTypeEnum;
|
|
|
|
|
import com.engine.attendance.enums.WorkForTimeEnum;
|
|
|
|
|
import com.engine.attendance.enums.*;
|
|
|
|
|
import com.engine.common.util.DateUtil;
|
|
|
|
|
import com.engine.common.util.Utils;
|
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
@ -71,21 +68,29 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
double hsl = Float.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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemType", AttendanceItemTypeEnum.LATE);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifBeLate=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if (ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey().equals(bdlx) || ClassSegmentTypeEnum.EARLY_OVERTIME.getKey().equals(bdlx)
|
|
|
|
@ -106,21 +111,29 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
String jbwdhlfzs = Util.null2String(workTimeBeLateItems.get(0).get("jbwdhlfzs"));
|
|
|
|
|
if (!"".equals(jbwdhlfzs) && between > Integer.valueOf(jbwdhlfzs)){
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("userId",userId);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("date",analysisDate);
|
|
|
|
|
saveWorkTimeBeLateParam.put("item",getBeLateItems(lateParams).get(0).get("key"));
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemduration",itemduration);
|
|
|
|
|
saveWorkTimeBeLateParam.put("betweenMinutes",between);
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemType", AttendanceItemTypeEnum.LATE);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifBeLate=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -139,22 +152,30 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
String hsdw = Util.null2String(workTimeBeLateItems.get(0).get("hsdw"));
|
|
|
|
|
String thfghlfzs = Util.null2String(workTimeBeLateItems.get(0).get("thfghlfzs"));
|
|
|
|
|
if (!"".equals(thfghlfzs) && between> Integer.valueOf(thfghlfzs)){
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
// saveWorkTimeBeLateParam.put("userId",userId);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("date",analysisDate);
|
|
|
|
|
saveWorkTimeBeLateParam.put("item",getBeLateItems(lateParams).get(0).get("key"));
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemduration",itemduration);
|
|
|
|
|
saveWorkTimeBeLateParam.put("betweenMinutes",between);
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemType", AttendanceItemTypeEnum.LATE);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifBeLate=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -208,6 +229,20 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
double hsl = Float.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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("userId",userId);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("date",analysisDate);
|
|
|
|
@ -215,13 +250,9 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemduration",itemduration);
|
|
|
|
|
saveWorkTimeBeLateParam.put("betweenMinutes",between);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifLeaveEarly=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if (ClassSegmentTypeEnum.EXTENDED_OVERTIME.getKey().equals(bdlx) || ClassSegmentTypeEnum.EARLY_OVERTIME.getKey().equals(bdlx)
|
|
|
|
@ -242,22 +273,28 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
String jbzzhlfzs = Util.null2String(workTimeBeLateItems.get(0).get("jbzzhlfzs"));
|
|
|
|
|
if (!"".equals(jbzzhlfzs) && between > Integer.valueOf(jbzzhlfzs)){
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
// saveWorkTimeBeLateParam.put("userId",userId);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("date",analysisDate);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
saveWorkTimeBeLateParam.put("item",getBeEarlyItems(earlyParams).get(0).get("key"));
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemduration",itemduration);
|
|
|
|
|
saveWorkTimeBeLateParam.put("betweenMinutes",between);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifLeaveEarly=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -276,21 +313,30 @@ public class AbnormalAttendanceServiceImpl extends Service implements AbnormalAt
|
|
|
|
|
String hsdw = Util.null2String(workTimeBeLateItems.get(0).get("hsdw"));
|
|
|
|
|
String tqlghlfzs = Util.null2String(workTimeBeLateItems.get(0).get("tqlghlfzs"));
|
|
|
|
|
if (!"".equals(tqlghlfzs) && between> Integer.valueOf(tqlghlfzs)){
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
double itemduration = Utils.getItemduration(hsl,hsdw,between,AccountingUnitEnum.MINUTES);
|
|
|
|
|
Map<String,Object> saveWorkTimeBeLateParam = Maps.newHashMap();
|
|
|
|
|
// saveWorkTimeBeLateParam.put("userId",userId);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("date",analysisDate);
|
|
|
|
|
|
|
|
|
|
saveWorkTimeBeLateParam.put("item",getBeEarlyItems(earlyParams).get(0).get("key"));
|
|
|
|
|
saveWorkTimeBeLateParam.put("itemduration",itemduration);
|
|
|
|
|
saveWorkTimeBeLateParam.put("betweenMinutes",between);
|
|
|
|
|
saveWorkTimeBeLateParam.put("hsdw",hsdw);
|
|
|
|
|
saveWorkTimeBeLateParam.put("kczgsc",workTimeBeLateItems.get(0));
|
|
|
|
|
resultList.add(saveWorkTimeBeLateParam);
|
|
|
|
|
// List<Map<String,Object>> classInfoList = Lists.newArrayList();
|
|
|
|
|
// classInfoList.add(classInfo);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("classInfo", classInfoList);
|
|
|
|
|
// saveWorkTimeBeLateParam.put("cqzt","1");
|
|
|
|
|
// commandExecutor.execute(new UpdateAttendanceResultsCmd(saveWorkTimeBeLateParam));
|
|
|
|
|
// ifLeaveEarly=true;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|