From d5fae6385b7f55cb84986b4b7fa341ad1cd9f75f Mon Sep 17 00:00:00 2001
From: zhangxp <zhangxp@chicecm.com>
Date: 星期四, 01 六月 2023 18:31:04 +0800
Subject: [PATCH] 集成接口联调
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java | 253 ++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 211 insertions(+), 42 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
index cd84de8..fd0dfdc 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -2,6 +2,7 @@
import com.alibaba.cloud.commons.lang.StringUtils;
import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -10,29 +11,32 @@
import com.vci.ubcs.code.entity.CodeBasicSec;
import com.vci.ubcs.code.entity.CodeClassifyValue;
import com.vci.ubcs.code.entity.CodeFixedValue;
-import com.vci.ubcs.code.enumpack.CodeSecTypeEnum;
+import com.vci.ubcs.code.enumpack.*;
import com.vci.ubcs.code.lifecycle.CodeRuleLC;
import com.vci.ubcs.code.mapper.CodeBasicSecMapper;
import com.vci.ubcs.code.mapper.CodeClassifyValueMapper;
import com.vci.ubcs.code.mapper.CodeFixedValueMapper;
-import com.vci.ubcs.code.service.ICodeBasicSecService;
-import com.vci.ubcs.code.service.ICodeClassifyValueService;
-import com.vci.ubcs.code.service.ICodeRuleService;
+import com.vci.ubcs.code.service.*;
+import com.vci.ubcs.code.vo.CodeReferConfigVO;
import com.vci.ubcs.code.vo.pagemodel.CodeBasicSecVO;
+import com.vci.ubcs.code.vo.pagemodel.CodeFixedValueVO;
import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
import com.vci.ubcs.code.wrapper.CodeBasicSecWrapper;
-import com.vci.ubcs.com.vci.starter.exception.VciBaseException;
-import com.vci.ubcs.com.vci.starter.revision.service.RevisionModelUtil;
-import com.vci.ubcs.com.vci.starter.web.enumpck.OsCodeFillTypeEnum;
-import com.vci.ubcs.com.vci.starter.web.pagemodel.KeyValue;
-import com.vci.ubcs.com.vci.starter.web.pagemodel.UIFormReferVO;
-import com.vci.ubcs.com.vci.starter.web.util.BeanUtilForVCI;
-import com.vci.ubcs.com.vci.starter.web.util.VciBaseUtil;
-import com.vci.ubcs.com.vci.starter.web.util.WebUtil;
-import com.vci.ubcs.omd.entity.DictBizM;
-import com.vci.ubcs.omd.feign.IDictBizClient;
+import com.vci.ubcs.starter.exception.VciBaseException;
+import com.vci.ubcs.starter.revision.service.RevisionModelUtil;
+import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
+import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum;
+import com.vci.ubcs.starter.web.pagemodel.KeyValue;
+import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO;
+import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
+import com.vci.ubcs.starter.web.util.VciBaseUtil;
+import com.vci.ubcs.starter.web.util.WebUtil;
+import com.vci.ubcs.system.entity.DictBiz;
+import com.vci.ubcs.system.feign.IDictBizClient;
+import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -42,7 +46,7 @@
import java.util.*;
import java.util.stream.Collectors;
-import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.DATA_OID_NOT_EXIST;
+import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.*;
/**
* 鐮佹鍩虹淇℃伅鏈嶅姟鎺ュ彛
@@ -79,7 +83,16 @@
private ICodeClassifyValueService codeClassifyValueService;
@Resource
+ private ICodeReferConfigService codeReferConfigService;
+
+ @Resource
private IDictBizClient iDictBizClient;
+
+ /**
+ * 鍥哄畾鐮佹鐨勭爜鍊肩殑鏈嶅姟
+ */
+ @Resource
+ private ICodeFixedValueService fixedValueService;
/**
* 涓婂眰鍒嗙被鐮佹鐨勫睘鎬у悕绉�
@@ -159,8 +172,8 @@
*/
@Override
public KeyValue checkAttrNullableBySecType(CodeBasicSecDTO codeBasicSecDTO) {
- VciBaseUtil.alertNotNull(codeBasicSecDTO.getSectype(), "鐮佹鍒嗙被");
- String secType = codeBasicSecDTO.getSectype();
+ VciBaseUtil.alertNotNull(codeBasicSecDTO.getSecType(), "鐮佹鍒嗙被");
+ String secType = codeBasicSecDTO.getSecType();
HashMap<String, String> attrMap = JSONObject.parseObject(JSONObject.toJSONString(codeBasicSecDTO), HashMap.class);
Map<String, String> notNullableAttr = getNotNullableAttr(secType);
if (notNullableAttr == null) {
@@ -199,10 +212,17 @@
if (! "success".equals(attrKv.getKey())){
throw new VciBaseException(attrKv.getValue() + "涓嶈兘涓虹┖");
}
-
//灏咲TO杞崲涓篋O
CodeBasicSec codeBasicSecDO = new CodeBasicSec();
BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDTO, codeBasicSecDO);
+ //text杞崲
+ codeBasicSecDO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecDTO.getSecType()));
+ codeBasicSecDO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecDTO.getCodeLevelType()));
+ codeBasicSecDO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecDTO.getCodeSecLengthType()));
+ codeBasicSecDO.setValueCutTypeText(CodeCutTypeEnum.getValueByText(codeBasicSecDTO.getValueCutType()));
+ codeBasicSecDO.setCodeGetValueTypeText(CodeGetValueTypeEnum.getValueByText(codeBasicSecDTO.getCodeGetValueType()));
+ //濉厖涓�浜涢粯璁ゅ��
+ DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeBasicSecDO,MdmBtmTypeConstant.CODE_BASIC_SEC);
//鎺掑簭鍙凤紝榛樿绛変簬褰撳墠宸叉湁鐨勬暟閲忓姞1
Long total = codeBasicSecMapper.selectCount(Wrappers.<CodeBasicSec>query()
.lambda()
@@ -218,21 +238,28 @@
&& StringUtils.isBlank(codeBasicSecDO.getCodeFillSeparator())){
throw new VciBaseException("褰撹ˉ浣嶆柟寮忎负宸﹁ˉ浣嶆垨鑰呭彸琛ヤ綅鐨勬椂鍊欙紝琛ヤ綅瀛楃涓嶈兘涓虹┖");
}
+ CodeReferConfigVO codeReferConfigVO = null;
//寮曠敤鐮佹鐨勬椂鍊欙紝闇�瑕佸垽鏂弬鐓х殑淇℃伅鏄惁姝g‘
if(CodeSecTypeEnum.CODE_REFER_SEC.getValue().equalsIgnoreCase(codeBasicSecDO.getSecType())){
if(StringUtils.isBlank(codeBasicSecDO.getReferConfig())){
throw new VciBaseException("寮曠敤鐮佹鐨勬椂鍊欙紝闇�瑕佸~鍐� 鍙傜収閰嶇疆 鐨勫唴瀹�");
}
try{
- JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
+ //JSONObject.parseObject(codeBasicSecDO.getReferConfig(), UIFormReferVO.class);
+ codeReferConfigVO = JSONObject.parseObject(codeBasicSecDO.getReferConfig(), CodeReferConfigVO.class);
+ // 灏嗗弬鐓ч厤缃繘琛屾寔涔呭寲锛岀粰鐢ㄦ埛鎻愪緵鍙彲閫夋嫨鍙傜収閰嶇疆鐨勬柟寮�
+
}catch (Throwable e){
throw new VciBaseException("寮曠敤鐮佹鐨勬椂鍊欙紝鍙傜収閰嶇疆鐨勫唴瀹圭殑鏍煎紡涓嶆纭�,",new String[0],e);
+ }
+ if(codeReferConfigVO.getIsPersistence()=="true"){
+ codeReferConfigService.insert(codeReferConfigVO);
}
}
boolean resBoolean = codeBasicSecMapper.insert(codeBasicSecDO) > 0;
//SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){
- DictBizM dictBiz = new DictBizM();
+ DictBiz dictBiz = new DictBiz();
dictBiz.setCode(MdmBtmTypeConstant.CODE_BASIC_SEC);
dictBiz.setDictKey("codefileseparator");
dictBiz.setDictValue(codeBasicSecDO.getCodeFillSeparator());
@@ -260,6 +287,7 @@
}
//灏咲TO杞崲涓篋O
CodeBasicSec codeBasicSecDO = selectByOid(codeBasicSecDTO.getOid());
+ DefaultAttrAssimtUtil.updateDefaultAttrAssimt(codeBasicSecDO);
boolean status = codeRuleService.checkEditDelStatus(codeRuleService.getObjectByOid(codeBasicSecDO.getPkCodeRule()).getLcStatus());
boolean resBoolean;
if (!status){
@@ -287,7 +315,8 @@
resBoolean = codeBasicSecMapper.updateById(codeBasicSecDO)>0;
//SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo();
if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){
- DictBizM dictBiz = new DictBizM();
+ //杩欏効鐩墠闇�瑕佹敼 2023/4/24
+ DictBiz dictBiz = new DictBiz();
dictBiz.setCode(MdmBtmTypeConstant.CODE_BASIC_SEC);
dictBiz.setDictKey("codefileseparator");
dictBiz.setDictValue(codeBasicSecDO.getCodeFillSeparator());
@@ -350,9 +379,46 @@
* @throws VciBaseException 鍙傛暟涓虹┖锛岃寮曠敤鏃舵姏鍑哄紓甯�
*/
@Override
- public boolean deleteCodeBasicSec(CodeBasicSecDTO codeBasicSecDTO) throws VciBaseException {
+ public R deleteCodeBasicSec(CodeBasicSecDTO codeBasicSecDTO) throws VciBaseException {
VciBaseUtil.alertNotNull(codeBasicSecDTO, "鐮佹鍩虹淇℃伅鏁版嵁瀵硅薄", codeBasicSecDTO.getOid(), "鐮佹鍩虹淇℃伅鐨勪富閿�");
- return this.codeBasicSecMapper.deleteById(codeBasicSecDTO.getOid())>0;
+ return this.deleteCodeBasicSecByPrimaryKey(codeBasicSecDTO.getOid());
+ }
+
+ /**
+ * 涓婚敭鍒犻櫎鐮佹鍩虹淇℃伅
+ *
+ * @param oid 鐮佹鍩虹淇℃伅涓婚敭
+ * @return 鍒犻櫎缁撴灉鍙嶉锛氾細success锛氭垚鍔燂紝fail锛氬け璐�
+ * @throws VciBaseException 鍙傛暟涓虹┖锛岃寮曠敤鏃舵姏鍑哄紓甯�
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public R deleteCodeBasicSecByPrimaryKey(String oid) throws VciBaseException {
+ CodeBasicSec codeBasicSecDO = selectByOid(oid);
+ boolean isLinked = checkIsLinked(codeBasicSecDO.getPkCodeRule(), oid);
+ if (isLinked) {
+ return R.fail("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�");
+ }
+ //鎵ц鍒犻櫎鎿嶄綔
+ boolean eftDeleteBasic = codeBasicSecMapper.deleteById(oid) > 0;
+ if (CodeSecTypeEnum.CODE_FIXED_SEC.getValue().equals(codeBasicSecDO.getSecType())){
+ List<CodeFixedValue> fixedValueDOS = fixedValueMapper.selectList(Wrappers.<CodeFixedValue>query()
+ .lambda().eq(CodeFixedValue::getCodeFixedSecOid,codeBasicSecDO.getOid())
+ );
+ if(!CollectionUtils.isEmpty(fixedValueDOS)){
+ fixedValueMapper.deleteBatchIds(fixedValueDOS.stream().map(CodeFixedValue::getOid).collect(Collectors.toSet()));
+ }
+ }
+ if (CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue().equals(codeBasicSecDO.getSecType())){
+ List<CodeClassifyValue> classifyValueDOS = codeClassifyValueMapper.selectList(Wrappers.<CodeClassifyValue>query()
+ .lambda().eq(CodeClassifyValue::getCodeClassifySecOid,codeBasicSecDO.getOid())
+ );
+ if(!CollectionUtils.isEmpty(classifyValueDOS)) {
+ codeClassifyValueMapper.deleteBatchIds(classifyValueDOS.stream().map(CodeClassifyValue::getOid).collect(Collectors.toSet()));
+ }
+ }
+
+ return eftDeleteBasic ? R.success(DELETE_SUCCESS) : R.fail(DELETE_FAIL);
}
/**
@@ -405,7 +471,7 @@
if(Func.isEmpty(codeBasicSecVO.getPkCodeRule()) || Func.isBlank(codeBasicSecVO.getPkCodeRule())){
return null;
}
- codeBasicSecVO.setSectype(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue());
+ codeBasicSecVO.setSecType(CodeSecTypeEnum.CODE_CLASSIFY_SEC.getValue());
return refDataGridCodeBasicSec(page,codeBasicSecVO);
}
@@ -484,9 +550,7 @@
@Transactional(rollbackFor = Exception.class)
public boolean upOrderNum(String oid) {
CodeBasicSec secDO = selectByOid(oid);
- boolean resUpBoolean = false;
- boolean resDownBoolean = false;
- if(secDO.getOrderNum() >1){
+ if(secDO.getOrderNum() > 1){
//绛変簬1鐨勬椂鍊欎笉鑳戒笂绉讳簡
//鎵炬瘮鑷繁灏忕殑
List<CodeBasicSec> lastSecDOs = codeBasicSecMapper.selectList(Wrappers.<CodeBasicSec>query()
@@ -495,18 +559,17 @@
);
if(!CollectionUtils.isEmpty(lastSecDOs)){
CodeBasicSec lastSec = lastSecDOs.get(0);
- resDownBoolean = codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
+ codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
.lambda().set(CodeBasicSec::getOrderNum, lastSec.getOrderNum() + 1)
.eq(CodeBasicSec::getOid, lastSec.getOid())
- ) > 0;
+ );
}
- secDO.setOrderNum(secDO.getOrderNum()-1);
- resUpBoolean = codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
+ codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
.lambda().set(CodeBasicSec::getOrderNum, secDO.getOrderNum() - 1)
.eq(CodeBasicSec::getOid, secDO.getOid())
- ) > 0;
+ );
}
- return resDownBoolean && resUpBoolean;
+ return true;
}
/**
@@ -518,29 +581,28 @@
@Transactional(rollbackFor = Exception.class)
public boolean downOrderNum(String oid) {
CodeBasicSec secDO = selectByOid(oid);
- boolean resUpBoolean = false;
- boolean resDownBoolean = false;
Long total = codeBasicSecMapper.selectCount(Wrappers.<CodeBasicSec>query()
.lambda().eq(CodeBasicSec::getPkCodeRule,secDO.getPkCodeRule())
);
- if(secDO.getOrderNum() < total){
+ if(secDO.getOrderNum() < total){
//灏忎簬鎬绘暟鐨勬椂鍊欐墠涓嬬Щ
List<CodeBasicSec> lastSecDOs = codeBasicSecMapper.selectList(Wrappers.<CodeBasicSec>query()
- .lambda().eq(CodeBasicSec::getOrderNum,String.valueOf(secDO.getOrderNum()+1))
+ .lambda().eq(CodeBasicSec::getOrderNum,secDO.getOrderNum()+1)
+ .eq(CodeBasicSec::getPkCodeRule,secDO.getPkCodeRule())
);
if(!CollectionUtils.isEmpty(lastSecDOs)){
CodeBasicSec lastSec = lastSecDOs.get(0);
- resUpBoolean = codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
+ codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
.lambda().set(CodeBasicSec::getOrderNum, lastSec.getOrderNum() - 1)
.eq(CodeBasicSec::getOid, lastSec.getOid())
- ) > 0;
+ );
}
- resDownBoolean = codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
+ codeBasicSecMapper.update(null, Wrappers.<CodeBasicSec>update()
.lambda().set(CodeBasicSec::getOrderNum, secDO.getOrderNum() + 1)
.eq(CodeBasicSec::getOid, secDO.getOid())
- ) > 0;
+ );
}
- return resDownBoolean && resUpBoolean;
+ return true;
}
/**
@@ -621,4 +683,111 @@
return codeBasicSecDO;
}
+
+ /**
+ * 浣跨敤瑙勫垯鐨勪富閿幏鍙栧搴旂殑鐮佹鍐呭
+ *
+ * @param ruleOid 瑙勫垯鐨勫唴瀹�
+ * @return 鐮佹鐨勫唴瀹�
+ */
+ @Override
+ public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid) {
+ if(StringUtils.isBlank(ruleOid)){
+ return new ArrayList<>();
+ }
+// Map<String,String> conditionMap = new HashMap<>();
+// conditionMap.put("pkCodeRule",ruleOid);
+// PageHelper pageHelper = new PageHelper(-1);
+// pageHelper.addDefaultAsc("ordernum");
+ QueryWrapper<CodeBasicSec> wrapper = new QueryWrapper<>();
+ wrapper.eq("pkCodeRule",ruleOid);
+ wrapper.orderByAsc("ordernum");
+ List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper);
+ return codeBasicSecDO2VOs(secDOList,true);
+ }
+
+ /**
+ * 鎵归噺鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞�
+ *
+ * @param codeBasicSecDOs 鏁版嵁瀵硅薄鍒楄〃
+ * @param hasFixedValue 鏄惁鏈夊浐瀹氬��
+ * @return 鏄剧ず瀵硅薄
+ * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呬笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父
+ */
+ @Override
+ public List<CodeBasicSecVO> codeBasicSecDO2VOs(Collection<CodeBasicSec> codeBasicSecDOs, boolean hasFixedValue) throws VciBaseException {
+ List<CodeBasicSecVO> voList = new ArrayList<CodeBasicSecVO>();
+ if (!CollectionUtils.isEmpty(codeBasicSecDOs)) {
+ for (CodeBasicSec s : codeBasicSecDOs) {
+ CodeBasicSecVO vo = codeBasicSecDO2VO(s);
+ if (vo != null) {
+ voList.add(vo);
+ }
+ }
+ }
+ if(hasFixedValue && !CollectionUtils.isEmpty(voList)){
+ List<CodeBasicSecVO> fixedSecVOList = voList.stream().filter(s -> CodeSecTypeEnum.CODE_FIXED_SEC.getValue().equalsIgnoreCase(s.getSecType())).collect(Collectors.toList());
+ if(!CollectionUtils.isEmpty(fixedSecVOList)){
+ //鏌ヨ鍥哄畾鐮佺殑鐮佸��
+ Map<String, List<CodeFixedValueVO>> secValueMap = fixedValueService.listCodeFixedValueBySecOids(fixedSecVOList.stream().map(CodeBasicSecVO::getOid).collect(Collectors.toList()));
+ voList.stream().forEach(vo->{
+ vo.setFixedValueVOList(secValueMap.getOrDefault(vo.getOid(),null));
+ });
+ }
+ }
+ return voList;
+ }
+
+ /**
+ * 鎵归噺鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞�
+ *
+ * @param codeBasicSecDOs 鏁版嵁瀵硅薄鍒楄〃
+ * @return 鏄剧ず瀵硅薄
+ * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呬笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父
+ */
+ @Override
+ public List<CodeBasicSecVO> codeBasicSecDO2VOs(Collection<CodeBasicSec> codeBasicSecDOs) throws VciBaseException {
+ List<CodeBasicSecVO> voList = new ArrayList<CodeBasicSecVO>();
+ if (!CollectionUtils.isEmpty(codeBasicSecDOs)) {
+ for (CodeBasicSec s : codeBasicSecDOs) {
+ CodeBasicSecVO vo = codeBasicSecDO2VO(s);
+ if (vo != null) {
+ voList.add(vo);
+ }
+ }
+ }
+ return voList;
+ }
+
+ /**
+ * 鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞�
+ *
+ * @param codeBasicSecDO 鏁版嵁瀵硅薄
+ * @return 鏄剧ず瀵硅薄
+ * @throws VciBaseException 鎷疯礉灞炴�у嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
+ */
+ @Override
+ public CodeBasicSecVO codeBasicSecDO2VO(CodeBasicSec codeBasicSecDO) throws VciBaseException {
+ CodeBasicSecVO codeBasicSecVO = new CodeBasicSecVO();
+ if (codeBasicSecDO != null) {
+ BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecVO, codeBasicSecVO);
+ codeBasicSecVO.setSecTypeText(CodeSecTypeEnum.getTextByValue(codeBasicSecVO.getSecType()));
+ codeBasicSecVO.setCodeLevelTypeText(CodeLevelTypeEnum.getTextByValue(codeBasicSecVO.getCodeLevelType()));
+ codeBasicSecVO.setCodeSecLengthTypeText(CodeSecLengthTypeEnum.getTextByValue(codeBasicSecVO.getCodeSecLengthType()));
+ codeBasicSecVO.setValueCutTypeText(CodeCutTypeEnum.getValueByText(codeBasicSecVO.getValueCutType()));
+ codeBasicSecVO.setCodeGetValueTypeText(CodeGetValueTypeEnum.getValueByText(codeBasicSecVO.getCodeGetValueType()));
+ // 濡傛灉鏄垎绫荤爜娈甸渶瑕佹煡璇㈡墍灞炲垎绫荤殑涓枃鍚嶇О
+ if(codeBasicSecDO.getSecType().equals("codeclassifysec") && Func.isNotEmpty(codeBasicSecDO.getParentClassifySecOid())){
+ CodeBasicSec codeBasicSec = codeBasicSecMapper.selectOne(Wrappers.<CodeBasicSec>query().lambda()
+ .eq(CodeBasicSec::getOid, codeBasicSecDO.getParentClassifySecOid())
+ .eq(CodeBasicSec::getSecType, codeBasicSecDO.getSecType()));
+ codeBasicSecVO.setParentClassifySecText(codeBasicSec.getName());
+ }
+ //濡傛灉鏈塴cstatus鐨勭被鐨勮瘽
+ if (true) {
+ //vo.setLcStatusText({lcStatusFullClassName}.getTextByValue(vo.getLcStatus()));
+ }
+ }
+ return codeBasicSecVO;
+ }
}
--
Gitblit v1.9.3