| | |
| | | //相似校验 |
| | | Map<String,String>resembleMap=new HashMap<>(); |
| | | List<DataResembleVO> dataResembleVOS=new ArrayList<>(); |
| | | String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmtypeid(); |
| | | String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmTypeId(); |
| | | bathcResembleQuery(codeClassifyOid,templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS); |
| | | if(resembleMap.size()>0) { |
| | | if(!CollectionUtils.isEmpty(dataResembleVOS)) { |
| | |
| | | //相似校验 |
| | | Map<String, String> resembleMap = new HashMap<>(); |
| | | List<DataResembleVO> dataResembleVOS = new ArrayList<>(); |
| | | String btmtypeid = classifyFullInfo.getTopClassifyVO().getBtmtypeid(); |
| | | String btmtypeid = classifyFullInfo.getTopClassifyVO().getBtmTypeId(); |
| | | bathcResembleQuery(templateVO.getCodeclassifyoid(), templateVO, needSaveCboList, resembleMap, btmtypeid, dataResembleVOS); |
| | | if (resembleMap.size() > 0) { |
| | | if (!CollectionUtils.isEmpty(dataResembleVOS)) { |
| | |
| | | //相似校验 |
| | | Map<String,String>resembleMap=new HashMap<>(); |
| | | List<DataResembleVO> dataResembleVOS=new ArrayList<>(); |
| | | String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmtypeid(); |
| | | String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmTypeId(); |
| | | bathcResembleQuery(orderDTO.getCodeClassifyOid(),templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS); |
| | | if(resembleMap.size()>0) { |
| | | isCreateUUid=true; |
| | |
| | | }); |
| | | //关键熟悉更改 |
| | | if (!CollectionUtils.isEmpty(editBoList)) { |
| | | engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(),editBoList);//保存数据 |
| | | engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmTypeId(),editBoList);//保存数据 |
| | | } |
| | | errorMap.putAll(errorKeyMap); |
| | | } |
| | |
| | | }else { |
| | | //存储数据 |
| | | try { |
| | | engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmtypeid(),updateList); |
| | | engineService.updateBatchByBaseModel(classifyFullInfo.getTopClassifyVO().getBtmTypeId(),updateList); |
| | | codeAllCodeService.saveBatch(codeAllCodeList); |
| | | if(deleteList.size()>0) { |
| | | commonsMapper.deleteByTaleAndOid(tableName, VciBaseUtil.array2String(deleteList.toArray(new String[]{}))); |
| | |
| | | //没有限制分类,但是一个模板只可能在一个业务类型里面,所以直接查询这个业务类型即可 |
| | | |
| | | if (!CollectionUtils.isEmpty(conditionMap)) { |
| | | final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " where 1 = 1 "}; |
| | | final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmTypeId()) + " where 1 = 1 "}; |
| | | conditionMap.forEach((key, value) -> { |
| | | sql[0] += " and " + key + " = " + value; |
| | | }); |
| | |
| | | String oid=rowData.getOid(); |
| | | String rowNumber=rowData.getRowIndex(); |
| | | ClientBusinessObject cbo = new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid()); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmTypeId()); |
| | | rowData.getData().forEach((index,value)->{ |
| | | String field = fieldIndexMap.get(index); |
| | | if(StringUtils.isBlank(field)){ |
| | |
| | | String fullPath = getFullPath(classifyFullInfo); |
| | | codeImprotDataVO.getDatas().stream().forEach(rowData -> { |
| | | ClientBusinessObject cbo=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid()); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmTypeId()); |
| | | rowData.forEach((field,value)->{ |
| | | try { |
| | | cbo.setAttributeValueWithNoCheck(field,value); |
| | |
| | | String fullPath,boolean newCode){ |
| | | rowDataList.stream().forEach(rowData -> { |
| | | ClientBusinessObject cbo=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid()); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmTypeId()); |
| | | rowData.getData().forEach((index,value)->{ |
| | | String field = fieldIndexMap.get(index); |
| | | if (StringUtils.isBlank(field)) { |
| | |
| | | engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap); |
| | | }); |
| | | if (!CollectionUtils.isEmpty(ketAttrMap)) { |
| | | CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), templateVO, conditionMap, null); |
| | | CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmTypeId(), templateVO, conditionMap, null); |
| | | boolean isKeyCheck= commonsMapper.queryCountBySql(sqlBO.getSqlCount()) > 0; |
| | | if(isKeyCheck){ |
| | | List<Map<String,String>> newDataList= commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlUnPage()); |
| | |
| | | List<String> unExistRuleClassifyOidList ){ |
| | | if(!CollectionUtils.isEmpty(classifyVOMap)){ |
| | | classifyVOMap.values().parallelStream().forEach(classifyVO->{ |
| | | if(StringUtils.isNotBlank(classifyVO.getCoderuleoid())){ |
| | | ruleOidMap.put(classifyVO.getOid(),classifyVO.getCoderuleoid()); |
| | | if(StringUtils.isNotBlank(classifyVO.getCodeRuleOid())){ |
| | | ruleOidMap.put(classifyVO.getOid(),classifyVO.getCodeRuleOid()); |
| | | }else{ |
| | | //递归找上级 |
| | | List<String> ruleOidList = new ArrayList<>(); |
| | | recursionRule(classifyVOMap,classifyVO.getParentcodeclassifyoid(),ruleOidList); |
| | | recursionRule(classifyVOMap,classifyVO.getParentCodeClassifyOid(),ruleOidList); |
| | | if(!CollectionUtils.isEmpty(ruleOidList)){ |
| | | ruleOidMap.put(classifyVO.getOid(),ruleOidList.get(0)); |
| | | }else{ |
| | |
| | | private void recursionRule(Map<String, CodeClassifyVO> classifyVOMap,String classifyOid,List<String> ruleOidList){ |
| | | if(classifyVOMap.containsKey(classifyOid)){ |
| | | CodeClassifyVO classifyVO = classifyVOMap.get(classifyOid); |
| | | if(StringUtils.isNotBlank(classifyVO.getCoderuleoid())){ |
| | | ruleOidList.add(classifyVO.getCoderuleoid()); |
| | | if(StringUtils.isNotBlank(classifyVO.getCodeRuleOid())){ |
| | | ruleOidList.add(classifyVO.getCodeRuleOid()); |
| | | return; |
| | | }else{ |
| | | recursionRule(classifyVOMap,classifyVO.getParentcodeclassifyoid(),ruleOidList); |
| | | recursionRule(classifyVOMap,classifyVO.getParentCodeClassifyOid(),ruleOidList); |
| | | } |
| | | }else{ |
| | | Map<String, CodeClassifyVO> parentClassifyVOMap=new HashMap<>(); |