From 802f66b88ace684090611382f26effdf340fa00c Mon Sep 17 00:00:00 2001 From: 康东 <98470202+kangdong59@users.noreply.github.com> Date: 星期二, 20 六月 2023 14:13:48 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeRuleServiceImpl.java | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 insertions(+), 3 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 870a915..7ce4a1d 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 @@ -49,6 +49,7 @@ 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 org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.utils.AuthUtil; @@ -106,12 +107,12 @@ /** * 鍒嗛〉鏌ヨ * @param query - * @param conditionMap + * @param conidtionMap * @return */ @Override - public IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> conditionMap) { - IPage<CodeRule> codeRuleIPage = this.codeRuleMapper.selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapper(conditionMap, CodeRule.class)); + public IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> conidtionMap) { + IPage<CodeRule> codeRuleIPage = this.codeRuleMapper.selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapper(conidtionMap, CodeRule.class)); //do杞瑅o鍚屾椂setLcStatusText鐢熷懡鍛ㄦ湡鍊硷紝骞跺寘瑁呮垚鍒嗛〉瀵硅薄杩斿洖 return CodeRuleWrapper.build().pageVO(codeRuleIPage); } @@ -319,6 +320,21 @@ } /** + * 涓婚敭鎵归噺鑾峰彇涓绘暟鎹紪鐮佽鍒� + * + * @param oidCollections 涓婚敭闆嗗悎锛屼絾鏄彈鎬ц兘褰卞搷锛屽缓璁竴娆℃煡璇笉瓒呰繃10000涓� + * @param hasSec 鏄惁鍖呭惈鐮佹 + * @return 涓绘暟鎹紪鐮佽鍒欐樉绀哄璞� + * @throws VciBaseException 鏌ヨ鍑虹幇寮傚父鏃朵細鎶涘嚭 + */ + @Override + public Collection<CodeRuleVO> listCodeRuleByIds(Collection<String> oidCollections, boolean hasSec) throws VciBaseException { + VciBaseUtil.alertNotNull(oidCollections, "鏁版嵁瀵硅薄涓婚敭闆嗗悎"); + List<CodeRule> codeRuleDOList = listCodeRuleDOByOidCollections(oidCollections); + return codeRuleDO2VOs(codeRuleDOList, true); + } + + /** * 浣跨敤涓婚敭闆嗗悎鏌ヨ鏁版嵁瀵硅薄 * * @param oidCollections 涓婚敭鐨勯泦鍚� @@ -437,6 +453,27 @@ } /** + * 鎵归噺鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞� + * + * @param codeRules 鏁版嵁瀵硅薄鍒楄〃 + * @param hasSec 鏄惁鍖呭惈鐮佹 + * @return 鏄剧ず瀵硅薄 + * @throws VciBaseException 鍙傛暟涓虹┖鎴栬�呬笉瀛樺湪鐨勬椂鍊欎細鎶涘嚭寮傚父 + */ + public List<CodeRuleVO> codeRuleDO2VOs(Collection<CodeRule> codeRules, boolean hasSec) throws VciBaseException { + List<CodeRuleVO> voList = new ArrayList<CodeRuleVO>(); + if (!CollectionUtils.isEmpty(codeRules)) { + for (CodeRule s : codeRules) { + CodeRuleVO vo = codeRuleDO2VO(s,true); + if (vo != null) { + voList.add(vo); + } + } + } + return voList; + } + + /** * 鏁版嵁瀵硅薄杞崲涓烘樉绀哄璞� * * @param codeRuleDO 瑙勫垯鐨勬暟鎹璞� -- Gitblit v1.9.3