From 436a5a391a514c9ac345554bafead583f124d8b4 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 09 五月 2023 22:55:04 +0800
Subject: [PATCH] 代码整合
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
index 3049bac..31d235c 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java
@@ -430,4 +430,38 @@
}
+ /**
+ * 浣跨敤涓婚敭鑾峰彇缂栫爜瑙勫垯鐨勫唴瀹�
+ *
+ * @param oid 涓婚敭
+ * @return 瑙勫垯鐨勬樉绀哄璞�
+ */
+ @Override
+ public CodeRuleVO getObjectHasSecByOid(String oid) {
+ CodeRule ruleDO = selectByOid(oid);
+ return codeRuleDO2VO(ruleDO, true);
+ }
+
+ /**
+ * 鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞�
+ *
+ * @param codeRuleDO 瑙勫垯鐨勬暟鎹璞�
+ * @param hasSec 鏄惁鏌ヨ鐮佹
+ * @return 鏄剧ず瀵硅薄
+ * @throws VciBaseException 鎷疯礉灞炴�у嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父
+ */
+ public CodeRuleVO codeRuleDO2VO(CodeRule codeRuleDO, boolean hasSec) throws VciBaseException {
+ CodeRuleVO vo = new CodeRuleVO();
+ if (codeRuleDO != null) {
+ BeanUtilForVCI.copyPropertiesIgnoreCase(codeRuleDO, vo);
+ //濡傛灉鏈塴cstatus鐨勭被鐨勮瘽
+ vo.setLcStatusText(CodeRuleLC.getTextByValue(vo.getLcStatus()));
+ if (hasSec) {
+ //鏌ヨ鐮佹
+ vo.setSecVOList(codeBasicSecService.listCodeBasicSecByRuleOid(vo.getOid()));
+ }
+ }
+ return vo;
+ }
+
}
--
Gitblit v1.9.3