| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.vci.ubcs.code.entity.CodePhaseAttr; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.enumpack.CodeReferConfigTypeEnum; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodePhaseAttrVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public class CodeReferConfigWraper extends BaseEntityWrapper<CodeReferConfig, CodeReferConfigVO> { |
| | | |
| | | |
| | | public static CodeReferConfigWraper build() { |
| | | return new CodeReferConfigWraper(); |
| | | } |
| | |
| | | @Override |
| | | public CodeReferConfigVO entityVO(CodeReferConfig codeReferConfig) { |
| | | CodeReferConfigVO codeReferConfigVO = Objects.requireNonNull(BeanUtil.copy(codeReferConfig, CodeReferConfigVO.class)); |
| | | |
| | | |
| | | codeReferConfigVO.setTypeText(CodeReferConfigTypeEnum.getTextByValue(codeReferConfig.getType())); |
| | | if(Func.isNotEmpty(codeReferConfig.getCodeSrchCondConfigs())){ |
| | | codeReferConfigVO.setCodeSrchCondConfigVOS(CodeSrchCondConfigWraper.build().listVO(codeReferConfig.getCodeSrchCondConfigs())); |
| | | } |
| | | if(Func.isNotEmpty(codeReferConfig.getCodeShowFieldConfigs())){ |
| | | codeReferConfigVO.setCodeShowFieldConfigVOS(CodeShowFieldConfigWraper.build().listVO(codeReferConfig.getCodeShowFieldConfigs())); |
| | | } |
| | | codeReferConfigVO.setCodeShowFieldConfigs(null); |
| | | codeReferConfigVO.setCodeSrchCondConfigs(null); |
| | | return codeReferConfigVO; |
| | | } |
| | | |
| | | |
| | | |
| | | } |