Commit 399ad471 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e37d1619 38c4045f
......@@ -226,10 +226,12 @@ public class AttendanceStatEntity extends AttendanceStatVo {
/**
* 出勤天数
*/
@Excel(name = "出勤天数")
private Integer goTimes;
/**
* 上午缺卡次数
*/
@Excel(name = "缺卡次数")
private Integer morningTimes;
/**
* 下午缺卡次数
......
......@@ -178,13 +178,21 @@ 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());
attendanceStatEntity.setYear(item.getYear());
attendanceStatEntity.setMonth(item.getMonth());
attendanceStatEntity.setDay(item.getDay());
//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);
}
......@@ -289,6 +297,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