| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
| | | import com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant; |
| | | |
| | | import com.vci.ubcs.code.dto.CodeBasicSecDTO; |
| | |
| | | */ |
| | | @Override |
| | | public IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> conidtionMap) throws VciBaseException { |
| | | //int i = 1 / 0; |
| | | //如果等于自己配置的管理组租户id和管理组超管账号,就不需要按照规则所有者来进行查询 |
| | | /*if(!(AuthUtil.getTenantId().equals(NacosConfigCache.getAdminUserInfo().getTenantId()) |
| | | && AuthUtil.getUserId().toString().equals(NacosConfigCache.getAdminUserInfo().getUserId().toString())) |
| | |
| | | public Collection<CodeRuleVO> listCodeRuleByOids(Collection<String> oidCollections) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(oidCollections, "数据对象主键集合"); |
| | | List<CodeRule> codeRuleDOList = listCodeRuleDOByOidCollections(oidCollections); |
| | | return CodeRuleWrapper.build().listVO(codeRuleDOList); |
| | | return codeRuleDO2VOs(codeRuleDOList,true); |
| | | } |
| | | |
| | | /** |
| | |
| | | private List<CodeRule> listCodeRuleDOByIdCollections(Collection<String> idCollections) throws VciBaseException { |
| | | List<CodeRule> codeRuleDOList = new ArrayList<CodeRule>(); |
| | | if (!CollectionUtils.isEmpty(idCollections)) { |
| | | Collection<Collection<String>> oidCollectionsList = VciBaseUtil.switchCollectionForOracleIn(idCollections); |
| | | for (Collection<String> ids : oidCollectionsList) { |
| | | Collection<Collection<String>> idCollectionsList = VciBaseUtil.switchCollectionForOracleIn(idCollections); |
| | | for (Collection<String> ids : idCollectionsList) { |
| | | List<CodeRule> tempDOList = codeRuleMapper.selectList( |
| | | Wrappers.<CodeRule>query() |
| | | .lambda().in(CodeRule::getId,ids) |
| | |
| | | } |
| | | VciBaseUtil.alertNotNull(codeRuleDTO, "需要添加的数据对象"); |
| | | CodeRule codeRuleDO = new CodeRule(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeRuleDO,MdmBtmTypeConstant.CODE_RULE); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeRuleDTO, codeRuleDO); |
| | | boolean exFlag = codeRuleMapper.insert(codeRuleDO)>0; |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeRuleDO,MdmBtmTypeConstant.CODE_RULE); |
| | | boolean exFlag = SqlHelper.retBool(codeRuleMapper.insert(codeRuleDO)); |
| | | |
| | | List<CodeBasicSecDTO> secList = codeRuleDTO.getElements(); |
| | | List<CodeBasicSec> codeBasicSecs = new ArrayList<>(); |
| | | List<CodeBasicSec> codeClassifySec = new ArrayList<>(); |