Commit 4445662d authored by 廖旭伟's avatar 廖旭伟

异常考勤汇总bug修改

parent 622f6057
......@@ -175,13 +175,18 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
if (temp == null) {
AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity();
attendanceStatEntity.initAttrValue();
BeanUtils.copyProperties(item, attendanceStatEntity, BeanUtil.getNullPropertyNames(item));
attendanceStatEntity.setStaffId(item.getStaffId());
attendanceStatEntity.setStaffName(item.getStaffName());
attendanceStatEntity.setDeptId(item.getDeptId());
attendanceStatEntity.setDeptName(item.getDeptName());
attendanceStatEntity.setPhoneNumer(item.getPhoneNumber());
//BeanUtils.copyProperties(item, attendanceStatEntity, BeanUtil.getNullPropertyNames(item));
attendanceStatEntity.setCreateTime(new Date());
attendanceStatEntity.setCreateUserId(1l);
attendanceStatEntity.setGoTimes(1); //默认当天全勤
this.dao.insert(attendanceStatEntity);
} else {
BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item));
//BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item));
temp.setUpdateTime(new Date());
this.dao.update(temp);
}
......@@ -286,6 +291,9 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
if (temp != null) {
BeanUtils.copyProperties(item, temp, BeanUtil.getNullPropertyNames(item));
temp.setGoTimes(0); //默认只要有异常考勤,当天就不算全勤
if(item.getMorningTimes()>0){
temp.setNonCompliancePunch(new BigDecimal(item.getMorningTimes()));
}
this.dao.update(temp);
}
String attendanceSummary = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment