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; - } - -}