|
@@ -84,6 +84,8 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
if (choseEmployee != null) {
|
|
|
createReqVO.setDeptId(choseEmployee.getDeptId());
|
|
|
createReqVO.setDeptName(choseEmployee.getDeptName());
|
|
|
+ createReqVO.setPostId(choseEmployee.getPostId());
|
|
|
+ createReqVO.setPosition(choseEmployee.getPosition());
|
|
|
}
|
|
|
if (createReqVO != null && createReqVO.getAttendanceDate() != null) {
|
|
|
LocalDate localDate = createReqVO.getAttendanceDate();
|
|
@@ -107,6 +109,8 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
if (choseEmployee != null) {
|
|
|
updateReqVO.setDeptId(choseEmployee.getDeptId());
|
|
|
updateReqVO.setDeptName(choseEmployee.getDeptName());
|
|
|
+ updateReqVO.setPostId(choseEmployee.getPostId());
|
|
|
+ updateReqVO.setPosition(choseEmployee.getPosition());
|
|
|
}
|
|
|
if (updateReqVO != null && updateReqVO.getAttendanceDate() != null) {
|
|
|
LocalDate localDate = updateReqVO.getAttendanceDate();
|
|
@@ -173,8 +177,11 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
EmployeeQueryReqDTO reqDTO = new EmployeeQueryReqDTO().setName(importAttendance.getEmployeeName()).setPhone(importAttendance.getEmployeeMobile());
|
|
|
EmployeeRespDTO choseEmployee = employeeApi.getEmployee(reqDTO);
|
|
|
if (choseEmployee != null) {
|
|
|
+ importAttendance.setEmployeeId(choseEmployee.getId());
|
|
|
importAttendance.setDeptId(choseEmployee.getDeptId());
|
|
|
importAttendance.setDeptName(choseEmployee.getDeptName());
|
|
|
+ importAttendance.setPostId(choseEmployee.getPostId());
|
|
|
+ importAttendance.setPosition(choseEmployee.getPosition());
|
|
|
}
|
|
|
if (importAttendance != null && importAttendance.getAttendanceDate() != null) {
|
|
|
LocalDate localDate = importAttendance.getAttendanceDate();
|
|
@@ -201,14 +208,14 @@ public class AttendanceInfoServiceImpl implements AttendanceInfoService {
|
|
|
|
|
|
// 批量删除
|
|
|
if (!toDeleteIds.isEmpty()) {
|
|
|
- infoMapper.deleteBatchIds(toDeleteIds);
|
|
|
toDeleteIds.forEach(id -> respVO.getDeleteEmployeeNames().add(this.getInfo(id).getEmployeeName()));
|
|
|
+ infoMapper.deleteBatchIds(toDeleteIds);
|
|
|
}
|
|
|
|
|
|
// 批量插入
|
|
|
if (!toInsert.isEmpty()) {
|
|
|
- infoMapper.insertBatch(toInsert);
|
|
|
toInsert.forEach(info -> respVO.getCreateEmployeeNames().add(info.getEmployeeName()));
|
|
|
+ infoMapper.insertBatch(toInsert);
|
|
|
returnMsg.insert(0, "数据批量导入成功!共 " + toInsert.size() + " 条,数据如下:");
|
|
|
}
|
|
|
return returnMsg.toString();
|