修复bug

main
liuliang 4 days ago
parent ce3d3321e3
commit 0244020c5f

@ -207,6 +207,8 @@ public class GetScheduleResultListCmd extends AbstractCommonCommand<Map<String,O
break;
}
}
}else {
resultList.add(map);
}
}
}else {

@ -976,10 +976,10 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
//根据弹性上班时间点重新获取打卡时间
Map<ClockPointEnum, Map<String, Object>> ksdkNearestClcokInTime = Utils.getNearestClcokInTimeCmd(endRestClockPointDTO.getElasticTime(), clockInTimeList);
ClockPointEnum endResttimeType = getStartClassTimeType(endRestSchedule.get(0),ksdkNearestClcokInTime,endRestClockPointDTO.getElasticTime(),endRestClockPointDTO.getElasticTime());
endRestClockPointDTO.setClockTime(ksdkNearestClcokInTime.get(endResttimeType));
endRestClockPointDTO.setTimeType(endResttimeType);
// endRestClockPointDTO.setClockTime(ksdkNearestClcokInTime.get(endResttimeType));
// endRestClockPointDTO.setTimeType(endResttimeType);
if (endRestClockPointDTO.getTimeType() == ClockPointEnum.EMPTY || endRestClockPointDTO.getClockTime() == null){
if (endResttimeType == ClockPointEnum.EMPTY || ksdkNearestClcokInTime.get(endResttimeType) == null || (endResttimeType == ClockPointEnum.BEFORE && ksdkNearestClcokInTime.get(endResttimeType)==toRestClockPointDTO.getClockTime())){
//当弹性结束未匹配到打卡,弹性失效,进行还原
restSchedule.put("dtkssj",toRestClockPointDTO.getClassTime().split(" ")[1]);
@ -1005,6 +1005,9 @@ public class GetClockInPointCmd extends AbstractCommonCommand<Map<String, Object
}
toRestClockPointDTO.setElasticTime(null);
endRestClockPointDTO.setElasticTime(null);
}else {
endRestClockPointDTO.setClockTime(ksdkNearestClcokInTime.get(endResttimeType));
endRestClockPointDTO.setTimeType(endResttimeType);
}
}

@ -184,7 +184,7 @@ public class SaveWorkOverTimeCmd extends AbstractCommonCommand<Map<String,Object
insertParam.put("lyid",userId+"-"+ DateUtil.getCurrentDate());
insertParam.put("zt","1");
insertParam.put("eddxsc",0);
insertParam.put("edjxsc",0);
insertParam.put("ydxsc",0);
insertParam.put("wdxsc",0);
insertParam.put("jbgzrq",params.get("jbgzrq"));
@ -215,7 +215,7 @@ public class SaveWorkOverTimeCmd extends AbstractCommonCommand<Map<String,Object
ktsc = 0;
} else if ("1".equals(jxgz)) {
//指定计薪时长
double jxsc = Double.parseDouble(scheduleMap.getOrDefault("jxsc", "0").toString());
double jxsc = Double.parseDouble(Util.null2String(scheduleMap.get("jxsc")).equals("")?"0":Util.null2String(scheduleMap.get("jxsc")));
jxsc = Utils.getItemdurationDownWithoutHsl(holidayItem.get("hsdw").toString(),jxsc,AccountingUnitEnum.HOUR.getKey());
addJxsc = ktsc - jxsc > 0 ? jxsc : ktsc;
ktsc = ktsc - addJxsc;
@ -230,6 +230,7 @@ public class SaveWorkOverTimeCmd extends AbstractCommonCommand<Map<String,Object
insertHoliDayParam.put("yqyxsc",0);
insertHoliDayParam.put("zfsc",0);
insertParam.put("edjxsc",addJxsc);
insertParam.put("eddxsc",itemduration);
insertParam.put("wdxsc",itemduration);

@ -359,6 +359,7 @@ public class AttendanceAnalysisWrapper extends Service {
recordParam.put("classInfo", scheduleResult);
recordParam.put("formmodeIdMap", formModeIdMap);
recordParam.put("attendanceDuration", 0);
recordParam.put("scheduleResult",scheduleResult);
recordParam.put("modeId", formModeIdMap.get("uf_jcl_kq_cqjg"));
@ -404,14 +405,19 @@ public class AttendanceAnalysisWrapper extends Service {
return (Map<String,Object>)updateAttendanceResultWrapper.recordNoClass(params).get("recordDataTime");
}
recordParam.put("rqlx", scheduleResult.get(0).get("rqlx"));
//出差记录
Map<String, Object> evectionDataMap = updateAttendanceResultWrapper.getEvection(workingHourparam);
boolean sfxx=false;
//休息班次,休息班打卡自动加班不算自动加班,扣除原有的工作时段
if (scheduleResult.get(0).get("sfxx") != null && CheckBoxEnum.CHECKED.getKey().equals(scheduleResult.get(0).get("sfxx")) &&
scheduleResult.get(0).get("xxbdkzdjb") != null && CheckBoxEnum.UNCHECKED.getKey().equals(scheduleResult.get(0).get("xxbdkzdjb"))) {
sfxx = true;
List<Map<String,Object>> overTimePlanList = scheduleResult.stream().filter(e->e.get("bdlx").equals(ClassSegmentTypeEnum.OVERTIME_PLAN.getKey())).collect(Collectors.toList());
if (overTimePlanList.size() >0){
scheduleResult = scheduleResult.stream().filter(e->ClassSegmentTypeEnum.OVERTIME_PLAN.getKey().equals(e.get("bdlx")) || Utils.ifRestClassSegment(e.get("bdlx").toString()) || Utils.ifAskforOrEvctionClassSegment(e.get("bdlx").toString())).collect(Collectors.toList());
}else {
//没有加班计划,直接记为休息
recordParam.put("evectionDataMap",evectionDataMap);
updateAttendanceResultWrapper.recordRest(recordParam);
return null;
}
@ -430,8 +436,7 @@ public class AttendanceAnalysisWrapper extends Service {
}
askForLeaveAndEvctionSchedule.addAll((List<Map<String, Object>>) askForLeaveDataMap.get("askForLeaveSchedule"));
//出差记录
Map<String, Object> evectionDataMap = updateAttendanceResultWrapper.getEvection(workingHourparam);
if (evectionDataMap.get("alldayEvection") != null) {
//全天出差
recordParam.put("cqzt", CheckBoxEnum.UNCHECKED.getKey());
@ -539,6 +544,10 @@ public class AttendanceAnalysisWrapper extends Service {
*
*/
double attendanceDuration = utilService.computeAttendanceDuration(recordAbnormalParam);
if (sfxx){
//休息班次时默认为0
attendanceDuration=0;
}
/**
*

@ -713,12 +713,31 @@ public class UpdateAttendanceResultWrapper extends Service {
*
*/
public void recordRest(Map<String,Object> recordParam){
recordParam.put("recordData",Lists.newArrayList());
recordParam.put("recordDataTime",Maps.newHashMap());
recordParam.put("attendanceDuration",0);
recordParam.put("cqzt",CheckBoxEnum.UNCHECKED.getKey());
recordParam.put("sfxx",CheckBoxEnum.CHECKED.getKey());
utilService.recordItem(recordParam);
Map<String, Object> evectionDataMap = (Map<String, Object>)recordParam.get("evectionDataMap");
List<Map<String, Object>> evectionSchedule = (List<Map<String, Object>>) evectionDataMap.get("evectionSchedule");
List<Map<String, Object>> recordData = Lists.newArrayList();
if (evectionDataMap.get("alldayEvection") != null) {
//全天出差
recordParam.put("cqzt", CheckBoxEnum.UNCHECKED.getKey());
recordParam.put("recordData", evectionDataMap.get("alldayEvection"));
utilService.recordItem(recordParam);
}else {
if (evectionSchedule.size()>0){
recordParam.put("evectionList", evectionDataMap.get("evectionList"));
recordParam.put("evectionItems", evectionDataMap.get("evectionItems"));
recordParam.put("abnormalClockInList",Lists.newArrayList());
Map<String, Object> recordEvection = recordEvection(recordParam);
List<Map<String, Object>> evectionResultList = (List<Map<String, Object>>) recordEvection.get("resultList");
recordData.addAll(evectionResultList);
}
recordParam.put("recordData",recordData);
recordParam.put("recordDataTime",Maps.newHashMap());
recordParam.put("attendanceDuration",0);
recordParam.put("cqzt",CheckBoxEnum.UNCHECKED.getKey());
recordParam.put("sfxx",CheckBoxEnum.CHECKED.getKey());
utilService.recordItem(recordParam);
}
}
public int getTimeByWorkFor(String zysd,String zdycbcndfgzsd,List<Map<String, Object>> scheduleResult,String kssj,String jssj,String analysisDate){

@ -561,23 +561,7 @@ public class PersongroupCommonUtil {
//条件清单
sql = "select id,seclevel from hrmresource where 1=1 ";
if (filters.contains("field")){
String sql_select = "select a.*";
String sql_join = " from hrmresource a";
sql = "SELECT DISTINCT SCOPEID FROM CUS_FORMFIELD WHERE SCOPE = 'HrmCustomFieldByInfoType'";
List<Map<String,Object>> listscopeids = DbTools.getSqlToList(sql);
for (Map<String,Object> dataMap :listscopeids){
String str_scopeId = Util.null2String(dataMap.get("scopeid"));
int int_scopeId = Util.getIntValue(str_scopeId)+100;
sql_join = sql_join + " left join cus_fielddata t" + int_scopeId + " on a.id = t" + int_scopeId + ".id and t" + int_scopeId + ".scope='HrmCustomFieldByInfoType' and t" + int_scopeId + ".scopeid = " + str_scopeId;
}
sql = "SELECT 't'||(SCOPEID+100)||'.field'||fieldid colname FROM CUS_FORMFIELD WHERE SCOPE = 'HrmCustomFieldByInfoType'";
List<Map<String,Object>> listcolnames = DbTools.getSqlToList(sql);
for (Map<String,Object> dataMap :listcolnames){
String colname = Util.null2String(dataMap.get("colname"));
sql_select = sql_select + "," + colname;
}
sql = "select id,seclevel from (" + sql_select + sql_join +") TA where 1=1 and " + filters;
//sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
sql = "select a.id,a.seclevel from hrmresource a left join cus_fielddata b on a.id=b.id where scope='HrmCustomFieldByInfoType' and "+filters;
}else {
sql = sql+ " and "+filters;
}

@ -119,8 +119,6 @@ public class HandleOverdueVocationCmd extends AbstractCommonCommand<Map<String,O
DbTools.update(updateSql,key.split("&")[0],key.split("&")[1],key.split("&")[2]);
}
}
sql = "DELETE FROM UF_JCL_KQ_JQYE WHERE jqid IN (101,102) AND ygid IN (SELECT id FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID = -1 AND Field21 != 'R' AND Field21 != 'E')";
DbTools.update(sql);
return null;
}

@ -96,19 +96,17 @@ public class VocationCmd extends AbstractCommonCommand<Map<String,Object>> {
vocation.put("qsrqValue",qsrqValue);
vocation.put("yjzdValue",yjzdValue);
vocation.put("ljcrglyfslwzValue",ljcrglyfslwzValue);
//lsgldw:累时工龄单位01
//ljcrglyfslwzValue累时工龄值浮点数
//jgsc间隔时长算法0起算日期于当前日期间隔1起算日期与当前日期间隔额外加上累时工龄值2直接取累时工龄浮点值
if (!"".equals(lsgldw) && !"".equals(ljcrglyfslwzValue) && "0".equals(lsgldw) && "1".equals(jgsc)){
//当累计单位为年时 累计工龄的处理
if (!"".equals(lsgldw) && !"".equals(ljcrglyfslwzValue) && "0".equals(lsgldw) && !"0".equals(jgsc)){
//当累计单位为年时
vocation.put("ljcrglyfslwzValue",Math.round(Double.valueOf(ljcrglyfslwzValue)*12));
}
if ("0".equals(jgsc)){
//起算日期与当前日期间隔不取 直取间隔时长
//起算日期与当前日期间隔不取
vocation.put("ljcrglyfslwzValue","0");
}
// vocation.put("zyzValue",getUserIds(vocation));
// vocation.put("zyzValue",getUserIds(vocation));
}
log.debug("VocationCmd params: [{}]",params);
String edfffs = Util.null2String(vocationList.get(0).get("edfffs"));

@ -38,8 +38,6 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
releaseDate = DateUtil.getCurrentTime();
}
List<Map<String,Object>> vocationList = (List<Map<String,Object>>)data.get("vocationList");
//当前派假假别
String pjjb = Util.null2String(vocationList.get(0).get("jb"));
//起算日期
String qsrq = Util.null2String(vocationList.get(0).get("qsrqValue"));
//额度有效期间
@ -97,13 +95,6 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
int allWorkDays = Double.valueOf(ljcrglyfslwz).intValue() * 30 + betweenDays;
//总月数
int allMonths = betweenMonth + Double.valueOf(ljcrglyfslwz).intValue();
//如果工龄直接取工龄字段值
if ("2".equals(jgscsf)){
allMonths = (int)(Double.valueOf(ljcrglyfslwz)*12);
if (allMonths == 0){
//return insertHoliDayParam;
}
}
List<Map<String,Object>> dataList = VocationCommonUtil.ifexist("uf_jcl_kq_jqye", insertHoliDayParam);
@ -185,7 +176,7 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
}
String stage = String.valueOf(months);
if (months < 10){
stage = "0"+stage;
stage = "0"+stage;
}
if (vocationMap.size() >0){
restTime = Double.valueOf(vocationMap.get("fdsc"+stage).toString());
@ -193,20 +184,6 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
restTime=0;
}
}
restTime = VocationCommonUtil.handleRestDays(restTime,wscl);
if("102".equals(pjjb)){
String sql = "UPDATE UF_JCL_KQ_JQYE SET KTSC = 120 - " + restTime + " WHERE JQID = 101 AND KTSC + " + restTime + " > 120 AND YGID = " + userId + " AND sxrq = '" + sxrq + "'";
DbTools.update(sql);
}
if("101".equals(pjjb)){
String sql = "SELECT KTSC FROM UF_JCL_KQ_JQYE ujkj WHERE JQID = 102 AND ygid = " + userId + " AND sxrq = '" + sxrq + "'";
Map<String,Object> tmpres = DbTools.getSqlToMap(sql);
if (tmpres.size()>0) {
double restTime0 = Double.valueOf(tmpres.get("ktsc").toString());
if (restTime0 + restTime > 120)
restTime = 120 - restTime0;
}
}
insertHoliDayParam.put("ktsc",restTime);
//离职日期
@ -257,29 +234,33 @@ public class BySchedulePaymentWay implements HolidayGenerationWay{
double restTime=0.0;
//折算
if (changeMethodEnum == QuotaChangeMethodEnum.CONVERT){
int beginYear=0;//生效日期对应的年度
int endYear=0;//失效日期对应的年度
String divideTime = "";//工龄变更日期
int beginYearMonth = DateUtil.getBetWeenMonths(qsrq,sxrq);
if (beginYearMonth < 0){
beginYearMonth = 0;
}
beginYearMonth = beginYearMonth+seniority;
int endYearMonth = DateUtil.getBetWeenMonths(qsrq,nextSxrq);
endYearMonth = endYearMonth+seniority;
int beginYear = beginYearMonth/12;
int endYear = endYearMonth/12;
//残年分割日期
String divideTime = DateUtil.beforeMonth(qsrq,seniority);
divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2];
divideTime = DateUtil.nextMonth(divideTime,1,DateUtil.yyyyMM)+"-01";
if (jgscsf.equals("2")){
beginYear = Double.valueOf(ljcrglyfslwz).intValue();
//直接取工龄字段
beginYear = seniority/12;
endYear = beginYear+1;
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
double divdemonths = Double.valueOf(ljcrglyfslwz) - Double.valueOf(ljcrglyfslwz).intValue();
divideTime = DateUtil.nextMonth(sxrq,12-(int)Math.ceil(divdemonths*12),dateTimeFormatter);
}else {
int beginYearMonth = DateUtil.getBetWeenMonths(qsrq, sxrq);
if (beginYearMonth < 0) {
beginYearMonth = 0;
}
beginYearMonth = beginYearMonth + seniority;
int endYearMonth = DateUtil.getBetWeenMonths(qsrq, nextSxrq);
endYearMonth = endYearMonth + seniority;
beginYear = beginYearMonth / 12;
endYear = endYearMonth / 12;
//残年分割日期
divideTime = DateUtil.beforeMonth(qsrq,seniority);
//divideTime = sxrq.split("-")[0]+"-"+divideTime.split("-")[1]+"-"+divideTime.split("-")[2];
//分割日期
// int month = DateUtil.getBetWeenMonths(qsrq,sxrq);
// if (month < 0){
// month = 0;
// }
// int historySeniority = seniority-month;
// divideTime = DateUtil.beforeMonth(qsrq,historySeniority);
divideTime = sxrq.split("-")[0]+"-"+qsrq.split("-")[1]+"-"+qsrq.split("-")[2];
divideTime = DateUtil.nextYear(divideTime,endYear,DateUtil.yyyyMMdd);
}

@ -71,8 +71,6 @@ public class SinglePaymentInFullWay implements HolidayGenerationWay {
String schdedkzsxrq = Util.null2String(vocationList.get(0).get("schdedkzsxrq"));
//间隔时长算法
String jgscsf = Util.null2String(vocationList.get(0).get("jgsc"));
//累计时长单位01
String ljgldw = Util.null2String(vocationList.get(0).get("lsgldw"));
if ("".equals(qsrq)){
return Maps.newHashMap();

@ -30,25 +30,13 @@ public class VocationServiceImpl extends Service implements VocationService {
@Override
public void generateVocation(Map<String, Object> params) {
String modeId = Util.null2String(params.get("modeId"));
String empId = "";
String leavetype = "";
Map<String,Object> param = Maps.newHashMap();
param.put("modeId",modeId);
if (params.containsKey("empid")) {
empId = Util.null2String(params.get("empid"));
param.put("empid", empId);
}
if (params.containsKey("leavetype"))
leavetype = Util.null2String(params.get("leavetype"));
Map<String,Object> result = commandExecutor.execute(new GetPersonVocationBySuitOrganzation(param));
String sql = "select a.id userid,a.*,b.* from hrmresource a left join cus_fielddata b on a.id=b.id where a.status <> '5' and a.status <> '4' and a.status <> '7' and a.id in (";
String queryDepartEmployeeSql = "select resourceid ,changedate,type_n from HRMSTATUSHISTORY where changedate is not null";
if (params.containsKey("empid")) {
queryDepartEmployeeSql = queryDepartEmployeeSql + " and resourceid = " + empId;
sql = "select a.id userid,a.*,b.* from hrmresource a left join cus_fielddata b on a.id=b.id where a.status <> '5' and a.status <> '4' and a.status <> '7' and a.id = "+ Util.null2String(params.get("empid")) +" and a.id in (";
}
//获取离职日期
List<Map<String,Object>> departEmployeeList = DbTools.getSqlToList(queryDepartEmployeeSql);
Map<String,Object> departEmployeeMap = CommonUtil.getDepartEmployeeMap(departEmployeeList);
@ -82,7 +70,6 @@ public class VocationServiceImpl extends Service implements VocationService {
Map<String,List<Map<String,Object>>> itemGroup = attendanceItems.stream().collect(Collectors.groupingBy(e->e.get("key").toString()));
Map<String, Object> needGenerateVocationMap = Maps.newHashMap();
for (Map<String,Object> map : attendanceItems){
if (leavetype != "" && !leavetype.equals(map.get("key"))) continue;
if (vocationMap.get(map.get("key")) != null){
needGenerateVocationMap.put(Util.null2String(map.get("key")),vocationMap.get(map.get("key")));
}

@ -76,6 +76,7 @@ public class BatchAskForLeaveWorkFlowSubmitAction implements Action {
for (Map<String, String> detailTable3Item : detailTable3Data) {
detailTable3Item.put("jqlx", detailTable3Item.get("qjlx"));
detailTable3Item.put("cxjqj", detailTable3Item.get("qjfs"));
detailTable3Item.put("mtcfsdjq",mainTableData.get("mtcfsdjq"));
params.put("mainTableData", detailTable3Item);
params.put("detailTableData", reCreateDetailList);
@ -134,7 +135,7 @@ public class BatchAskForLeaveWorkFlowSubmitAction implements Action {
log.info("detailTableData : [{}]", detailTableData);
}
if (detailTableData.size() == 0) {
String message = "无法生成有效请假明细时长,请检查请假基础选择信息";
String message = "未生成请假记录,请检查请假区间内的排班是否正常";
log.error(message);
requestInfo.getRequestManager().setMessageid("11111" + requestid + "22222");
requestInfo.getRequestManager().setMessagecontent(message);

@ -92,7 +92,7 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
//判断改组明细是否与已存在的加班计划有重叠
boolean overLappingSign = checkOverlapping(existOvertimePlanList, date + " " +startTime, realEndDate + " " + endTime);
if (overLappingSign) {
errorMessage.add(CommonUtil.readResource("kunyResource","3002",7,"与已经申请加班重叠",Util.null2String(empIdToNameInfo.get(empId)),date));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班计划区间和已申请的加班计划(已审核/待审核)出现时间重叠,不允许申请加班!");
continue;
}
//加班时长
@ -310,7 +310,7 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
//20240814需求变更。增加单条明细的最小加班分钟数校验工作日加班最大小时数、周加班最大小时数、月加班最大小时数
if (matchItemInfo.size() == 0) {
log.info(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班计划未匹配到合适的加班类型!");
errorMessage.add(CommonUtil.readResource("kunyResource","3003",7,"未匹配到合适的加班类型",Util.null2String(empIdToNameInfo.get(empId)),date));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班计划未匹配到合适的加班类型!");
continue;
}
log.info(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班计划匹配到:" + Util.null2String(matchItemInfo.get("mc")));
@ -335,14 +335,15 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
//对于不允许加班的情况,此处指非休息班次中,和非休息、就餐班段有重叠时
allowOvertimeSign = (boolean) overtimeBorderInfo.get("allowOvertimeSign");
if (!allowOvertimeSign) {
errorMessage.add(CommonUtil.readResource("kunyResource","3001",7,"工作日加班不能与900-1730的工作时间有交集",Util.null2String(empIdToNameInfo.get(empId)),date));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班区间和工作班次的非休息/就餐班段有重叠!");
continue;
}
//单条明细的最小加班分钟数校验
String minMinutes = Util.null2String(matchItemInfo.get("jbqsfzs"));
if (!"".equals(minMinutes) && Integer.parseInt(minMinutes) > overtimeMinutes) {
//最小加班分钟数大于单条明细的加班时长分钟数
errorMessage.add(CommonUtil.readResource("kunyResource","3004",7,"加班时长太短",Util.null2String(empIdToNameInfo.get(empId)),date,Util.null2String(matchItemInfo.get("mc"))));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班分钟数小于加班类型-"
+ Util.null2String(matchItemInfo.get("mc")) +"设置的最小加班分钟数!");
continue;
}
String limitTotalOvertimeSc = Util.null2String(matchItemInfo.get("xzzjbsc"));
@ -358,7 +359,8 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
boolean needCheckWorkDayHours = !"".equals(limitWorkDayHours) && (belongDateType.equals(DateTypeEnum.WORK_DAY.getKey()) || belongDateType.equals(DateTypeEnum.CHANGECLASS.getKey()));
if (needCheckWorkDayHours && Double.compare(Double.parseDouble(limitWorkDayHours), overtimeMinutes / 60.0) < 0) {
doLimitWorkDayHours = true;
errorMessage.add(CommonUtil.readResource("kunyResource","3005",7,"加班时长超工作日累计时长",Util.null2String(empIdToNameInfo.get(empId)),date,Util.null2String(matchItemInfo.get("mc"))));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班时长累计后超过了加班类型-"
+ Util.null2String(matchItemInfo.get("mc")) +"设置的工作日加班最大小时数!");
}
//判断是否满足周加班最大小时数
if (!"".equals(limitWeekHours)) {
@ -376,7 +378,8 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
if (maxWeekMinutes - weekOvertimeMinutes - overtimeMinutes < 0) {
//达到周加班最大小时数
doLimitWeekHours = true;
errorMessage.add(CommonUtil.readResource("kunyResource","3006",7,"加班时长超周累计时长",Util.null2String(empIdToNameInfo.get(empId)),date,Util.null2String(matchItemInfo.get("mc"))));
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班时长累计后超过了加班类型-"
+ Util.null2String(matchItemInfo.get("mc")) +"设置的周加班最大小时数!");
}
}
//判断是否满足月加班最大小时数
@ -395,8 +398,8 @@ public class OvertimePlanServiceImpl extends Service implements OvertimePlanServ
if (maxMonthMinutes - monthOvertimeMinutes - overtimeMinutes < 0) {
//达到月加班最大小时数
doLimitMonthHours = true;
errorMessage.add(CommonUtil.readResource("kunyResource","3007",7,"加班时长超月累计时长",Util.null2String(empIdToNameInfo.get(empId)),date,Util.null2String(matchItemInfo.get("mc"))));
}
errorMessage.add(Util.null2String(empIdToNameInfo.get(empId)) + "在日期" + date + "的加班时长累计后超过了加班类型-"
+ Util.null2String(matchItemInfo.get("mc")) +"设置的月加班最大小时数!"); }
}
// //判断是否超出工作日、周、月最大小时数要求
// if ("1".equals(limitDealType) && (doLimitWorkDayHours || doLimitWeekHours || doLimitMonthHours)) {

Loading…
Cancel
Save