From 6fecf875c277eac105d5e827b8ff21d42f0eb621 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 9 Jan 2024 14:20:00 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=96=BD=E5=B7=A5=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../access/wrapper/ConstructionWrapper.java | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java deleted file mode 100644 index 93d1aba..0000000 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/wrapper/ConstructionWrapper.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.hnac.hzims.operational.access.wrapper; - -import com.hnac.hzims.operational.access.constants.DictConstant; -import com.hnac.hzims.operational.access.entity.OperAccessPlanEntity; -import com.hnac.hzims.operational.access.entity.OperConstructionEntity; -import com.hnac.hzims.operational.access.vo.ConstructionVo; -import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; -import org.springblade.core.mp.support.BaseEntityWrapper; -import org.springblade.core.tool.utils.BeanUtil; -import org.springblade.system.cache.DictCache; -import org.springblade.system.user.cache.UserCache; -import org.springblade.system.user.entity.User; - -import java.util.Optional; - -/** - * @author ysj - */ -public class ConstructionWrapper extends BaseEntityWrapper { - - public static ConstructionWrapper build() { - return new ConstructionWrapper(); - } - - @Override - public ConstructionVo entityVO(OperConstructionEntity entity) { - ConstructionVo vo = BeanUtil.copy(entity, ConstructionVo.class); - User create = UserCache.getUser(entity.getCreateUser()); - User update = UserCache.getUser(entity.getUpdateUser()); - User head = UserCache.getUser(entity.getOverhaulHead()); - User recorder = UserCache.getUser(entity.getRecorder()); - User reviewer = UserCache.getUser(entity.getReviewer()); - vo.setCreateUserName(Optional.ofNullable(create).map(User :: getName).orElse(null)); - vo.setUpdateUserName(Optional.ofNullable(update).map(User :: getName).orElse(null)); - vo.setOverhaulHeadName(Optional.ofNullable(head).map(User :: getName).orElse(null)); - vo.setRecorderName(Optional.ofNullable(recorder).map(User :: getName).orElse(null)); - vo.setReviewerName(Optional.ofNullable(reviewer).map(User :: getName).orElse(null)); - return vo; - } - -}