From 6d43ef7938752bef024e591856fb81b02972ec2a Mon Sep 17 00:00:00 2001 From: mash Date: Fri, 24 Feb 2023 13:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E6=95=B0=E6=8D=AE=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../staff/service/impl/AttachmentServiceImpl.java | 12 ++++++++++++ .../staff/service/impl/PersonnelServiceImpl.java | 3 +++ 2 files changed, 15 insertions(+) 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("该人员在申报中,资料未完成审批,请等待领导审批!"); }