diff --git a/src/main/java/com/ydool/staff/service/impl/AttachmentServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/AttachmentServiceImpl.java index 1568bba..5b04f0b 100644 --- a/src/main/java/com/ydool/staff/service/impl/AttachmentServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/AttachmentServiceImpl.java @@ -11,6 +11,7 @@ import com.ydool.common.data.dto.AjaxResult; import com.ydool.staff.entity.Attachment; import com.ydool.staff.mapper.AttachmentMapper; import com.ydool.staff.service.IAttachmentService; +import com.ydool.system.entity.User; import com.ydool.system.mapper.UserMapper; import com.ydool.system.request.IdsRequest; import org.springframework.beans.factory.annotation.Autowired; @@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** @@ -87,6 +89,16 @@ public class AttachmentServiceImpl extends BaseService attachmentPage = attachmentMapper.selectPage(page, wrapper); + List records = attachmentPage.getRecords(); + attachmentPage.setRecords(records.stream().map(e->{ + User user = userMapper.selectById(e.getCreatedId()); + e.setCreatedId(user.getUserName()); + User user1 = userMapper.selectById(e.getUpdatedId()); + e.setUpdatedId(user1.getUserName()); + return e; + }).collect(Collectors.toList())); + + return AjaxResult.ok().data(attachmentPage); } } diff --git a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java index bd0c0b4..5fa621d 100644 --- a/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java +++ b/src/main/java/com/ydool/staff/service/impl/PersonnelServiceImpl.java @@ -295,6 +295,9 @@ public class PersonnelServiceImpl extends BaseService engageFiles = request.getEngageFiles(); List educationFiles = request.getEducationFiles(); List auditFiles = request.getAuditFiles(); + if ("入职".equals(per.getWorkState())) { + return AjaxResult.fail().msg("该人员未在职,不能变更数据"); + } if ("1".equals(per.getAlterationSign())) { return AjaxResult.fail().msg("该人员在申报中,资料未完成审批,请等待领导审批!"); }