bug列表:180(分类上增加关键属性查重校验字段当前分类是否参与校验,历史数据导入代码逻辑中关键属性校验增加过滤条件)
| | |
| | | * @return |
| | | */ |
| | | List<CodeClassify> selectAllClassifyByOid(@Param("oid") String oid,@Param("fieldInPath")String fieldInPath,@Param("tenantId") String tenantId); |
| | | |
| | | /** |
| | | * 根据顶层节点oid查询所有除当前节点以外所有不参与校验的分类oid |
| | | * @param topOid |
| | | * @param currentOid |
| | | * @return |
| | | */ |
| | | List<CodeClassify> selectLeafByParentClassifyOid(@Param("topOid") String topOid,@Param("currentOid")String currentOid); |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid;import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.tool.api.R; |
| | | import java.io.File; |
| | |
| | | */ |
| | | List<CodeClassifyVO> selectAllClassifyByOid(String oid, String fieldInPath); |
| | | |
| | | /** |
| | | * 根据顶层节点oid查询所有除当前节点以外所有不参与校验的分类oid |
| | | * @param topOid |
| | | * @param currentOid |
| | | * @return |
| | | */ |
| | | String selectLeafByParentClassifyOid(String topOid, String currentOid); |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 根据顶层节点oid查询所有除当前节点以外所有不参与校验的分类oid |
| | | * @param topOid |
| | | * @param currentOid |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String selectLeafByParentClassifyOid(String topOid, String currentOid) { |
| | | List<CodeClassify> codeClassifies = codeClassifyMapper.selectLeafByParentClassifyOid(topOid, currentOid); |
| | | if(codeClassifies.isEmpty()){ |
| | | return ""; |
| | | } |
| | | String oids = codeClassifies.stream().map(CodeClassify::getOid).collect(Collectors.joining(",")); |
| | | return oids; |
| | | } |
| | | |
| | | /*** |
| | | * 根据分类描述备注和库节点查询分类信息 |
| | | * @param desc |
| | |
| | | return codeClassifyMapper.selectCount(wrapper).intValue(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | //2.判断关键属性在系统里是否重复 |
| | | //因为数据量很大,所以得想办法并行 |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | Map<String,List<BaseModel>> indexTODataMap=new HashMap<>(); |
| | | Map<String,List<BaseModel>> indexTODataMap=new ConcurrentHashMap<>(); |
| | | // 查询不需要参与关键属性校验的除自己以外的所有分类oid |
| | | String isParticipateCheckOids = classifyService.selectLeafByParentClassifyOid(classifyFullInfo.getTopClassifyVO().getOid(), classifyFullInfo.getCurrentClassifyVO().getOid()); |
| | | List<ClientBusinessObject> repeatDataMap = cboList.parallelStream().filter(cbo -> { |
| | | //每行都得查询.如果其中出现了错误,我们就直接抛出异常,其余的显示 |
| | | //VciBaseUtil.setCurrentUserSessionInfo(sessionInfo); |
| | |
| | | value= value.replace(REQUIRED_CHAR,SPECIAL_CHAR); |
| | | engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap); |
| | | }); |
| | | // 添加是否参与关键属性校验条件 |
| | | conditionMap.put("t.isparticipatecheck","1"); |
| | | if (!CollectionUtils.isEmpty(ketAttrMap)) { |
| | | // 添加不参与关键属性校验的分类oid判断 |
| | | if(Func.isNotBlank(isParticipateCheckOids)){ |
| | | conditionMap.put("t.codeclsfid",QueryOptionConstant.NOTIN+isParticipateCheckOids); |
| | | } |
| | | CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmTypeId(), templateVO, conditionMap, null); |
| | | boolean isKeyCheck= commonsMapper.queryCountBySql(sqlBO.getSqlCount()) > 0; |
| | | if(isKeyCheck){ |
| | |
| | | order by lastmodifytime asc |
| | | </select> |
| | | |
| | | <!--codeclassify0.parentCodeClassifyOid = '${oid}'--> |
| | | <select id="selectAllLevelChildHasPath" resultMap="plCodeClassifyResultMap"> |
| | | select codeclassify0.OWNER as owner, |
| | | codeclassify0.BTMTYPEID as btmtypeid, |
| | |
| | | connect by p.oid = prior p.PARENTCODECLASSIFYOID |
| | | </select> |
| | | |
| | | <select id="selectLeafByParentClassifyOid" resultType="com.vci.ubcs.code.entity.CodeClassify"> |
| | | select * |
| | | from ( |
| | | select |
| | | oid, |
| | | name, |
| | | id, |
| | | level lvl, |
| | | isparticipatecheck, |
| | | nvl((select 'N' |
| | | from PL_CODE_CLASSIFY pcc1 |
| | | where pcc.oid = pcc1.PARENTCODECLASSIFYOID |
| | | and rownum < 2),'Y') is_leaf |
| | | from PL_CODE_CLASSIFY pcc |
| | | start with pcc.PARENTCODECLASSIFYOID = #{topOid} |
| | | connect by pcc.PARENTCODECLASSIFYOID = prior oid |
| | | ) plcls |
| | | where |
| | | is_leaf = 'Y' |
| | | and isparticipatecheck = 0 |
| | | and oid != #{currentOid} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | @Override |
| | | public List<MenuVO> lazyList(Long parentId, Map<String, Object> param) { |
| | | int i = 1 / 0; |
| | | //int i = 1 / 0; |
| | | if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) { |
| | | parentId = null; |
| | | } |